Skip to content

Commit ed6748f

Browse files
authored
Stubtest settings: change ignore_missing_stub default to false (#9779)
If you're reading about this commit from an autogenerated changelog entry, this should have no user-visible impact on how the stubs are interpreted by a type checker; it's just an internal change to how typeshed's tests work.
1 parent 3786ab2 commit ed6748f

149 files changed

Lines changed: 156 additions & 284 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.

scripts/create_baseline_stubs.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,7 @@ def create_metadata(stub_dir: str, version: str) -> None:
7171
return
7272
print(f"Writing {filename}")
7373
with open(filename, "w", encoding="UTF-8") as file:
74-
file.write(
75-
f"""\
76-
version = "{version}.*"
77-
78-
[tool.stubtest]
79-
ignore_missing_stub = false
80-
"""
81-
)
74+
file.write(f'version = "{version}.*"')
8275

8376

8477
def add_pyright_exclusion(stub_dir: str) -> None:

stubs/D3DShot/METADATA.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ version = "0.1.*"
22
requires = ["types-Pillow"]
33

44
[tool.stubtest]
5+
ignore_missing_stub = true
56
# TODO: figure out how to run stubtest for this package
67
# (the package pins Pillow in a problematic way)
78
skip = true

stubs/DateTimeRange/METADATA.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
11
version = "2.0.*"
22
requires = ["types-python-dateutil"]
33
obsolete_since = "2.1.0" # Released on 2023-02-19
4-
5-
[tool.stubtest]
6-
ignore_missing_stub = false

stubs/Deprecated/METADATA.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,2 @@
11
version = "1.2.*"
22
requires = []
3-
4-
[tool.stubtest]
5-
ignore_missing_stub = false

stubs/ExifRead/METADATA.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
11
version = "3.0.*"
2-
3-
[tool.stubtest]
4-
ignore_missing_stub = false

stubs/Flask-Cors/METADATA.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
version = "3.0.*"
22
# Requires a version of flask with a `py.typed` file
33
requires = ["Flask>=2.0.0"]
4+
5+
[tool.stubtest]
6+
ignore_missing_stub = true

stubs/Flask-Migrate/METADATA.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
version = "4.0.*"
22
# Requires a version of flask with a `py.typed` file
33
requires = ["Flask>=2.0.0", "types-Flask-SQLAlchemy"]
4+
5+
[tool.stubtest]
6+
ignore_missing_stub = true
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
version = "2.5.*"
22
requires = ["types-SQLAlchemy"]
33
obsolete_since = "3.0.1" # Released on 2022-10-11
4+
5+
[tool.stubtest]
6+
ignore_missing_stub = true

stubs/JACK-Client/METADATA.toml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
version = "0.5.*"
22
# Requires a version of numpy with a `py.typed` file
3-
requires = ["types-cffi", "numpy>=1.20"]
3+
requires = ["numpy>=1.20", "types-cffi"]
44

55
[tool.stubtest]
6-
ignore_missing_stub = false
76
# darwin and win32 are equivalent
8-
platforms = ["linux", "darwin"]
7+
platforms = ["darwin", "linux"]
98
apt_dependencies = ["libjack-dev"]
109
brew_dependencies = ["jack"]
1110
# No need to install on the CI. Leaving here as information for Windows contributors.

stubs/Markdown/METADATA.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
11
version = "3.4.*"
2+
3+
[tool.stubtest]
4+
ignore_missing_stub = true

0 commit comments

Comments
 (0)