Skip to content

Commit

Permalink
Update pre-commit hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
macisamuele committed Oct 12, 2023
1 parent b674a1f commit aaddee8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
16 changes: 8 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ default_language_version:

repos:
- repo: https://github.com/pre-commit/pre-commit
rev: v2.20.0
rev: v3.4.0
hooks:
- id: validate_manifest
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: check-added-large-files
- id: check-docstring-first
Expand All @@ -27,7 +27,7 @@ repos:
exclude: ^test-data/.*$
- id: fix-encoding-pragma
- repo: https://github.com/asottile/reorder_python_imports
rev: v3.9.0
rev: v3.12.0
hooks:
- id: reorder-python-imports
args:
Expand All @@ -38,31 +38,31 @@ repos:
- --remove-import
- from __future__ import unicode_literals
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.4.0
rev: v2.10.0
hooks:
- id: pretty-format-yaml
exclude: ^test-data/.*$
args:
- --autofix
- repo: https://github.com/ambv/black
rev: 22.10.0
rev: 23.9.1
hooks:
- id: black
args: [--config, .black.toml]
- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
rev: 6.1.0
hooks:
- id: flake8
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.991
rev: v1.5.1
hooks:
- id: mypy
exclude: ^(\.github/workflows/bump_external_releases\.py)$
additional_dependencies:
- types-requests
- types-setuptools
- repo: https://github.com/PyCQA/bandit
rev: 1.7.4
rev: 1.7.5
hooks:
- id: bandit
exclude: ^tests/.*\.py$
2 changes: 1 addition & 1 deletion language_formatters_pre_commit_hooks/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def download_url(url: str, file_name: typing.Optional[str] = None) -> str:
os.makedirs(base_directory)

print("Downloading {url}".format(url=url), file=sys.stderr)
r = requests.get(url, stream=True)
r = requests.get(url, stream=True) # nosec B113/request_without_timeout: intentional to avoid issues on slow connections
r.raise_for_status()
with tempfile.NamedTemporaryFile(dir=base_directory, delete=False) as tmp_file: # Not delete because we're renaming it
tmp_file_name = tmp_file.name
Expand Down
1 change: 0 additions & 1 deletion tests/pre_conditions_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ def success(request):


def test__is_command_success(success: bool) -> None:

assert success == _is_command_success(
"cmd",
"with",
Expand Down

0 comments on commit aaddee8

Please sign in to comment.