Skip to content

Commit

Permalink
Address linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
jonavellecuerdo committed Jul 22, 2024
1 parent 2430201 commit afe5df4
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
4 changes: 3 additions & 1 deletion tests/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,6 @@ def test_load_external_config_json():


def test_load_external_config_xml():
assert type(load_external_config("config/loc-countries.xml", "xml")) == BeautifulSoup
assert isinstance(
load_external_config("config/loc-countries.xml", "xml"), BeautifulSoup
)
2 changes: 1 addition & 1 deletion tests/test_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ def test_parse_date_from_string_success():
"1930-12-31T12:34:56.000001",
"1930-12-31T12:34:56.000001Z",
]:
assert type(parse_date_from_string(date)) == datetime
assert isinstance(parse_date_from_string(date), datetime)


def test_parse_date_from_string_invalid_date_returns_none():
Expand Down
4 changes: 3 additions & 1 deletion transmogrifier/sources/xml/whoas.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ def valid_content_types(cls, content_type_list: list[str]) -> bool:
Args:
content_type_list: A list of content_type values.
"""
if all(item.lower() in INVALID_CONTENT_TYPES for item in content_type_list):
if all( # noqa: SIM103
item.lower() in INVALID_CONTENT_TYPES for item in content_type_list
):
return False
return True
2 changes: 1 addition & 1 deletion transmogrifier/sources/xmltransformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def record_is_deleted(cls, source_record: Tag) -> bool:
Args:
source_record: A BeautifulSoup Tag representing a single XML record
"""
if source_record.find("header", status="deleted"):
if source_record.find("header", status="deleted"): # noqa: SIM103
return True
return False

Expand Down

0 comments on commit afe5df4

Please sign in to comment.