Skip to content

Commit 0986b77

Browse files
committed
Ignore UP038 (not recommended)
1 parent 407abef commit 0986b77

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Tools/build/.ruff.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ select = [
2020
ignore = [
2121
"E501", # Line too long
2222
"F541", # f-string without any placeholders
23+
"UP038", # Use `X | Y` in `isinstance` call instead of `(X, Y)`
2324
]
2425

2526
[per-file-target-version]

Tools/build/deepfreeze.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ def generate(self, name: str, obj: object) -> str:
402402
# print(f"Cache hit {key!r:.40}: {self.cache[key]!r:.40}")
403403
return self.cache[key]
404404
self.misses += 1
405-
if isinstance(obj, types.CodeType | umarshal.Code):
405+
if isinstance(obj, (types.CodeType, umarshal.Code)) :
406406
val = self.generate_code(name, obj)
407407
elif isinstance(obj, tuple):
408408
val = self.generate_tuple(name, obj)

0 commit comments

Comments
 (0)