diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index ce42d37..44048ab 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -9,7 +9,7 @@ jobs: strategy: matrix: - python-version: [ "3.10", "3.11", "3.12" ] + python-version: [ "3.12" ] steps: - name: Checkout source repository diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3f2bb71..a91f39c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,17 +4,21 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.4.0 hooks: + - id: check-executables-have-shebangs # Check for invalid files - id: check-toml # Check Python files + - id: end-of-file-fixer - id: fix-encoding-pragma args: [--remove] - - id: end-of-file-fixer - id: mixed-line-ending args: [--fix=lf] - id: check-executables-have-shebangs + - id: requirements-txt-fixer + - id: trailing-whitespace + args: [--markdown-linebreak-ext=md] - repo: https://github.com/psf/black - rev: 23.9.1 + rev: 24.4.2 hooks: - id: black - repo: https://github.com/asottile/blacken-docs @@ -23,7 +27,7 @@ repos: - id: blacken-docs args: [--line-length=120] - repo: https://github.com/PyCQA/isort - rev: 5.12.0 + rev: 5.13.2 hooks: - id: isort - repo: local @@ -35,7 +39,7 @@ repos: types: [python] require_serial: true - repo: https://github.com/pre-commit/mirrors-mypy - rev: 'v1.5.1' + rev: 'v1.10.0' hooks: - id: mypy additional_dependencies: [types-simplejson] diff --git a/fluke5440b_async/__init__.py b/fluke5440b_async/__init__.py index fc64a2f..01c11a9 100644 --- a/fluke5440b_async/__init__.py +++ b/fluke5440b_async/__init__.py @@ -2,6 +2,7 @@ This is an asyncIO library for the Fluke 5440B calibrator. It manages all functions of the calibrator and takes care of the internal state. """ + from ._version import __version__ from .enums import DeviceState, ErrorCode, ModeType, SeparatorType, TerminatorType from .flags import SerialPollFlags, SrqMask, StatusFlags diff --git a/fluke5440b_async/enums.py b/fluke5440b_async/enums.py index d871cbb..1dbb206 100644 --- a/fluke5440b_async/enums.py +++ b/fluke5440b_async/enums.py @@ -1,4 +1,5 @@ """Enums are used to represent the device functions and settings.""" + from __future__ import annotations from enum import Enum diff --git a/fluke5440b_async/errors.py b/fluke5440b_async/errors.py index b962f23..d020544 100644 --- a/fluke5440b_async/errors.py +++ b/fluke5440b_async/errors.py @@ -1,4 +1,5 @@ """Custom errors raised by the Fluke 5440B.""" + from .enums import ErrorCode, SelfTestErrorCode diff --git a/fluke5440b_async/flags.py b/fluke5440b_async/flags.py index bb5d218..204d84f 100644 --- a/fluke5440b_async/flags.py +++ b/fluke5440b_async/flags.py @@ -1,4 +1,5 @@ """Flags are used for the status registers returned by the device.""" + from __future__ import annotations from enum import Flag diff --git a/pyproject.toml b/pyproject.toml index 556f4dc..062530d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [project] -name = "fluke5440b_async" +name = "fluke5440b-async" authors = [ { name="Patrick Baus", email="patrick.baus@physik.tu-darmstadt.de" }, ] @@ -49,7 +49,7 @@ doc = [ ] test = [ - "mypy", "pylint", "gpib-ctypes", "prologix-gpib-async" + "mypy", "pylint", "gpib-ctypes", "prologix-gpib-async", "setuptools", ] [tool.pylint.'MESSAGES CONTROL']