Skip to content

Commit

Permalink
Merge pull request #594 from cclauss/pre-commit_autoupdate_2023_05_19
Browse files Browse the repository at this point in the history
pre-commit autoupdate 2023_05_19
  • Loading branch information
jjjake authored May 22, 2023
2 parents d7ecb73 + 5f876f1 commit ee89550
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 22 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"]
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ docs =
test =
pytest==7.1.2
responses==0.20.0
ruff==0.0.261
ruff==0.0.269
types =
tqdm-stubs>=0.2.0
types-colorama
Expand Down
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')
2 changes: 1 addition & 1 deletion tests/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
pytest==7.2.2
responses==0.23.1
ruff==0.0.261
ruff==0.0.269

0 comments on commit ee89550

Please sign in to comment.