Skip to content

[pre-commit.ci] pre-commit autoupdate #11495

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ repos:
- id: auto-walrus

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.2
rev: v0.5.4
hooks:
- id: ruff
- id: ruff-format
Expand Down Expand Up @@ -47,7 +47,7 @@ repos:
- id: validate-pyproject

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.10.1
rev: v1.11.0
hooks:
- id: mypy
args:
Expand Down
7 changes: 1 addition & 6 deletions web_programming/emails_from_url.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,7 @@
# Check the list of defined attributes.
for name, value in attrs:
# If href is defined, not empty nor # print it and not already in urls.
if (
name == "href"
and value != "#"
and value != ""
and value not in self.urls
):
if name == "href" and value not in set(self.urls + ["", "#"]):

Check failure on line 34 in web_programming/emails_from_url.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (RUF005)

web_programming/emails_from_url.py:34:56: RUF005 Consider `[*self.urls, "", "#"]` instead of concatenation
url = parse.urljoin(self.domain, value)
self.urls.append(url)

Expand Down
Loading