Skip to content

Commit b2d1c85

Browse files
authored
Fix many small mypy issues (#364)
1 parent 3458a9c commit b2d1c85

File tree

5 files changed

+8
-20
lines changed

5 files changed

+8
-20
lines changed

pyproject.toml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -125,13 +125,10 @@ disable_error_code = [
125125
# Not all imports in these stubs are gonna be typed
126126
"import-untyped",
127127
# TODO
128-
"assert-type",
129-
"assignment",
130-
"attr-defined",
131-
"misc",
132-
"no-redef",
133-
"override",
134-
"return",
135-
"valid-type",
136-
"var-annotated",
128+
"valid-type", # 967 errors in 115 files
129+
"override", # 790 errors in 220 files
130+
"assignment", # 773 errors in 172 files
131+
"misc", # 692 errors in 132 files
132+
"attr-defined", # 202 errors in 75 files
133+
"assert-type", # 6 errors in 1 file
137134
]

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
@@ -15,6 +15,4 @@ SYMPY_CACHE_SIZE = ...
1515

1616
def cacheit(func: _CallableT) -> _CallableT: ...
1717
def cached_property(func) -> property: ...
18-
def lazy_function(module: str, name: str) -> Callable:
19-
class LazyFunctionMeta(type): ...
20-
class LazyFunction(metaclass=LazyFunctionMeta): ...
18+
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)