diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index dfa4a4c..1c72d21 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,14 +1,14 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.6.9 + rev: v0.7.1 hooks: # Run the linter. - id: ruff # Run the formatter. - id: ruff-format - repo: https://github.com/pre-commit/mirrors-mypy - rev: 'v1.11.2' # Use the sha / tag you want to point at + rev: 'v1.13.0' # Use the sha / tag you want to point at hooks: - id: mypy additional_dependencies: [numpy, typing_extensions] \ No newline at end of file diff --git a/docs/source/conf.py b/docs/source/conf.py index 8bdccf7..d48732b 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -11,8 +11,6 @@ # serve to show the default. import datetime -import os -import sys from importlib.metadata import version as get_version # If extensions (or modules to document with autodoc) are in another directory, @@ -100,19 +98,6 @@ # a list of builtin themes. html_theme = "sphinx_rtd_theme" -on_rtd = os.environ.get("READTHEDOCS", None) == "True" - -if not on_rtd: # only import and set the theme if we're building docs locally - try: - import sphinx_rtd_theme - except ImportError: - print( - "\n\nTheme not found. Please install Sphinx Read The Docs Themes using:\n\n" - " pip install sphinx_rtd_theme\n" - ) - sys.exit(1) - html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] - # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. diff --git a/pyvisa_py/protocols/hislip.py b/pyvisa_py/protocols/hislip.py index 78f54a8..8df7723 100644 --- a/pyvisa_py/protocols/hislip.py +++ b/pyvisa_py/protocols/hislip.py @@ -232,7 +232,7 @@ def __init__( payload = ( (": " + str(receive_exact(sock, self.payload_length))) if self.payload_length > 0 - else b"" + else "" ) raise RuntimeError( "expected message type '%s', received '%s%s'" diff --git a/pyvisa_py/protocols/usbtmc.py b/pyvisa_py/protocols/usbtmc.py index fe50cfe..90ac22d 100644 --- a/pyvisa_py/protocols/usbtmc.py +++ b/pyvisa_py/protocols/usbtmc.py @@ -167,7 +167,7 @@ class USBRaw(object): """ #: Configuration number to be used. If None, the default will be used. - CONFIGURATION = None + CONFIGURATION: int | None = None #: Interface index it be used INTERFACE = (0, 0)