Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1d9ca64

Browse files
authored
Add more from __future__ import annotations; remove more quotes (#13412)
1 parent f8fc26e commit 1d9ca64

132 files changed

Lines changed: 797 additions & 540 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

conftest.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from __future__ import annotations
2+
13
import os.path
24

35
pytest_plugins = ["mypy.test.data"]

docs/source/conf.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
# All configuration values have a default; values that are commented out
1313
# serve to show the default.
1414

15+
from __future__ import annotations
16+
1517
import os
1618
import sys
1719

misc/actions_stubs.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
#!/usr/bin/env python3
2+
3+
from __future__ import annotations
4+
25
import os
36
import shutil
47
from typing import Any, Tuple

misc/analyze_cache.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/usr/bin/env python
22

3+
from __future__ import annotations
4+
35
import json
46
import os
57
import os.path

misc/apply-cache-diff.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
many cases instead of full cache artifacts.
66
"""
77

8+
from __future__ import annotations
9+
810
import argparse
911
import json
1012
import os

misc/async_matrix.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
testFullCoroutineMatrix in test-data/unit/check-async-await.test.
66
"""
77

8+
from __future__ import annotations
9+
810
import sys
911
from types import coroutine
1012
from typing import Any, Awaitable, Generator, Iterator
@@ -35,7 +37,7 @@ async def decorated_coroutine() -> int:
3537
class It(Iterator[str]):
3638
stop = False
3739

38-
def __iter__(self) -> "It":
40+
def __iter__(self) -> It:
3941
return self
4042

4143
def __next__(self) -> str:

misc/cherry-pick-typeshed.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
python3 misc/cherry-pick-typeshed.py --typeshed-dir dir hash
66
"""
77

8+
from __future__ import annotations
9+
810
import argparse
911
import os.path
1012
import re

misc/convert-cache.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
See mypy/metastore.py for details.
66
"""
77

8+
from __future__ import annotations
9+
810
import os
911
import sys
1012

misc/diff-cache.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
many cases instead of full cache artifacts.
66
"""
77

8+
from __future__ import annotations
9+
810
import argparse
911
import json
1012
import os

misc/dump-ast.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
Parse source files and print the abstract syntax trees.
44
"""
55

6+
from __future__ import annotations
7+
68
import argparse
79
import sys
810
from typing import Tuple

0 commit comments

Comments
 (0)