Skip to content

Commit e131ec7

Browse files
committed
Fix many small mypy issues
1 parent dcb5c8c commit e131ec7

File tree

5 files changed

+11
-23
lines changed

5 files changed

+11
-23
lines changed

pyproject.toml

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -126,16 +126,13 @@ disable_error_code = [
126126
# Not all imports in these stubs are gonna be typed
127127
"import-untyped",
128128
# TODO
129-
"assert-type",
130-
"assignment",
131-
"attr-defined",
132-
"import-not-found",
133-
"misc",
134-
"name-defined",
135-
"no-redef",
136-
"operator",
137-
"override",
138-
"return",
139-
"valid-type",
140-
"var-annotated",
129+
"valid-type", # 967 errors in 115 files
130+
"override", # 790 errors in 220 files
131+
"assignment", # 773 errors in 172 files
132+
"misc", # 692 errors in 132 files
133+
"attr-defined", # 202 errors in 75 files
134+
"operator", # 118 errors in 35 files
135+
"name-defined", # 15 errors in 1 file
136+
"assert-type", # 6 errors in 1 file
137+
"import-not-found", # 5 errors in 5 files
141138
]

stubs/matplotlib/ft2font.pyi

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# Python: 3.8.8 (tags/v3.8.8:024d805, Feb 19 2021, 13:18:16) [MSC v.1928 64 bit (AMD64)]
22
# Library: matplotlib, version: 3.4.0
33
# Module: matplotlib.ft2font, version: unspecified
4-
import builtins as _mod_builtins
54
import typing
65

76
BOLD: int
@@ -123,11 +122,7 @@ MULTIPLE_MASTERS: int
123122
SCALABLE: int
124123
SFNT: int
125124
VERTICAL: int
126-
__doc__: typing.Any
127-
__file__: str
128125
__freetype_build_type__: str
129126
__freetype_version__: str
130-
__name__: str
131-
__package__: str
132127

133128
def __getattr__(name) -> typing.Any: ...

stubs/networkx/classes/ordered.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ from .graph import Graph
66
from .multidigraph import MultiDiGraph
77
from .multigraph import MultiGraph
88

9-
__all__ = []
9+
__all__: list[str] = []
1010

1111
class OrderedGraph(Graph):
1212
node_dict_factory = ...

stubs/sympy-stubs/core/cache.pyi

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,4 @@ SYMPY_CACHE_SIZE = ...
1313
cacheit = ...
1414

1515
def cached_property(func) -> property: ...
16-
def lazy_function(module: str, name: str) -> Callable:
17-
class LazyFunctionMeta(type): ...
18-
class LazyFunction(metaclass=LazyFunctionMeta): ...
16+
def lazy_function(module: str, name: str) -> Callable: ...

stubs/vispy/ext/cocoapy.pyi

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -364,8 +364,6 @@ kCGImageAlphaNoneSkipLast: int = ...
364364
kCGImageAlphaNoneSkipFirst: int = ...
365365
kCGImageAlphaOnly: int = ...
366366

367-
kCGImageAlphaPremultipliedLast: int = ...
368-
369367
kCGBitmapAlphaInfoMask: int = ...
370368
kCGBitmapFloatComponents = ...
371369

0 commit comments

Comments
 (0)