Skip to content

Commit

Permalink
Update pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk committed Sep 19, 2023
1 parent 0298f75 commit 68c1fde
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
21 changes: 11 additions & 10 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
repos:
- repo: https://github.com/asottile/pyupgrade
rev: v3.8.0
rev: v3.11.1
hooks:
- id: pyupgrade
args: [--py38-plus]

- repo: https://github.com/psf/black
rev: 23.3.0
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 23.9.1
hooks:
- id: black

Expand All @@ -17,45 +17,46 @@ repos:
args: [--add-import=from __future__ import annotations]

- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
rev: 6.1.0
hooks:
- id: flake8
additional_dependencies:
[flake8-2020, flake8-errmsg, flake8-implicit-str-concat]
[flake8-2020, flake8-errmsg, flake8-implicit-str-concat, flake8-logging]

- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.10.0
hooks:
- id: python-check-blanket-noqa
- id: python-no-log-warn

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-case-conflict
- id: check-executables-have-shebangs
- id: check-merge-conflict
- id: check-json
- id: check-toml
- id: check-yaml
- id: debug-statements
- id: end-of-file-fixer
- id: trailing-whitespace

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.4.1
rev: v1.5.1
hooks:
- id: mypy
args: [--strict, --pretty, --show-error-codes]
additional_dependencies:
[platformdirs, pytest, types-freezegun, types-python-slugify, urllib3]

- repo: https://github.com/tox-dev/pyproject-fmt
rev: 0.13.0
rev: 1.1.0
hooks:
- id: pyproject-fmt
additional_dependencies: [tox]

- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.13
rev: v0.14
hooks:
- id: validate-pyproject

Expand All @@ -65,7 +66,7 @@ repos:
- id: tox-ini-fmt

- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.0
rev: v3.0.3
hooks:
- id: prettier
args: [--prose-wrap=always, --print-width=88]
Expand Down
4 changes: 2 additions & 2 deletions src/pepotron/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@

def _download_peps_json(json_url: str = BASE_URL + JSON_PATH) -> Path:
cache_file = _cache.filename(json_url)
logging.info(f"Cache file: {cache_file}")
logging.info("Cache file: %s", cache_file)

data = _cache.load(cache_file)
if data == {}:
Expand All @@ -57,7 +57,7 @@ def _download_peps_json(json_url: str = BASE_URL + JSON_PATH) -> Path:

# Raise if we made a bad request
# (4XX client error or 5XX server error response)
logging.info(f"HTTP status code: {resp.status}")
logging.info("HTTP status code: %s", resp.status)
if resp.status != 200:
msg = f"Unable to download {json_url}: status {resp.status}"
raise RuntimeError(msg)
Expand Down

0 comments on commit 68c1fde

Please sign in to comment.