Skip to content

Commit 3649771

Browse files
Upgrade mypy (#4749)
Co-authored-by: cobalt <[email protected]>
1 parent 93d13b2 commit 3649771

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ repos:
3939
exclude: ^src/blib2to3/
4040

4141
- repo: https://github.com/pre-commit/mirrors-mypy
42-
rev: v1.17.1
42+
rev: v1.19.0
4343
hooks:
4444
- id: mypy
4545
exclude: ^(docs/conf.py|scripts/generate_schema.py)$
@@ -58,6 +58,7 @@ repos:
5858
- hypothesis
5959
- aiohttp >= 3.7.4
6060
- types-commonmark
61+
- beautifulsoup4
6162
- urllib3
6263
- hypothesmith
6364
- id: mypy

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ macos-max-compat = true
125125
enable-by-default = false
126126
dependencies = [
127127
"hatch-mypyc>=0.16.0",
128-
"mypy==1.17.1",
128+
"mypy==1.19.0",
129129
"click>=8.1.7",
130130
]
131131
require-runtime-dependencies = true

scripts/check_pre_commit_rev_in_example.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
import commonmark
1616
import yaml
17-
from bs4 import BeautifulSoup # type: ignore[import-untyped]
17+
from bs4 import BeautifulSoup
1818

1919

2020
def main(changes: str, source_version_control: str) -> None:
@@ -30,7 +30,7 @@ def main(changes: str, source_version_control: str) -> None:
3030
source_version_control_html, "html.parser"
3131
)
3232
pre_commit_repos = yaml.safe_load(
33-
source_version_control_soup.find(class_="language-yaml").string
33+
source_version_control_soup.find(class_="language-yaml").string # type: ignore[union-attr, arg-type]
3434
)["repos"]
3535

3636
for repo in pre_commit_repos:

scripts/check_version_in_basics_example.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import sys
99

1010
import commonmark
11-
from bs4 import BeautifulSoup # type: ignore[import-untyped]
11+
from bs4 import BeautifulSoup
1212

1313

1414
def main(changes: str, the_basics: str) -> None:
@@ -23,12 +23,12 @@ def main(changes: str, the_basics: str) -> None:
2323
version_examples = [
2424
code_block.string
2525
for code_block in the_basics_soup.find_all(class_="language-console")
26-
if "$ black --version" in code_block.string
26+
if "$ black --version" in code_block.string # type: ignore[operator]
2727
]
2828

2929
for tag in tags:
3030
for version_example in version_examples:
31-
if tag in version_example and tag != latest_tag:
31+
if tag in version_example and tag != latest_tag: # type: ignore[operator]
3232
print(
3333
"Please set the version in the ``black --version`` "
3434
"examples from ``the_basics.md`` to be the latest one.\n"

0 commit comments

Comments
 (0)