Skip to content

Commit

Permalink
fix: lint warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
jmiguelv committed Mar 31, 2023
1 parent 3dae1b1 commit 6344c64
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion data_portal_explorer/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ def get_packages_requests(portals, workers, namespace, rows, limit):
start = 0
number_of_requests = max(int(n / rows), 1)

for i in range(number_of_requests):
for _ in range(number_of_requests):
requests.append([portal, namespace, start, rows])
start += rows
except CKANAPIError as e:
Expand Down
8 changes: 3 additions & 5 deletions data_portal_explorer/data_portal_explorer.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ def get_extensions(portal):


@lru_cache(maxsize=64)
def get_remote_ckan(portal_url, get_only=False):
return RemoteCKAN(portal_url, get_only=True)
def get_remote_ckan(portal_url, get_only=True):
return RemoteCKAN(portal_url, get_only=get_only)


def get_facets(portal, name):
Expand All @@ -41,7 +41,7 @@ def get_facets(portal, name):

if r and facet_field in r["facets"]:
data = r["facets"][facet_field]
return dict(sorted(data.items(), key=lambda t: t[0].lower()))
return dict(sorted(data.items(), key=lambda t: t[0].lower().strip()))

return {}

Expand All @@ -55,8 +55,6 @@ def get_number_of_packages(portal):
except CKANAPIError:
return -1

return 0


def get_packages(portal, namespace, start, rows):
url = portal["url"]
Expand Down

0 comments on commit 6344c64

Please sign in to comment.