Skip to content

Commit a721313

Browse files
authored
Remove bogus statements from type stubs (#352)
1 parent 3be0222 commit a721313

File tree

29 files changed

+11
-586
lines changed

29 files changed

+11
-586
lines changed

stubs/matplotlib/transforms.pyi

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ class TransformNode:
2626
class BboxBase(TransformNode):
2727
is_bbox = ...
2828
is_affine = ...
29-
if DEBUG: ...
3029

3130
def frozen(self): ...
3231
def __array__(self, *args, **kwargs): ...

stubs/networkx/algorithms/isomorphism/matchhelpers.pyi

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,7 @@ categorical_edge_match = ...
3131
def categorical_multiedge_match(attr: str | ArrayLike, default): ...
3232

3333
# Docstrings for categorical functions.
34-
categorical_node_match.__doc__ = ...
35-
categorical_edge_match.__doc__ = ...
3634
tmpdoc = ...
37-
tmpdoc = ...
38-
categorical_multiedge_match.__doc__ = ...
3935

4036
numerical_doc: str = ...
4137

@@ -56,11 +52,7 @@ def numerical_multiedge_match(
5652
): ...
5753

5854
# Docstrings for numerical functions.
59-
numerical_node_match.__doc__ = ...
60-
numerical_edge_match.__doc__ = ...
61-
tmpdoc = ...
6255
tmpdoc = ...
63-
numerical_multiedge_match.__doc__ = ...
6456

6557
generic_doc: str = ...
6658

@@ -69,7 +61,3 @@ def generic_node_match(attr: str | ArrayLike, default, op: ArrayLike | Callable)
6961
generic_edge_match = ...
7062

7163
def generic_multiedge_match(attr: str | ArrayLike, default, op: ArrayLike | Callable): ...
72-
73-
# Docstrings for numerical functions.
74-
generic_node_match.__doc__ = ...
75-
generic_edge_match.__doc__ = ...

stubs/networkx/algorithms/tree/branchings.pyi

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -112,14 +112,6 @@ docstring_branching: str = ...
112112

113113
docstring_arborescence = ...
114114

115-
maximum_branching.__doc__ = ...
116-
117-
minimum_branching.__doc__ = ...
118-
119-
maximum_spanning_arborescence.__doc__ = ...
120-
121-
minimum_spanning_arborescence.__doc__ = ...
122-
123115
class ArborescenceIterator:
124116
def __init__(
125117
self,

stubs/networkx/classes/digraph.pyi

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,6 @@ class DiGraph(Graph):
5151
# alias out_edges to edges
5252
@cached_property
5353
def out_edges(self) -> OutEdgeView: ...
54-
55-
out_edges.__doc__ = ...
56-
5754
@cached_property
5855
def in_edges(self) -> InEdgeView: ...
5956
@cached_property

stubs/networkx/classes/multidigraph.pyi

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,6 @@ class MultiDiGraph(MultiGraph, DiGraph):
3333
# alias out_edges to edges
3434
@cached_property
3535
def out_edges(self) -> OutMultiEdgeView: ...
36-
37-
out_edges.__doc__ = ...
38-
3936
@cached_property
4037
def in_edges(self) -> InMultiEdgeView: ...
4138
@cached_property

stubs/networkx/readwrite/gexf.pyi

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,7 @@ def generate_gexf(G: Graph, encoding="utf-8", prettyprint=True, version="1.2draf
1212
def read_gexf(path, node_type=None, relabel=False, version="1.2draft"): ...
1313

1414
class GEXF:
15-
versions: dict = ...
16-
d: dict = ...
17-
versions["1.1draft"] = ...
18-
d: dict = ...
19-
versions["1.2draft"] = ...
15+
versions: dict
2016

2117
def construct_types(self): ...
2218

stubs/skimage/__init__.pyi

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ from ._shared import lazy as lazy
66
from ._shared.tester import PytestTester as PytestTester # noqa
77
from ._shared.version_requirements import ensure_python_version as ensure_python_version
88

9-
__getattr__, __lazy_dir__, _ = ...
9+
__getattr__ = ...
10+
__lazy_dir__ = ...
1011

1112
def __dir__(): ...
1213

stubs/skimage/data/__init__.pyi

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
from .._shared import lazy as lazy
22

3-
__getattr__, __dir__, __all__ = ...
3+
__getattr__ = ...
4+
__dir__ = ...
5+
__all__ = ... # pyright: ignore[reportUnsupportedDunderAll] # TODO

stubs/skimage/data/_fetchers.pyi

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ skimage_distribution_dir = ...
1515
def _has_hash(path, expected_hash): ...
1616
def create_image_fetcher(): ...
1717

18-
image_fetcher, data_dir = ...
18+
image_fetcher = ...
19+
data_dir = ...
1920

2021
def _skip_pytest_case_requiring_pooch(data_filename): ...
2122
def _fetch(data_filename): ...

stubs/sklearn/cross_decomposition/_pls.pyi

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,6 @@ class PLSRegression(_PLS):
7070
x_weights_: ndarray = ...
7171

7272
_parameter_constraints: ClassVar[dict] = ...
73-
for param in ("deflation_mode", "mode", "algorithm"):
74-
pass
7573

7674
# This implementation provides the same results that 3 PLS packages
7775
# provided in the R language (R-project):
@@ -104,8 +102,6 @@ class PLSCanonical(_PLS):
104102
x_weights_: ndarray = ...
105103

106104
_parameter_constraints: ClassVar[dict] = ...
107-
for param in ("deflation_mode", "mode"):
108-
pass
109105

110106
# This implementation provides the same results that the "plspm" package
111107
# provided in the R language (R-project), using the function plsca(X, Y).
@@ -140,8 +136,6 @@ class CCA(_PLS):
140136
x_weights_: ndarray = ...
141137

142138
_parameter_constraints: ClassVar[dict] = ...
143-
for param in ("deflation_mode", "mode", "algorithm"):
144-
pass
145139

146140
def __init__(
147141
self,

0 commit comments

Comments
 (0)