From 5ccba55738c9d7d142745b14a219205203e93b6d Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 15 Jul 2024 21:56:21 +0200 Subject: [PATCH] [pre-commit.ci] pre-commit autoupdate (#5599) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [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 --- .pre-commit-config.yaml | 2 +- xonsh/pytest/tools.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e31402975..56b2daffe 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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] diff --git a/xonsh/pytest/tools.py b/xonsh/pytest/tools.py index 63caa19a8..41a1c5211 100644 --- a/xonsh/pytest/tools.py +++ b/xonsh/pytest/tools.py @@ -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"