Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#460)
Browse files Browse the repository at this point in the history
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.6.9 → v0.7.0](astral-sh/ruff-pre-commit@v0.6.9...v0.7.0)
- [github.com/pre-commit/mirrors-mypy: v1.11.2 → v1.12.1](pre-commit/mirrors-mypy@v1.11.2...v1.12.1)

* fix typing issue and bump versions

* fix docs building

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: MatthieuDartiailh <m.dartiailh@gmail.com>
  • Loading branch information
pre-commit-ci[bot] and MatthieuDartiailh authored Oct 28, 2024
1 parent ba41d64 commit 64296aa
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 19 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -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]
15 changes: 0 additions & 15 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion pyvisa_py/protocols/hislip.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'"
Expand Down
2 changes: 1 addition & 1 deletion pyvisa_py/protocols/usbtmc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 64296aa

Please sign in to comment.