diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2da2a47..352fb47 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,16 +4,16 @@ repos: hooks: - id: isort - repo: https://github.com/asottile/pyupgrade - rev: v3.15.2 + rev: v3.16.0 hooks: - id: pyupgrade args: ["--py38-plus"] - repo: https://github.com/ambv/black - rev: 24.4.2 + rev: 24.8.0 hooks: - id: black - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.5.1 + rev: v0.6.3 hooks: - id: ruff - repo: https://github.com/pre-commit/pre-commit-hooks @@ -46,7 +46,7 @@ repos: hooks: - id: taskcluster_yml - repo: https://github.com/MozillaSecurity/orion-ci - rev: v0.0.8 + rev: v0.0.10 hooks: - id: orion_ci - repo: meta diff --git a/src/ffpuppet/core.py b/src/ffpuppet/core.py index 4930ee3..de9efb3 100644 --- a/src/ffpuppet/core.py +++ b/src/ffpuppet/core.py @@ -211,7 +211,7 @@ def _benign_sanitizer_report(self, report: Path) -> bool: def _crashreports( self, skip_md: bool = False, skip_benign: bool = True - ) -> Generator[Path, None, None]: + ) -> Generator[Path]: """Collect crash logs/reports. Args: @@ -587,7 +587,7 @@ def close(self, force_close: bool = False) -> None: LOG.debug("reason code: %s", r_code.name) self.reason = r_code - def cpu_usage(self) -> Generator[tuple[int, float], None, None]: + def cpu_usage(self) -> Generator[tuple[int, float]]: """Collect percentage of CPU usage per process. Args: diff --git a/src/ffpuppet/helpers.py b/src/ffpuppet/helpers.py index a4deab7..0aba21f 100644 --- a/src/ffpuppet/helpers.py +++ b/src/ffpuppet/helpers.py @@ -191,7 +191,7 @@ def certutil_find(browser_bin: Path | None = None) -> str: return CERTUTIL -def files_in_use(files: Iterable[Path]) -> Generator[tuple[Path, int, str], None, None]: +def files_in_use(files: Iterable[Path]) -> Generator[tuple[Path, int, str]]: """Check if any of the given files are open. WARNING: This can be slow on Windows. diff --git a/src/ffpuppet/process_tree.py b/src/ffpuppet/process_tree.py index a6c91a7..58566c8 100644 --- a/src/ffpuppet/process_tree.py +++ b/src/ffpuppet/process_tree.py @@ -124,7 +124,7 @@ def __init__(self, proc: Popen[bytes]) -> None: self._proc = proc self.parent: Process = Process(proc.pid) - def cpu_usage(self) -> Generator[tuple[int, float], None, None]: + def cpu_usage(self) -> Generator[tuple[int, float]]: """Collect percentage of CPU usage per process. Note: the returned value can be > 100.0 in case of a process running multiple diff --git a/tox.ini b/tox.ini index 68934f5..409b01b 100644 --- a/tox.ini +++ b/tox.ini @@ -41,14 +41,14 @@ skip_install = true commands = mypy --install-types --non-interactive {posargs} deps = - mypy==v1.10.0 + mypy==v1.11.2 usedevelop = true [testenv:pylint] commands = pylint -j 0 {posargs} deps = - pylint==3.2.3 + pylint==3.2.7 pytest-mock usedevelop = true