Skip to content

Commit

Permalink
[ckan#7749] moar lint
Browse files Browse the repository at this point in the history
  • Loading branch information
wardi committed Aug 11, 2023
1 parent f85e227 commit 5fbe064
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions ckan/tests/logic/action/test_get.py
Original file line number Diff line number Diff line change
Expand Up @@ -2968,7 +2968,7 @@ def test_status_show_hiding_version(self):
assert status["site_description"] == ""
assert status["locale_default"] == "en"

assert isinstance(status["extensions"],list)
assert isinstance(status["extensions"], list)
assert status["extensions"] == ["stats"]

@pytest.mark.ckan_config("ckan.plugins", "stats")
Expand All @@ -2984,7 +2984,7 @@ def test_status_show_version_to_sysadmins(self):
assert status["site_description"] == ""
assert status["locale_default"] == "en"

assert isinstance(status["extensions"],list)
assert isinstance(status["extensions"], list)
assert status["extensions"] == ["stats"]


Expand Down
3 changes: 2 additions & 1 deletion ckan/views/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,8 @@ def purge_all(self):

def purge_entity(self, ent_type: str):
entities = self.deleted_entities[ent_type]
number = len(entities) if isinstance(entities, list) else entities.count()
number = len(entities) if isinstance(entities, list
) else entities.count()

for ent in entities:
entity_id = ent.id if hasattr(ent, 'id') else ent['id']
Expand Down

0 comments on commit 5fbe064

Please sign in to comment.