Skip to content

Commit

Permalink
[ci] Update linters
Browse files Browse the repository at this point in the history
  • Loading branch information
tysmith committed Jun 7, 2024
1 parent a7c1f72 commit 8e0bdc3
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 18 deletions.
18 changes: 9 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
repos:
- repo: https://github.com/pycqa/isort
rev: 5.12.0
rev: 5.13.2
hooks:
- id: isort
- repo: https://github.com/asottile/yesqa
rev: v1.5.0
hooks:
- id: yesqa
- repo: https://github.com/asottile/pyupgrade
rev: v3.15.0
rev: v3.15.2
hooks:
- id: pyupgrade
args: ["--py38-plus"]
- repo: https://github.com/ambv/black
rev: 23.11.0
rev: 24.4.2
hooks:
- id: black
- repo: https://github.com/pycqa/flake8
rev: 6.1.0
rev: 7.0.0
hooks:
- id: flake8
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v4.6.0
hooks:
- id: check-added-large-files
- id: check-ast
Expand All @@ -41,16 +41,16 @@ repos:
- id: requirements-txt-fixer
- id: trailing-whitespace
- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
rev: v2.3.0
hooks:
- id: codespell
exclude_types: [json]
- repo: https://github.com/marco-c/taskcluster_yml_validator
rev: v0.0.10
rev: v0.0.11
hooks:
- id: taskcluster_yml
- repo: https://github.com/MozillaSecurity/orion
rev: v0.0.7
- repo: https://github.com/MozillaSecurity/orion-ci
rev: v0.0.8
hooks:
- id: orion_ci
- repo: meta
Expand Down
2 changes: 1 addition & 1 deletion src/ffpuppet/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""FFPuppet module"""
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
"""FFPuppet module"""

from .core import Debugger, FFPuppet, Reason
from .exceptions import (
Expand Down
2 changes: 1 addition & 1 deletion src/ffpuppet/__main__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""FFPuppet module main"""
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
"""FFPuppet module main"""

from .main import main

Expand Down
4 changes: 3 additions & 1 deletion src/ffpuppet/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,9 @@ def launch(
stdout=self._logs.get_fp("stdout"),
)
self._proc_tree = ProcessTree(proc)
if memory_limit and is_windows:
if (
memory_limit and is_windows
): # pylint: disable=possibly-used-before-assignment
LOG.debug("configuring job object")
# pylint: disable=no-member,protected-access
config_job_object(
Expand Down
2 changes: 1 addition & 1 deletion src/ffpuppet/job_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

THREAD_SUSPEND_RESUME = 0x0002

__all__ = ("config_job_object",)
__all__ = ("config_job_object", "resume_suspended_process")
__author__ = "Jesse Schwartzentruber"

LOG = getLogger(__name__)
Expand Down
7 changes: 4 additions & 3 deletions src/ffpuppet/test_job_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
def test_job_object_01():
"""test config_job_object() set limit higher than usage"""
with Popen([executable, "-c", "input()"], stdin=PIPE, stderr=PIPE) as proc:
# pylint: disable=no-member,protected-access
# pylint: disable=no-member,protected-access,possibly-used-before-assignment
config_job_object(proc._handle, 1024 * 1024 * 1024)
proc.communicate(input=b"a", timeout=10)
assert proc.wait(10) == 0
Expand All @@ -33,7 +33,7 @@ def test_job_object_02():
stdin=PIPE,
stderr=PIPE,
) as proc:
# pylint: disable=no-member,protected-access
# pylint: disable=no-member,protected-access,possibly-used-before-assignment
config_job_object(proc._handle, 32 * 1024 * 1024)
_, err = proc.communicate(input=b"a", timeout=10)
assert proc.wait(10) == 1
Expand All @@ -53,12 +53,13 @@ def test_thread_resume():
"run([sys.executable, '-c', "
"\"input(); a = ['A' * 1024 * 1024 for _ in range(50)]\"], check=True)",
],
# pylint: disable=possibly-used-before-assignment
creationflags=CREATE_SUSPENDED,
stdin=PIPE,
stderr=PIPE,
) as proc:
sleep(0.1)
# pylint: disable=no-member,protected-access
# pylint: disable=no-member,protected-access,possibly-used-before-assignment
config_job_object(proc._handle, 32 * 1024 * 1024)
resume_suspended_process(proc.pid)
_, err = proc.communicate(input=b"a", timeout=10)
Expand Down
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ skip_install = true
commands =
mypy --install-types --non-interactive {posargs}
deps =
mypy==v1.7.1
mypy==v1.10.0
usedevelop = true

[testenv:pylint]
commands =
pylint -j 0 {posargs}
deps =
pylint==3.0.2
pylint==3.2.3
pytest-mock
usedevelop = true

Expand Down

0 comments on commit 8e0bdc3

Please sign in to comment.