Skip to content

Commit 8d16504

Browse files
authored
CI/TYP: bump mypy and pyright (pandas-dev#47806)
* CI/TYP: bump mypy and pyright * pyright 1.1.264
1 parent 3889d85 commit 8d16504

File tree

6 files changed

+9
-6
lines changed

6 files changed

+9
-6
lines changed

.pre-commit-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ repos:
9393
types: [python]
9494
stages: [manual]
9595
additional_dependencies: &pyright_dependencies
96-
- pyright@1.1.262
96+
- pyright@1.1.264
9797
- id: pyright_reportGeneralTypeIssues
9898
# note: assumes python env is setup and activated
9999
name: pyright reportGeneralTypeIssues

doc/source/whatsnew/v1.5.0.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ If installed, we now require:
418418
+=================+=================+==========+=========+
419419
| numpy | 1.19.5 | X | X |
420420
+-----------------+-----------------+----------+---------+
421-
| mypy (dev) | 0.960 | | X |
421+
| mypy (dev) | 0.971 | | X |
422422
+-----------------+-----------------+----------+---------+
423423
| beautifulsoup4 | 4.9.3 | | X |
424424
+-----------------+-----------------+----------+---------+

environment.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ dependencies:
8888
- flake8-bugbear=21.3.2 # used by flake8, find likely bugs
8989
- flake8-comprehensions=3.7.0 # used by flake8, linting of unnecessary comprehensions
9090
- isort>=5.2.1 # check that imports are in the right order
91-
- mypy=0.960
91+
- mypy=0.971
9292
- pre-commit>=2.15.0
9393
- pycodestyle # used by flake8
9494
- pyupgrade

pandas/core/computation/expr.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -774,7 +774,9 @@ def __init__(
774774

775775
@disallow(_unsupported_nodes | _python_not_supported | frozenset(["Not"]))
776776
class PythonExprVisitor(BaseExprVisitor):
777-
def __init__(self, env, engine, parser, preparser=lambda x: x) -> None:
777+
def __init__(
778+
self, env, engine, parser, preparser=lambda source, f=None: source
779+
) -> None:
778780
super().__init__(env, engine, parser, preparser=preparser)
779781

780782

pandas/core/computation/ops.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
from typing import (
1111
Callable,
1212
Iterable,
13+
Literal,
1314
)
1415

1516
import numpy as np
@@ -552,7 +553,7 @@ class UnaryOp(Op):
552553
* If no function associated with the passed operator token is found.
553554
"""
554555

555-
def __init__(self, op: str, operand) -> None:
556+
def __init__(self, op: Literal["+", "-", "~", "not"], operand) -> None:
556557
super().__init__(op, (operand,))
557558
self.operand = operand
558559

requirements-dev.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ flake8==4.0.1
6767
flake8-bugbear==21.3.2
6868
flake8-comprehensions==3.7.0
6969
isort>=5.2.1
70-
mypy==0.960
70+
mypy==0.971
7171
pre-commit>=2.15.0
7272
pycodestyle
7373
pyupgrade

0 commit comments

Comments
 (0)