mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-04 00:14:41 +01:00
[pre-commit.ci] pre-commit autoupdate (#5599)
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/astral-sh/ruff-pre-commit: v0.5.1 → v0.5.2](https://github.com/astral-sh/ruff-pre-commit/compare/v0.5.1...v0.5.2) * Update tools.py --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Andy Kipp <anki-code@users.noreply.github.com>
This commit is contained in:
parent
5e1c2db4f3
commit
5ccba55738
2 changed files with 3 additions and 3 deletions
|
@ -8,7 +8,7 @@ default_language_version:
|
|||
repos:
|
||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||
# Ruff version.
|
||||
rev: 'v0.5.1'
|
||||
rev: 'v0.5.2'
|
||||
hooks:
|
||||
- id: ruff
|
||||
args: [., --fix, --exit-non-zero-on-fix]
|
||||
|
|
|
@ -104,7 +104,7 @@ class DummyHistory:
|
|||
|
||||
def nodes_equal(x, y):
|
||||
__tracebackhide__ = True
|
||||
assert type(x) == type(
|
||||
assert type(x) is type(
|
||||
y
|
||||
), f"Ast nodes do not have the same type: '{type(x)}' != '{type(y)}' "
|
||||
if isinstance(x, ast.Constant):
|
||||
|
@ -125,7 +125,7 @@ def nodes_equal(x, y):
|
|||
if isinstance(x, ast.Constant) and xname == "kind":
|
||||
continue
|
||||
assert (
|
||||
type(xval) == type(yval)
|
||||
type(xval) is type(yval)
|
||||
), f"Ast nodes fields differ : {xname} (of type {type(xval)}) != {yname} (of type {type(yval)})"
|
||||
for xchild, ychild in zip(ast.iter_child_nodes(x), ast.iter_child_nodes(y)):
|
||||
assert nodes_equal(xchild, ychild), "Ast node children differs"
|
||||
|
|
Loading…
Add table
Reference in a new issue