diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b0e2ef4e..f96f8c6b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -39,7 +39,7 @@ repos: - id: remove-tabs - id: forbid-tabs - repo: https://github.com/python-jsonschema/check-jsonschema - rev: aa1acdb72677dfbc5f507d2dfd45d8380bbcc2e0 # frozen: 0.29.3 + rev: 37cd56d9d154dfb0648eaee8efc1040512700c47 # frozen: 0.29.4 hooks: - id: check-readthedocs - id: check-dependabot @@ -52,7 +52,7 @@ repos: - id: actionlint additional_dependencies: [pyflakes, shellcheck-py] - repo: https://github.com/commitizen-tools/commitizen - rev: a3498aba5e94c9f7c4acb529b5e7eb6df65fd053 # frozen: v3.29.1 + rev: bfe422faef54a78ff8c0ce5dea0da053159c9f9d # frozen: v3.30.0 hooks: - id: commitizen stages: [commit-msg] @@ -138,7 +138,7 @@ repos: always_run: true args: [audit, --json, --ignore-code=CVE-2019-8341] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: 75b98813cfb7e663870a28c74366a1e99d7bfe79 # frozen: v0.6.9 + rev: 4edcbde74af0cd9b38e8483828cd9c6cb0755276 # frozen: v0.7.1 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] diff --git a/docs/requirements.txt b/docs/requirements.txt index a3f652c3..177bd4f1 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -3,16 +3,18 @@ beautifulsoup4==4.12.3 ; python_version >= "3.8" and python_version < "4.0" black==24.8.0 ; python_version >= "3.8" and python_version < "4.0" bracex==2.5.post1 ; python_version >= "3.8" and python_version < "4.0" certifi==2024.8.30 ; python_version >= "3.8" and python_version < "4.0" -charset-normalizer==3.3.2 ; python_version >= "3.8" and python_version < "4.0" +charset-normalizer==3.4.0 ; python_version >= "3.8" and python_version < "4.0" click==8.1.7 ; python_version >= "3.8" and python_version < "4.0" codespell==2.3.0 ; python_version >= "3.8" and python_version < "4.0" colorama==0.4.6 ; python_version >= "3.8" and python_version < "4.0" editdistpy==0.1.5 ; python_version >= "3.8" and python_version < "4.0" editorconfig==0.12.4 ; python_version >= "3.8" and python_version < "4.0" ghp-import==2.1.0 ; python_version >= "3.8" and python_version < "4.0" -griffe==1.3.2 ; python_version >= "3.8" and python_version < "4.0" +griffe==1.4.0 ; python_version >= "3.8" and python_version < "4.0" +hjson==3.1.0 ; python_version >= "3.8" and python_version < "4.0" idna==3.10 ; python_version >= "3.8" and python_version < "4.0" importlib-metadata==8.5.0 ; python_version >= "3.8" and python_version < "3.10" +inflect==7.4.0 ; python_version >= "3.8" and python_version < "4.0" jinja2==3.1.4 ; python_version >= "3.8" and python_version < "4.0" jsbeautifier==1.15.1 ; python_version >= "3.8" and python_version < "4.0" markdown==3.7 ; python_version >= "3.8" and python_version < "4.0" @@ -20,35 +22,38 @@ markupsafe==2.1.5 ; python_version >= "3.8" and python_version < "4.0" mergedeep==1.3.4 ; python_version >= "3.8" and python_version < "4.0" mkdocs==1.6.1 ; python_version >= "3.8" and python_version < "4.0" mkdocs-autorefs==1.2.0 ; python_version >= "3.8" and python_version < "4.0" -mkdocs-ezglossary-plugin==1.6.10 ; python_version >= "3.8" and python_version < "4.0" +mkdocs-ezglossary-plugin==1.7.1 ; python_version >= "3.8" and python_version < "4.0" mkdocs-gen-files==0.5.0 ; python_version >= "3.8" and python_version < "4.0" mkdocs-get-deps==0.2.0 ; python_version >= "3.8" and python_version < "4.0" mkdocs-include-markdown-plugin==6.2.2 ; python_version >= "3.8" and python_version < "4.0" mkdocs-literate-nav==0.6.1 ; python_version >= "3.8" and python_version < "4.0" -mkdocs-macros-plugin==1.2.0 ; python_version >= "3.8" and python_version < "4.0" +mkdocs-macros-plugin==1.3.7 ; python_version >= "3.8" and python_version < "4.0" mkdocs-mermaid2-plugin==1.1.1 ; python_version >= "3.8" and python_version < "4.0" mkdocs-section-index==0.3.9 ; python_version >= "3.8" and python_version < "4.0" mkdocs-spellcheck==1.1.0 ; python_version >= "3.8" and python_version < "4.0" mkdocstrings==0.26.1 ; python_version >= "3.8" and python_version < "4.0" mkdocstrings-python==1.11.1 ; python_version >= "3.8" and python_version < "4.0" +more-itertools==10.5.0 ; python_version >= "3.8" and python_version < "4.0" mypy-extensions==1.0.0 ; python_version >= "3.8" and python_version < "4.0" nodeenv==1.9.1 ; python_version >= "3.8" and python_version < "4.0" packaging==24.1 ; python_version >= "3.8" and python_version < "4.0" pathspec==0.12.1 ; python_version >= "3.8" and python_version < "4.0" platformdirs==4.3.6 ; python_version >= "3.8" and python_version < "4.0" pygments==2.18.0 ; python_version >= "3.8" and python_version < "4.0" -pymdown-extensions==10.11.2 ; python_version >= "3.8" and python_version < "4.0" +pymdown-extensions==10.12 ; python_version >= "3.8" and python_version < "4.0" python-dateutil==2.9.0.post0 ; python_version >= "3.8" and python_version < "4.0" pyyaml==6.0.2 ; python_version >= "3.8" and python_version < "4.0" pyyaml-env-tag==0.1 ; python_version >= "3.8" and python_version < "4.0" requests==2.32.3 ; python_version >= "3.8" and python_version < "4.0" -setuptools==75.1.0 ; python_version >= "3.8" and python_version < "4.0" +setuptools==75.3.0 ; python_version >= "3.8" and python_version < "4.0" six==1.16.0 ; python_version >= "3.8" and python_version < "4.0" soupsieve==2.6 ; python_version >= "3.8" and python_version < "4.0" +super-collections==0.5.3 ; python_version >= "3.8" and python_version < "4.0" symspellpy==6.7.8 ; python_version >= "3.8" and python_version < "4.0" termcolor==2.4.0 ; python_version >= "3.8" and python_version < "4.0" tomli==2.0.2 ; python_version >= "3.8" and python_version < "4.0" -typing-extensions==4.12.2 ; python_version >= "3.8" and python_version < "3.11" +typeguard==4.4.0 ; python_version >= "3.8" and python_version < "4.0" +typing-extensions==4.12.2 ; python_version >= "3.8" and python_version < "4.0" urllib3==2.2.3 ; python_version >= "3.8" and python_version < "4.0" watchdog==4.0.2 ; python_version >= "3.8" and python_version < "4.0" wcmatch==10.0 ; python_version >= "3.8" and python_version < "4.0" diff --git a/pyproject.toml b/pyproject.toml index d1f67782..813b2e07 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -89,7 +89,7 @@ tomli-w = "^1.0.0" traceback-with-variables = "^2.0.4" typing-extensions = "^4.10.0" urllib3 = "^2.0" -zeroconf = "^0.135.0" +zeroconf = "^0.136.0" [tool.poetry.group.dev.dependencies] docutils = "^0.20" # TODO: remove this when the minimum Python version is >=3.9 @@ -105,7 +105,7 @@ pre-commit = [ {python = "3.8", version = "^3.5"} ] pylint = "3.2.7" -pyright = "1.1.383" +pyright = "1.1.387" pyroma = "^4.2" tox = "^4.0" tox-gh-actions = "^3.1.0" @@ -149,7 +149,7 @@ pytest-env = "^1.1.3" pytest-github-report = "^0.0.1" pytest-html = "^4.1.1" pytest-order = "^1.2.1" -ruff = "0.6.9" +ruff = "0.7.1" [tool.poetry.scripts] list-visa-resources = "tm_devices:print_available_visa_devices" diff --git a/src/tm_devices/drivers/pi/scopes/tekscope/tekscope.py b/src/tm_devices/drivers/pi/scopes/tekscope/tekscope.py index cf574269..aa39feac 100644 --- a/src/tm_devices/drivers/pi/scopes/tekscope/tekscope.py +++ b/src/tm_devices/drivers/pi/scopes/tekscope/tekscope.py @@ -386,7 +386,7 @@ def curve_query( # noqa: PLR0912,C901 return wfm_data # return list of frames - def generate_function( # noqa: PLR0913 # pyright: ignore[reportIncompatibleMethodOverride] + def generate_function( # noqa: PLR0913 self, frequency: float, function: SignalGeneratorFunctionsIAFG, @@ -431,7 +431,7 @@ def generate_function( # noqa: PLR0913 # pyright: ignore[reportIncompatibleMet self.internal_afg.set_state(1) # Don't check for errors as any measurement with low amplitude will generate an error - def setup_burst( # noqa: PLR0913 # pyright: ignore[reportIncompatibleMethodOverride] + def setup_burst( # noqa: PLR0913 self, frequency: float, function: SignalGeneratorFunctionsIAFG, diff --git a/src/tm_devices/drivers/pi/signal_generators/afgs/afg.py b/src/tm_devices/drivers/pi/signal_generators/afgs/afg.py index 0a9ffbda..0f9e11d4 100644 --- a/src/tm_devices/drivers/pi/signal_generators/afgs/afg.py +++ b/src/tm_devices/drivers/pi/signal_generators/afgs/afg.py @@ -64,7 +64,7 @@ def total_channels(self) -> int: ################################################################################################ # Public Methods ################################################################################################ - def generate_function( # noqa: PLR0913 # pyright: ignore[reportIncompatibleMethodOverride] + def generate_function( # noqa: PLR0913 self, frequency: float, function: SignalGeneratorFunctionsAFG, @@ -128,7 +128,7 @@ def generate_function( # noqa: PLR0913 # pyright: ignore[reportIncompatibleMet # Check for system errors self.expect_esr(0) - def setup_burst( # noqa: PLR0913 # pyright: ignore[reportIncompatibleMethodOverride] + def setup_burst( # noqa: PLR0913 self, frequency: float, function: SignalGeneratorFunctionsAFG, diff --git a/src/tm_devices/drivers/pi/signal_generators/awgs/awg.py b/src/tm_devices/drivers/pi/signal_generators/awgs/awg.py index dff912ef..83a83145 100644 --- a/src/tm_devices/drivers/pi/signal_generators/awgs/awg.py +++ b/src/tm_devices/drivers/pi/signal_generators/awgs/awg.py @@ -92,7 +92,7 @@ def load_waveform(self, wfm_name: str, waveform_file_path: str, wfm_type: str) - self.write(f'MMEMory:IMPort "{wfm_name}", {waveform_file_path}, {wfm_type}') self._ieee_cmds.opc() - def generate_function( # noqa: PLR0913 # pyright: ignore[reportIncompatibleMethodOverride] + def generate_function( # noqa: PLR0913 self, frequency: float, function: SignalGeneratorFunctionsAWG, @@ -176,7 +176,7 @@ def generate_waveform( # noqa: PLR0913 self.write("AWGCONTROL:RUN") self.expect_esr(0) - def setup_burst( # noqa: PLR0913 # pyright: ignore[reportIncompatibleMethodOverride] + def setup_burst( # noqa: PLR0913 self, frequency: float, function: SignalGeneratorFunctionsAWG, diff --git a/src/tm_devices/drivers/pi/source_measure_units/smu24xx/smu24xx_standard.py b/src/tm_devices/drivers/pi/source_measure_units/smu24xx/smu24xx_standard.py index 0a1e9b89..d669bd4f 100644 --- a/src/tm_devices/drivers/pi/source_measure_units/smu24xx/smu24xx_standard.py +++ b/src/tm_devices/drivers/pi/source_measure_units/smu24xx/smu24xx_standard.py @@ -72,7 +72,7 @@ def get_eventlog_status(self) -> Tuple[bool, str]: """ return SignalGenerator.get_eventlog_status(self) # type: ignore[arg-type] - def run_script(self, script_name: str) -> None: # noqa: ARG002 + def run_script(self, script_name: str) -> None: """Not Implemented.""" msg = f"This functionality is not available on the {self.__class__.__name__} instrument." raise NotImplementedError(msg) @@ -122,12 +122,12 @@ def set_and_check( # noqa: PLR0913 def load_script( self, - script_name: str, # noqa: ARG002 + script_name: str, *, - script_body: str = "", # noqa: ARG002 - file_path: Union[str, os.PathLike[str], None] = None, # noqa: ARG002 - run_script: bool = False, # noqa: ARG002 - to_nv_memory: bool = False, # noqa: ARG002 + script_body: str = "", + file_path: Union[str, os.PathLike[str], None] = None, + run_script: bool = False, + to_nv_memory: bool = False, ) -> None: """Not Implemented.""" msg = f"This functionality is not available on the {self.__class__.__name__} instrument." diff --git a/src/tm_devices/drivers/pi/source_measure_units/smu60xx/smu6xxx.py b/src/tm_devices/drivers/pi/source_measure_units/smu60xx/smu6xxx.py index 566b70fc..e4201610 100644 --- a/src/tm_devices/drivers/pi/source_measure_units/smu60xx/smu6xxx.py +++ b/src/tm_devices/drivers/pi/source_measure_units/smu60xx/smu6xxx.py @@ -72,7 +72,7 @@ def get_eventlog_status(self) -> Tuple[bool, str]: """ return SignalGenerator.get_eventlog_status(self) # type: ignore[arg-type] - def run_script(self, script_name: str) -> None: # noqa: ARG002 + def run_script(self, script_name: str) -> None: """Not Implemented.""" msg = f"This functionality is not available on the {self.__class__.__name__} instrument." raise NotImplementedError(msg) @@ -122,12 +122,12 @@ def set_and_check( # noqa: PLR0913 def load_script( self, - script_name: str, # noqa: ARG002 + script_name: str, *, - script_body: str = "", # noqa: ARG002 - file_path: Union[str, os.PathLike[str], None] = None, # noqa: ARG002 - run_script: bool = False, # noqa: ARG002 - to_nv_memory: bool = False, # noqa: ARG002 + script_body: str = "", + file_path: Union[str, os.PathLike[str], None] = None, + run_script: bool = False, + to_nv_memory: bool = False, ) -> None: """Not Implemented.""" msg = f"This functionality is not available on the {self.__class__.__name__} instrument." diff --git a/tests/requirements.txt b/tests/requirements.txt index 80505792..293d248c 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -2,7 +2,7 @@ beautifulsoup4==4.12.3 ; python_version >= "3.8" and python_version < "4.0" blinker==1.8.2 ; python_version >= "3.8" and python_version < "4.0" certifi==2024.8.30 ; python_version >= "3.8" and python_version < "4.0" chardet==5.2.0 ; python_version >= "3.8" and python_version < "4.0" -charset-normalizer==3.3.2 ; python_version >= "3.8" and python_version < "4.0" +charset-normalizer==3.4.0 ; python_version >= "3.8" and python_version < "4.0" click==8.1.7 ; python_version >= "3.8" and python_version < "4.0" colorama==0.4.6 ; python_version >= "3.8" and python_version < "4.0" coverage==7.6.1 ; python_version >= "3.8" and python_version < "4.0" @@ -38,8 +38,8 @@ pytest-order==1.3.0 ; python_version >= "3.8" and python_version < "4.0" python-dateutil==2.9.0.post0 ; python_version >= "3.8" and python_version < "4.0" pytz==2024.2 ; python_version >= "3.8" and python_version < "4.0" requests==2.32.3 ; python_version >= "3.8" and python_version < "4.0" -ruff==0.6.9 ; python_version >= "3.8" and python_version < "4.0" -setuptools==75.1.0 ; python_version >= "3.8" and python_version < "4.0" +ruff==0.7.1 ; python_version >= "3.8" and python_version < "4.0" +setuptools==75.3.0 ; python_version >= "3.8" and python_version < "4.0" six==1.16.0 ; python_version >= "3.8" and python_version < "4.0" soupsieve==2.6 ; python_version >= "3.8" and python_version < "4.0" tabledata==1.3.3 ; python_version >= "3.8" and python_version < "4.0" @@ -48,5 +48,5 @@ tomli==2.0.2 ; python_version >= "3.8" and python_full_version <= "3.11.0a6" typepy==1.3.2 ; python_version >= "3.8" and python_version < "4.0" typepy[datetime]==1.3.2 ; python_version >= "3.8" and python_version < "4.0" urllib3==2.2.3 ; python_version >= "3.8" and python_version < "4.0" -werkzeug==3.0.4 ; python_version >= "3.8" and python_version < "4.0" +werkzeug==3.0.6 ; python_version >= "3.8" and python_version < "4.0" zipp==3.20.2 ; python_version >= "3.8" and python_version < "3.10"