Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit b83848e

Browse files
authoredJul 23, 2024··
ruff rule RUF005 Consider [*self.urls, "", "#"] instead of concatenation
1 parent 1ba9194 commit b83848e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎web_programming/emails_from_url.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def handle_starttag(self, tag: str, attrs: list[tuple[str, str | None]]) -> None
3131
# Check the list of defined attributes.
3232
for name, value in attrs:
3333
# If href is defined, not empty nor # print it and not already in urls.
34-
if name == "href" and value not in set(self.urls + ["", "#"]):
34+
if name == "href" and value not in set(*self.urls, "", "#"):
3535
url = parse.urljoin(self.domain, value)
3636
self.urls.append(url)
3737

0 commit comments

Comments
 (0)
Please sign in to comment.