Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

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
MaximSmolskiy merged 14 commits into master from pre-commit-ci-update-config
Aug 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
14 commits
Select commit Hold shift + click to select a range
183d506
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Aug 25, 2025
941ad7e
Update word_break.py
MaximSmolskiy Aug 25, 2025
4ecf2c1
Update word_break.py
MaximSmolskiy Aug 25, 2025
ec9c7c9
Update word_break.py
MaximSmolskiy Aug 25, 2025
84c8f57
Update word_break.py
MaximSmolskiy Aug 25, 2025
4c3a58c
Update word_break.py
MaximSmolskiy Aug 25, 2025
62d9f9a
Update covid_stats_via_xpath.py
MaximSmolskiy Aug 25, 2025
9c4cdf0
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Aug 25, 2025
be8450a
Update pyproject.toml
MaximSmolskiy Aug 25, 2025
49a1717
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Aug 25, 2025
43e760e
Update pyproject.toml
MaximSmolskiy Aug 25, 2025
d4f9ca4
Update pyproject.toml
MaximSmolskiy Aug 25, 2025
fe15df3
Update covid_stats_via_xpath.py
MaximSmolskiy Aug 25, 2025
9160f57
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Aug 25, 2025
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
View file Open in desktop
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.12.9
rev: v0.12.10
hooks:
- id: ruff-check
- 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.15.0
rev: v1.17.1
hooks:
- id: mypy
args:
Expand Down
2 changes: 1 addition & 1 deletion dynamic_programming/word_break.py
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def is_breakable(index: int) -> bool:
if index == len_string:
return True

trie_node = trie
trie_node: Any = trie
for i in range(index, len_string):
trie_node = trie_node.get(string[i], None)

Expand Down
12 changes: 7 additions & 5 deletions web_programming/covid_stats_via_xpath.py
View file Open in desktop
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
This is to show simple COVID19 info fetching from worldometers site using lxml
This is to show simple COVID19 info fetching from worldometers archive site using lxml
* The main motivation to use lxml in place of bs4 is that it is faster and therefore
more convenient to use in Python web projects (e.g. Django or Flask-based)
"""
Expand All @@ -19,12 +19,14 @@


class CovidData(NamedTuple):
cases: int
deaths: int
recovered: int
cases: str
deaths: str
recovered: str


def covid_stats(url: str = "https://www.worldometers.info/coronavirus/") -> CovidData:
def covid_stats(
url: str = "https://web.archive.org/web/20250825095350/https://www.worldometers.info/coronavirus/",
) -> CovidData:
xpath_str = '//div[@class = "maincounter-number"]/span/text()'
return CovidData(
*html.fromstring(httpx.get(url, timeout=10).content).xpath(xpath_str)
Expand Down

AltStyle によって変換されたページ (->オリジナル) /