Movatterモバイル変換


[0]ホーム

URL:


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

Commitdc1b200

Browse files
[pre-commit.ci] pre-commit autoupdate (#12930)
* [pre-commit.ci] pre-commit autoupdateupdates:- [github.com/astral-sh/ruff-pre-commit: v0.12.9 → v0.12.10](astral-sh/ruff-pre-commit@v0.12.9...v0.12.10)- [github.com/pre-commit/mirrors-mypy: v1.15.0 → v1.17.1](pre-commit/mirrors-mypy@v1.15.0...v1.17.1)* Update word_break.py* Update word_break.py* Update word_break.py* Update word_break.py* Update word_break.py* Update covid_stats_via_xpath.py* [pre-commit.ci] auto fixes from pre-commit.com hooksfor more information, seehttps://pre-commit.ci* Update pyproject.toml* [pre-commit.ci] auto fixes from pre-commit.com hooksfor more information, seehttps://pre-commit.ci* Update pyproject.toml* Update pyproject.toml* Update covid_stats_via_xpath.py* [pre-commit.ci] auto fixes from pre-commit.com hooksfor more information, seehttps://pre-commit.ci---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>Co-authored-by: Maxim Smolskiy <mithridatus@mail.ru>
1 parent8c1c6c1 commitdc1b200

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

‎.pre-commit-config.yaml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ repos:
1616
-id:auto-walrus
1717

1818
-repo:https://github.com/astral-sh/ruff-pre-commit
19-
rev:v0.12.9
19+
rev:v0.12.10
2020
hooks:
2121
-id:ruff-check
2222
-id:ruff-format
@@ -47,7 +47,7 @@ repos:
4747
-id:validate-pyproject
4848

4949
-repo:https://github.com/pre-commit/mirrors-mypy
50-
rev:v1.15.0
50+
rev:v1.17.1
5151
hooks:
5252
-id:mypy
5353
args:

‎dynamic_programming/word_break.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def is_breakable(index: int) -> bool:
9090
ifindex==len_string:
9191
returnTrue
9292

93-
trie_node=trie
93+
trie_node:Any=trie
9494
foriinrange(index,len_string):
9595
trie_node=trie_node.get(string[i],None)
9696

‎web_programming/covid_stats_via_xpath.py‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
This is to show simple COVID19 info fetching from worldometers site using lxml
2+
This is to show simple COVID19 info fetching from worldometersarchivesite using lxml
33
* The main motivation to use lxml in place of bs4 is that it is faster and therefore
44
more convenient to use in Python web projects (e.g. Django or Flask-based)
55
"""
@@ -19,12 +19,14 @@
1919

2020

2121
classCovidData(NamedTuple):
22-
cases:int
23-
deaths:int
24-
recovered:int
22+
cases:str
23+
deaths:str
24+
recovered:str
2525

2626

27-
defcovid_stats(url:str="https://www.worldometers.info/coronavirus/")->CovidData:
27+
defcovid_stats(
28+
url:str="https://web.archive.org/web/20250825095350/https://www.worldometers.info/coronavirus/",
29+
)->CovidData:
2830
xpath_str='//div[@class = "maincounter-number"]/span/text()'
2931
returnCovidData(
3032
*html.fromstring(httpx.get(url,timeout=10).content).xpath(xpath_str)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp