Skip to content

Commit e689a96

Browse files
author
Ceyda Duzgec
committed
Fix black issue
1 parent b7ecdd9 commit e689a96

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

filter.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,26 +29,25 @@ def country_filter(src, scopes):
2929
"""
3030
if not scopes: # Handle empty scopes
3131
return src
32-
32+
3333
if isinstance(scopes, str):
3434
return _country_filter(src, scopes, None)
35-
35+
3636
if isinstance(scopes, list):
3737
if not scopes: # Empty list
3838
return src
39-
39+
4040
# Convert all scopes to lowercase for case-insensitive comparison
4141
normalized_scopes = [scope.lower() for scope in scopes]
42-
42+
4343
# Filter entries where country matches any scope (case-insensitive)
4444
filtered_entries = [
45-
entry for entry in src
46-
if entry["country"].lower() in normalized_scopes
45+
entry for entry in src if entry["country"].lower() in normalized_scopes
4746
]
48-
47+
4948
# Sort by country name for consistent ordering
5049
return sorted(filtered_entries, key=lambda x: x["country"])
51-
50+
5251
return []
5352

5453

@@ -87,4 +86,4 @@ def main():
8786

8887

8988
if __name__ == "__main__":
90-
main()
89+
main()

0 commit comments

Comments
 (0)