Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pre-commit.ci] pre-commit autoupdate #221

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
20 changes: 10 additions & 10 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
repos:
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: 12885e376b93dc4536ad68d156065601e4433665 # frozen: v1.5.1
rev: a30f0d816e5062a67d87c8de753cfe499672b959 # frozen: v1.5.5
hooks:
- id: insert-license
files: '^src/.+\.py$|^tests/.+\.py$'
args: ['--license-filepath', 'LICENSE-HEADER']
- repo: https://github.com/executablebooks/mdformat
rev: 82f84976fc57d5ae61cbf2d457a26a89d4b4eef4 # frozen: 0.7.16
rev: 08fba30538869a440b5059de90af03e3502e35fb # frozen: 0.7.17
hooks:
- id: mdformat
additional_dependencies:
- mdformat-toc
- mdformat-gfm
- mdformat-black
- repo: https://github.com/asottile/yesqa
rev: 265e9ff7c83add4949f81bb5fe14f4a743ffb04c # frozen: v1.4.0
rev: f2ae90cf9e1661ade79d0881186ce4fd7ba6ee79 # frozen: v1.5.0
hooks:
- id: yesqa
additional_dependencies:
Expand All @@ -28,19 +28,19 @@ repos:
files: '^src/.+\.py$'
args: ['--never', '--application-directories', 'src']
- repo: https://github.com/PyCQA/isort
rev: dbf82f2dd09ae41d9355bcd7ab69187a19e6bf2f # frozen: 5.12.0
rev: c235f5e450b4b84e58d114ed4c589cbf454175a3 # frozen: 5.13.2
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: bf7a16254ec96b084a6caf3d435ec18f0f245cc7 # frozen: 23.3.0
rev: 3702ba224ecffbcec30af640c149f231d90aebdb # frozen: 24.4.2
hooks:
- id: black
- repo: https://github.com/myint/docformatter
rev: 8b8dae1d990e2e4fec7ff6704a79c23a403cd605 # frozen: v1.5.0
- repo: https://github.com/PyCQA/docformatter
rev: dfefe062799848234b4cd60b04aa633c0608025e # frozen: v1.7.5
hooks:
- id: docformatter
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: f71fa2c1f9cf5cb705f73dffe4b21f7c61470ba9 # frozen: v4.4.0
rev: 2c9f875913ee60ca25ce70243dc24d5b6415598c # frozen: v4.6.0
hooks:
- id: check-yaml
- repo: https://github.com/pre-commit/pygrep-hooks
Expand All @@ -50,15 +50,15 @@ repos:
- id: python-check-blanket-noqa
- id: python-check-blanket-type-ignore
- repo: https://github.com/PyCQA/flake8
rev: c838a5e98878f17889cfce311e1406d252f87ec5 # frozen: 6.0.0
rev: 7d37d9032d0d161634be4554273c30efd4dea0b3 # frozen: 7.0.0
hooks:
- id: flake8
additional_dependencies:
- flake8-bugbear
- flake8-builtins
- flake8-comprehensions
- repo: https://github.com/pre-commit/mirrors-mypy
rev: b84480de6124681d551749528ab4b42c2269df8c # frozen: v1.2.0
rev: e5ea6670624c24f8321f6328ef3176dbba76db46 # frozen: v1.10.0
hooks:
- id: mypy
args: ["--scripts-are-modules"]
1 change: 1 addition & 0 deletions profiler/profiler_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
- `tox -e profile`
- `firefox .tox/prof/output.svg`
"""

from pathlib import Path

import tomli
Expand Down
12 changes: 7 additions & 5 deletions tests/burntsushi.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# SPDX-License-Identifier: MIT
# SPDX-FileCopyrightText: 2021 Taneli Hukkinen
# Licensed to PSF under a Contributor Agreement.

"""Utilities for tests that are in the "burntsushi" format."""

import datetime
Expand Down Expand Up @@ -53,11 +52,14 @@ def convert(obj): # noqa: C901
def normalize(obj: Any) -> Any:
"""Normalize test objects.

This normalizes primitive values (e.g. floats), and also converts from
TOML compliance format [1] to BurntSushi format [2].
This normalizes primitive values (e.g. floats), and also converts
from TOML compliance format [1] to BurntSushi format [2].

[1] https://github.com/toml-lang/compliance/blob/db7c3211fda30ff9ddb10292f4aeda7e2e10abc4/docs/json-encoding.md # noqa: E501
[2] https://github.com/BurntSushi/toml-test/blob/4634fdf3a6ecd6aaea5f4cdcd98b2733c2694993/README.md # noqa: E501
[1]
https://github.com/toml-lang/compliance/blob/db7c3211fda30ff9ddb10292f4aeda7e2e10abc4/docs/json-encoding.md
# noqa: E501 [2]
https://github.com/BurntSushi/toml-test/blob/4634fdf3a6ecd6aaea5f4cdcd98b2733c2694993/README.md
# noqa: E501
"""
if isinstance(obj, list):
return [normalize(item) for item in obj]
Expand Down