Skip to content

Commit

Permalink
maintenance: add __all__ to init.py and lint code (ruff) (#116)
Browse files Browse the repository at this point in the history
  • Loading branch information
adbar authored Sep 3, 2024
1 parent fd646fb commit 46870c9
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
22 changes: 22 additions & 0 deletions courlan/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,25 @@
get_hostinfo,
is_external,
)

__all__ = [
"clean_url",
"normalize_url",
"scrub_url",
"check_url",
"extract_links",
"is_navigation_page",
"is_not_crawlable",
"is_valid_url",
"lang_filter",
"validate_url",
"sample_urls",
"UrlStore",
"extract_domain",
"filter_urls",
"fix_relative_urls",
"get_base_url",
"get_host_and_path",
"get_hostinfo",
"is_external",
]
2 changes: 1 addition & 1 deletion courlan/urlutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def extract_domain(

return (
full_domain
if full_domain and not domain in blacklist and not full_domain in blacklist
if full_domain and domain not in blacklist and full_domain not in blacklist
else None
)

Expand Down

0 comments on commit 46870c9

Please sign in to comment.