Skip to content

Commit 5fba078

Browse files
authored
1 parent c8ebc75 commit 5fba078

File tree

9 files changed

+10
-10
lines changed

9 files changed

+10
-10
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ repos:
1111
- id: black
1212
exclude: '^(test-data/)'
1313
- repo: https://github.com/astral-sh/ruff-pre-commit
14-
rev: v0.2.0 # must match test-requirements.txt
14+
rev: v0.6.9 # must match test-requirements.txt
1515
hooks:
1616
- id: ruff
1717
args: [--exit-non-zero-on-fix]

mypy/fastparse.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2033,7 +2033,7 @@ def visit_UnaryOp(self, n: UnaryOp) -> Type:
20332033
if (
20342034
isinstance(typ, RawExpressionType)
20352035
# Use type() because we do not want to allow bools.
2036-
and type(typ.literal_value) is int # noqa: E721
2036+
and type(typ.literal_value) is int
20372037
):
20382038
if isinstance(n.op, USub):
20392039
typ.literal_value *= -1

mypy/ipc.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,8 @@
1717

1818
if sys.platform == "win32":
1919
# This may be private, but it is needed for IPC on Windows, and is basically stable
20-
import ctypes
21-
2220
import _winapi
21+
import ctypes
2322

2423
_IPCHandle = int
2524

mypy/server/astmerge.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ def replacement_map_from_symbol_table(
160160
):
161161
new_node = new[name]
162162
if (
163-
type(new_node.node) == type(node.node) # noqa: E721
163+
type(new_node.node) == type(node.node)
164164
and new_node.node
165165
and node.node
166166
and new_node.node.fullname == node.node.fullname

mypy/stubtest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -700,7 +700,7 @@ def _verify_arg_default_value(
700700
stub_default != runtime_arg.default
701701
# We want the types to match exactly, e.g. in case the stub has
702702
# True and the runtime has 1 (or vice versa).
703-
or type(stub_default) is not type(runtime_arg.default) # noqa: E721
703+
or type(stub_default) is not type(runtime_arg.default)
704704
)
705705
):
706706
yield (

mypy/util.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,8 @@
1515
from typing_extensions import Literal
1616

1717
try:
18-
import curses
19-
2018
import _curses # noqa: F401
19+
import curses
2120

2221
CURSES_ENABLED = True
2322
except ImportError:

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,10 @@ ignore = [
6666
"E2", # conflicts with black
6767
"E402", # module level import not at top of file
6868
"E501", # conflicts with black
69+
"E721", # Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
6970
"E731", # Do not assign a `lambda` expression, use a `def`
7071
"E741", # Ambiguous variable name
72+
"UP031", # Use format specifiers instead of percent format
7173
"UP032", # 'f-string always preferable to format' is controversial
7274
"C416", # There are a few cases where it's nice to have names for the dict items
7375
]

test-requirements.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ psutil>=4.0
1212
pytest>=8.1.0
1313
pytest-xdist>=1.34.0
1414
pytest-cov>=2.10.0
15-
ruff==0.2.0 # must match version in .pre-commit-config.yaml
15+
ruff==0.6.9 # must match version in .pre-commit-config.yaml
1616
setuptools>=65.5.1
1717
tomli>=1.1.0 # needed even on py311+ so the self check passes with --python-version 3.8

test-requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ pytest-cov==4.1.0
4545
# via -r test-requirements.in
4646
pytest-xdist==3.3.1
4747
# via -r test-requirements.in
48-
ruff==0.2.0
48+
ruff==0.6.9
4949
# via -r test-requirements.in
5050
tomli==2.0.1
5151
# via -r test-requirements.in

0 commit comments

Comments
 (0)