From 8220aaddab19446a3108a79329fe43d4f6b67955 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 7 Sep 2023 12:13:55 -0500 Subject: [PATCH] Update ruff to v0.0.287 (#42) * Update ruff to v0.0.287 * Use isinstance --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Alex Ruddick --- .pre-commit-config.yaml | 2 +- ismatec/driver.py | 2 +- ismatec/util.py | 2 +- setup.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8f24edf..5168acd 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -10,7 +10,7 @@ repos: - id: check-added-large-files - id: check-json - repo: https://github.com/charliermarsh/ruff-pre-commit - rev: v0.0.282 + rev: v0.0.287 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] diff --git a/ismatec/driver.py b/ismatec/driver.py index 74575da..8618fd3 100644 --- a/ismatec/driver.py +++ b/ismatec/driver.py @@ -63,7 +63,7 @@ async def __aexit__(self, *args) -> None: def _set_running_status(self, status, channel) -> None: """Manually set running status.""" - if type(channel) == list: + if isinstance(channel, list): logger.debug(f'manually setting running status {status} on channels {channel}') for ch in channel: self.running[ch] = status diff --git a/ismatec/util.py b/ismatec/util.py index 2a482bc..a7a6271 100644 --- a/ismatec/util.py +++ b/ismatec/util.py @@ -145,7 +145,7 @@ def __init__(self, address=None, baudrate=9600, timeout=.15, bytesize=serial.EIG 'stopbits': stopbits, 'parity': parity, 'timeout': timeout} - assert type(self.address) == str + assert isinstance(self.address, str) self.ser = serial.Serial(self.address, **self.serial_details) def read(self, length: int): diff --git a/setup.py b/setup.py index 0432386..bcc1f00 100644 --- a/setup.py +++ b/setup.py @@ -27,7 +27,7 @@ 'pytest-xdist==3.*', 'mypy==1.5.1', 'types-pyserial', - 'ruff==0.0.282', + 'ruff==0.0.287', ], }, entry_points={