From 40f151e54e75b5ad57856675b4c4c70247d0cd9c Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 25 Aug 2023 12:40:56 -0700 Subject: [PATCH] [pre-commit.ci] pre-commit autoupdate (#340) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [pre-commit.ci] pre-commit autoupdate updates: - [github.com/abravalheri/validate-pyproject: v0.13 → v0.14](https://github.com/abravalheri/validate-pyproject/compare/v0.13...v0.14) - [github.com/astral-sh/ruff-pre-commit: v0.0.284 → v0.0.285](https://github.com/astral-sh/ruff-pre-commit/compare/v0.0.284...v0.0.285) * Fix lint error --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Kevin Phoenix --- .pre-commit-config.yaml | 4 ++-- pyvex/expr.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 674d2ef1..f21fb1de 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,7 +5,7 @@ repos: # - repo: https://github.com/abravalheri/validate-pyproject - rev: v0.13 + rev: v0.14 hooks: - id: validate-pyproject fail_fast: true @@ -66,7 +66,7 @@ repos: args: [--py38-plus] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.0.284 + rev: v0.0.285 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] diff --git a/pyvex/expr.py b/pyvex/expr.py index 8ba87779..ff2f07e6 100644 --- a/pyvex/expr.py +++ b/pyvex/expr.py @@ -70,7 +70,7 @@ def replace_expression(self, replacements): v = getattr(self, k) if isinstance(v, IRExpr) and v in replacements: setattr(self, k, replacements.get(v)) - elif type(v) is list: + elif isinstance(v, list): # Replace the instance in the list for i, expr_ in enumerate(v): if isinstance(expr_, IRExpr) and expr_ in replacements: