Code style fixes

This commit is contained in:
Sean Whalen
2024-09-04 16:48:07 -04:00
parent e967778f25
commit 5973ca8205
3 changed files with 7 additions and 5 deletions

View File

@@ -46,7 +46,7 @@ jobs:
make html
- name: Check code style
run: |
flake8 *.py parsedmarc/*.py
ruff check *.py parsedmarc/*.py
- name: Run unit tests
run: |
coverage run tests.py

View File

@@ -587,11 +587,12 @@ def parse_aggregate_report_xml(
def extract_report(content):
"""
Extracts text from a zip or gzip file, as a base64-encoded string, file-like object,
or bytes.
Extracts text from a zip or gzip file, as a base64-encoded string,
file-like object, or bytes.
Args:
content: report file as a base64-encoded string, file-like object or bytes.
content: report file as a base64-encoded string, file-like object or
bytes.
Returns:
str: The extracted text
@@ -639,6 +640,7 @@ def extract_report(content):
return report
def extract_report_from_file_path(file_path):
"""Extracts report from a file at the given file_path"""
try:

View File

@@ -17,7 +17,7 @@ mailsuite>=1.6.1
pygelf
nose>=1.3.7
wheel>=0.37.0
flake8>=3.7.8
ruff
jinja2>=2.10.1
packaging>=19.1
imagesize>=1.1.0