Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -134,4 +134,4 @@ dmypy.json
# Pyre type checker
.pyre/
/poetry.lock
.idea/**/*
.idea/**/*
9 changes: 5 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ ci:
autofix_prs: false
repos:
- repo: https://github.com/python/black
rev: 24.3.0
rev: 25.1.0
hooks:
- id: black
- repo: https://github.com/PyCQA/isort
rev: 5.13.2
rev: 6.0.1
hooks:
- id: isort
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.3.5
rev: v0.11.5
hooks:
- id: ruff
args: [
Expand All @@ -23,7 +23,8 @@ repos:
--fix
]
- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
rev: v2.4.1
hooks:
- id: codespell
additional_dependencies: [ tomli ]
args: [-L, "THIRDPARTY"]
8 changes: 4 additions & 4 deletions pandas-stubs/_libs/tslibs/timestamps.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,14 @@ class Timestamp(datetime, SupportsIndex):
@property
def fold(self) -> int: ...

if sys.version_info < (3, 12):
@classmethod
def fromtimestamp(cls, t: float, tz: _tzinfo | str | None = ...) -> Self: ...
else:
if sys.version_info >= (3, 12):
@classmethod
def fromtimestamp( # pyright: ignore[reportIncompatibleMethodOverride]
cls, t: float, tz: _tzinfo | str | None = ...
) -> Self: ...
else:
@classmethod
def fromtimestamp(cls, t: float, tz: _tzinfo | str | None = ...) -> Self: ...

@classmethod
def utcfromtimestamp(cls, ts: float) -> Self: ...
Expand Down
12 changes: 6 additions & 6 deletions pandas-stubs/_typing.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -414,15 +414,15 @@ AnyStr_con = TypeVar("AnyStr_con", str, bytes, contravariant=True)
class BaseBuffer(Protocol):
@property
def mode(self) -> str: ...
def seek(self, __offset: int, __whence: int = ...) -> int: ...
def seek(self, offset: int, whence: int = ..., /) -> int: ...
def seekable(self) -> bool: ...
def tell(self) -> int: ...

class ReadBuffer(BaseBuffer, Protocol[AnyStr_cov]):
def read(self, __n: int = ...) -> AnyStr_cov: ...
def read(self, n: int = ..., /) -> AnyStr_cov: ...

class WriteBuffer(BaseBuffer, Protocol[AnyStr_con]):
def write(self, __b: AnyStr_con) -> Any: ...
def write(self, b: AnyStr_con, /) -> Any: ...
def flush(self) -> Any: ...

class ReadPickleBuffer(ReadBuffer[bytes], Protocol):
Expand Down Expand Up @@ -766,10 +766,10 @@ CSVEngine: TypeAlias = Literal["c", "python", "pyarrow", "python-fwf"]
# QUOTE_STRINGS = 4
# QUOTE_NOTNULL = 5
CSVQuotingCompat: TypeAlias = Literal[0, 1, 2, 3]
if sys.version_info < (3, 12):
CSVQuoting: TypeAlias = CSVQuotingCompat
else:
if sys.version_info >= (3, 12):
CSVQuoting: TypeAlias = CSVQuotingCompat | Literal[4, 5]
else:
CSVQuoting: TypeAlias = CSVQuotingCompat

HDFCompLib: TypeAlias = Literal["zlib", "lzo", "bzip2", "blosc"]
ParquetEngine: TypeAlias = Literal["auto", "pyarrow", "fastparquet"]
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ mypy = "1.15.0"
pandas = "2.2.3"
pyarrow = ">=10.0.1"
pytest = ">=7.1.2"
pyright = ">=1.1.396,!=1.1.398"
pyright = "1.1.396"
poethepoet = ">=0.16.5"
loguru = ">=0.6.0"
typing-extensions = ">=4.4.0"
Expand Down Expand Up @@ -219,6 +219,7 @@ reportUnknownParameterType = false
reportUnknownVariableType = false
reportUnusedVariable = false
reportPrivateUsage = false
reportPrivateImportUsage = false
Copy link
Collaborator

Choose a reason for hiding this comment

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

can you remove this

# enable optional checks
reportMissingModuleSource = true
useLibraryCodeForTypes = false
Expand Down
2 changes: 1 addition & 1 deletion tests/test_frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -899,7 +899,7 @@ def gethead(s: pd.Series, y: int) -> pd.Series:
pd.DataFrame,
)
check(
# Note that technicaly it does not make sense
# Note that technically it does not make sense
# to pass a result_type of "broadcast" to a scalar return
assert_type(
df.apply(returns_scalar, axis=1, result_type="broadcast"), pd.DataFrame
Expand Down