Skip to content

Commit be495c7

Browse files
authored
Don't skip flake8 for the misc directory (#13533)
1 parent 3f0ac21 commit be495c7

File tree

7 files changed

+13
-18
lines changed

7 files changed

+13
-18
lines changed

.github/workflows/mypy_primer.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ on:
1313
- 'mypy/stubgen.py'
1414
- 'mypy/stubgenc.py'
1515
- 'mypy/test/**'
16-
- 'scripts/**'
1716
- 'test-data/**'
1817

1918
jobs:

misc/async_matrix.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def plain_host_generator(func) -> Generator[str, None, None]:
7070
x = 0
7171
f = func()
7272
try:
73-
x = yield from f
73+
x = yield from f # noqa: F841
7474
finally:
7575
try:
7676
f.close()
@@ -80,7 +80,7 @@ def plain_host_generator(func) -> Generator[str, None, None]:
8080

8181
async def plain_host_coroutine(func) -> None:
8282
x = 0
83-
x = await func()
83+
x = await func() # noqa: F841
8484

8585

8686
@coroutine
@@ -89,7 +89,7 @@ def decorated_host_generator(func) -> Generator[str, None, None]:
8989
x = 0
9090
f = func()
9191
try:
92-
x = yield from f
92+
x = yield from f # noqa: F841
9393
finally:
9494
try:
9595
f.close()
@@ -100,7 +100,7 @@ def decorated_host_generator(func) -> Generator[str, None, None]:
100100
@coroutine
101101
async def decorated_host_coroutine(func) -> None:
102102
x = 0
103-
x = await func()
103+
x = await func() # noqa: F841
104104

105105

106106
# Main driver.

misc/cherry-pick-typeshed.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def main() -> None:
3737
sys.exit(f"error: Invalid commit {commit!r}")
3838

3939
if not os.path.exists("mypy") or not os.path.exists("mypyc"):
40-
sys.exit(f"error: This script must be run at the mypy repository root directory")
40+
sys.exit("error: This script must be run at the mypy repository root directory")
4141

4242
with tempfile.TemporaryDirectory() as d:
4343
diff_file = os.path.join(d, "diff")

misc/find_type.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
# " Convert to 0-based column offsets
1818
# let startcol = startcol - 1
1919
# " Change this line to point to the find_type.py script.
20-
# execute '!python3 /path/to/mypy/scripts/find_type.py % ' . startline . ' ' . startcol . ' ' . endline . ' ' . endcol . ' ' . mypycmd
20+
# execute '!python3 /path/to/mypy/misc/find_type.py % ' . startline . ' ' . startcol . ' ' . endline . ' ' . endcol . ' ' . mypycmd
2121
# endfunction
2222
# vnoremap <Leader>t :call RevealType()<CR>
2323
#

misc/fix_annotate.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,12 @@ def transform(self, node, results):
7272
#
7373
# "Compact" functions (e.g. "def foo(x, y): return max(x, y)")
7474
# have a different structure that isn't matched by PATTERN.
75-
76-
## print('-'*60)
77-
## print(node)
78-
## for i, ch in enumerate(children):
79-
## print(i, repr(ch.prefix), repr(ch))
80-
75+
#
76+
# print('-'*60)
77+
# print(node)
78+
# for i, ch in enumerate(children):
79+
# print(i, repr(ch.prefix), repr(ch))
80+
#
8181
# Check if there's already an annotation.
8282
for ch in children:
8383
if ch.prefix.lstrip().startswith("# type:"):

misc/upload-pypi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def download_asset(asset: dict[str, Any], dst: Path) -> Path:
4949

5050

5151
def download_all_release_assets(release: dict[str, Any], dst: Path) -> None:
52-
print(f"Downloading assets...")
52+
print("Downloading assets...")
5353
with ThreadPoolExecutor() as e:
5454
for asset in e.map(lambda asset: download_asset(asset, dst), release["assets"]):
5555
print(f"Downloaded {asset}")

setup.cfg

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@ exclude =
1919
# Sphinx configuration is irrelevant
2020
docs/source/conf.py,
2121
mypyc/doc/conf.py,
22-
# conflicting styles
23-
misc/*,
24-
# conflicting styles
25-
scripts/*,
2622
# tests have more relaxed styling requirements
2723
# fixtures have their own .pyi-specific configuration
2824
test-data/*,

0 commit comments

Comments
 (0)