Skip to content

Commit efee70a

Browse files
authored
Bump mypy to 1.0 (#9684)
1 parent f7cb7f3 commit efee70a

File tree

37 files changed

+45
-167
lines changed

37 files changed

+45
-167
lines changed

requirements-tests.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ flake8-bugbear==23.1.20; python_version >= "3.8" # must match .pre-commit-confi
55
flake8-noqa==1.3.0; python_version >= "3.8" # must match .pre-commit-config.yaml
66
flake8-pyi==23.1.2; python_version >= "3.8" # must match .pre-commit-config.yaml
77
isort==5.12.0; python_version >= "3.8" # must match .pre-commit-config.yaml
8-
mypy==0.991
8+
mypy==1.0
99
packaging==23.0
1010
pathspec>=0.10.3
1111
pre-commit-hooks==4.4.0 # must match .pre-commit-config.yaml

stdlib/webbrowser.pyi

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,9 @@ if sys.platform == "darwin":
6565
def open(self, url: str, new: int = 0, autoraise: bool = True) -> bool: ...
6666

6767
class MacOSXOSAScript(BaseBrowser): # In runtime this class does not have `name` and `basename`
68+
if sys.version_info >= (3, 11):
69+
def __init__(self, name: str = "default") -> None: ...
70+
else:
71+
def __init__(self, name: str) -> None: ...
72+
6873
def open(self, url: str, new: int = 0, autoraise: bool = True) -> bool: ...
Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,2 @@
11
# Stub-only module.
22
exifread._types
3-
4-
# The following constants are only re-exported at runtime as a side effect
5-
# of Python's import system.
6-
exifread.DEFAULT_STOP_TAG
7-
exifread.classes.DEFAULT_STOP_TAG
8-
exifread.classes.EXIF_TAGS
9-
exifread.classes.FIELD_TYPES
10-
exifread.classes.IGNORE_TAGS
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# temp variable used to define scrotExists by checking if the command "scrot" exists
2+
pyscreeze.whichProc

stubs/cffi/@tests/stubtest_allowlist.txt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,3 @@
22
cffi.(api.)?FFI.CData
33
cffi.(api.)?FFI.CType
44
cffi.(api.)?FFI.buffer
5-
6-
# Exists at runtime, but missing from stubs
7-
cffi.vengine_cpy.__warningregistry__
8-
9-
# Unnecessary re-exports
10-
cffi.cparser.COMMON_TYPES
11-
cffi.verifier.__version_verifier_modules__

stubs/chevron/@tests/stubtest_allowlist.txt

Lines changed: 0 additions & 3 deletions
This file was deleted.

stubs/colorama/@tests/stubtest_allowlist.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,5 @@ colorama.ansi.AnsiStyle.RESET_ALL
4242
colorama.initialise.wrapped_stderr
4343
colorama.initialise.wrapped_stdout
4444

45-
# These are re-exports that are implementation detail:
46-
colorama.ansitowin32.BEL
47-
4845
# Not planning on writing stubs for tests:
4946
colorama.tests.*

stubs/colorama/@tests/stubtest_allowlist_linux.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,5 @@ colorama.winterm.WinColor
33
colorama.winterm.WinStyle
44
colorama.winterm.WinTerm
55

6-
# These are re-exports that are implementation detail:
7-
colorama.ansitowin32.windll
6+
# A re-export that's an implementation detail:
87
colorama.winterm.get_osfhandle

stubs/dateparser/@tests/stubtest_allowlist.txt

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,3 @@ dateparser.search.detection.BaseLanguageDetector.iterate_applicable_languages
66

77
# Timezone and other internal data:
88
dateparser.data.date_translation_data.*
9-
10-
# Re-exports:
11-
dateparser.conf.date_order_chart
12-
dateparser.conf.language_order
13-
dateparser.languages.loader.language_locale_dict
14-
dateparser.languages.loader.language_order
15-
dateparser.languages.locale.ALWAYS_KEEP_TOKENS
16-
dateparser.custom_language_detection.language_mapping.language_map
17-
dateparser.custom_language_detection.fasttext.dateparser_model_home
18-
dateparser.timezone_parser.timezone_info_list

stubs/dockerfile-parse/@tests/stubtest_allowlist.txt

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)