Skip to content

Add py.typed #260

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Sep 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions pandas-stubs/core/dtypes/generic.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
from pandas import (
DataFrame,
Index,
Series,
)
from pandas.core.arrays import ExtensionArray
from pandas.core.generic import NDFrame

ABCIndex = type[Index]

ABCNDFrame = type[NDFrame]
ABCSeries = type[Series]
ABCDataFrame = type[DataFrame]

ABCExtensionArray = type[ExtensionArray]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically need only ABCExtensionArray and ABCSeries for the current stubs.

3 changes: 1 addition & 2 deletions pandas-stubs/core/groupby/groupby.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ from pandas.core.base import (
from pandas.core.frame import DataFrame
from pandas.core.generic import NDFrame
from pandas.core.groupby import ops
from pandas.core.groupby.indexing import GroupByIndexingMixin
from pandas.core.indexes.api import Index
from pandas.core.series import Series

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

class BaseGroupBy(PandasObject, SelectionMixin[NDFrameT], GroupByIndexingMixin):
class BaseGroupBy(PandasObject, SelectionMixin[NDFrameT]):
level = ...
as_index = ...
keys = ...
Expand Down
Empty file added pandas-stubs/py.typed
Empty file.
7 changes: 0 additions & 7 deletions pandas-stubs/util/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,3 @@ from ._decorators import (
Substitution as Substitution,
cache_readonly as cache_readonly,
)

def __getattr__(name): ...

class _testing:
def __getattr__(self, item): ...

testing = ...
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,6 @@ typeCheckingMode = "strict"
stubPath = "."
include = ["tests", "pandas-stubs"]
# disable subset of strict
reportIncompleteStub = false
reportInconsistentConstructor = false
reportMissingParameterType = false
reportMissingTypeArgument = false
Expand Down