Skip to content

Commit

Permalink
pre-commit autoupdate 2023_05_19
Browse files Browse the repository at this point in the history
  • Loading branch information
cclauss committed May 19, 2023
1 parent d7ecb73 commit 0e883ff
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 20 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.261
rev: v0.0.269

hooks:
- id: ruff
Expand All @@ -42,7 +42,7 @@ repos:
- id: codespell # See setup.cfg for args

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.1.1
rev: v1.3.0
hooks:
- id: mypy
additional_dependencies:
Expand Down
6 changes: 1 addition & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,7 @@ max-statements = 124

[tool.ruff.per-file-ignores]
"__init__.py" = ["E402"]
"tests/*" = [
"PT017",
"S101",
]
"tests/conftest.py" = ["B018", "F811"]
"tests/*" = ["PT017", "S101"]
"tests/cli/test_ia_list.py" = ["E741"]
"tests/test_api.py" = ["E712"]
"tests/test_config.py" = ["PT011"]
15 changes: 2 additions & 13 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,6 @@
from internetarchive.cli import ia
from internetarchive.utils import json

try:
FileNotFoundError
except NameError:
FileNotFoundError = IOError

try:
WindowsError # type: ignore[used-before-def]
except NameError:
class WindowsError(Exception):
pass

PROTOCOL = 'https:'
BASE_URL = 'https://archive.org/'
METADATA_URL = f'{BASE_URL}metadata/'
Expand Down Expand Up @@ -74,7 +63,7 @@ def load_test_data_file(filename):


def call_cmd(cmd, expected_exit_code=0):
proc = Popen(cmd, shell=True, stdout=PIPE, stderr=PIPE)
proc = Popen(cmd, shell=True, stdout=PIPE, stderr=PIPE) # noqa: S602
stdout, stderr = proc.communicate()
stdout = stdout.decode('utf-8').strip()
stderr = stderr.decode('utf-8').strip()
Expand Down Expand Up @@ -134,5 +123,5 @@ def nasa_metadata():

# TODO: Why is this function defined twice in this file? See issue #505
@pytest.fixture() # type: ignore
def nasa_item(nasa_mocker):
def nasa_item(nasa_mocker): # noqa: F811
return get_item('nasa')

0 comments on commit 0e883ff

Please sign in to comment.