Skip to content

Commit fbe591f

Browse files
authored
Add py.typed (#260)
* Hide pandas implementation during type checking * 3.8 * use py.typed * enable reportIncompleteStub
1 parent 15d2775 commit fbe591f

File tree

5 files changed

+16
-10
lines changed

5 files changed

+16
-10
lines changed

pandas-stubs/core/dtypes/generic.pyi

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
from pandas import (
2+
DataFrame,
3+
Index,
4+
Series,
5+
)
6+
from pandas.core.arrays import ExtensionArray
7+
from pandas.core.generic import NDFrame
8+
9+
ABCIndex = type[Index]
10+
11+
ABCNDFrame = type[NDFrame]
12+
ABCSeries = type[Series]
13+
ABCDataFrame = type[DataFrame]
14+
15+
ABCExtensionArray = type[ExtensionArray]

pandas-stubs/core/groupby/groupby.pyi

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ from pandas.core.base import (
77
from pandas.core.frame import DataFrame
88
from pandas.core.generic import NDFrame
99
from pandas.core.groupby import ops
10-
from pandas.core.groupby.indexing import GroupByIndexingMixin
1110
from pandas.core.indexes.api import Index
1211
from pandas.core.series import Series
1312

@@ -23,7 +22,7 @@ class GroupByPlot(PandasObject):
2322
def __call__(self, *args, **kwargs): ...
2423
def __getattr__(self, name: str): ...
2524

26-
class BaseGroupBy(PandasObject, SelectionMixin[NDFrameT], GroupByIndexingMixin):
25+
class BaseGroupBy(PandasObject, SelectionMixin[NDFrameT]):
2726
level = ...
2827
as_index = ...
2928
keys = ...

pandas-stubs/py.typed

Whitespace-only changes.

pandas-stubs/util/__init__.pyi

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,3 @@ from ._decorators import (
88
Substitution as Substitution,
99
cache_readonly as cache_readonly,
1010
)
11-
12-
def __getattr__(name): ...
13-
14-
class _testing:
15-
def __getattr__(self, item): ...
16-
17-
testing = ...

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,6 @@ typeCheckingMode = "strict"
174174
stubPath = "."
175175
include = ["tests", "pandas-stubs"]
176176
# disable subset of strict
177-
reportIncompleteStub = false
178177
reportInconsistentConstructor = false
179178
reportMissingParameterType = false
180179
reportMissingTypeArgument = false

0 commit comments

Comments
 (0)