Skip to content

Commit 7546015

Browse files
authored
Merge pull request #695 from zwimer/fix/694-pre-commit
Fix/694 pre commit
2 parents 34fb04e + 696ea0a commit 7546015

File tree

20 files changed

+57
-57
lines changed

20 files changed

+57
-57
lines changed

.pre-commit-config.yaml

Lines changed: 38 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,47 @@
11
repos:
2-
- repo: local
2+
# Modifiers
3+
- repo: https://github.com/psf/black
4+
rev: 24.10.0
35
hooks:
4-
- id: bandit
5-
name: bandit
6-
entry: bandit
7-
language: system
8-
types: [python]
9-
require_serial: true
10-
args: ["-c", "bandit.yml"]
116
- id: black
12-
name: black
13-
entry: black
14-
language: system
15-
types: [python]
16-
require_serial: true
7+
8+
- repo: https://github.com/pre-commit/mirrors-prettier
9+
rev: v4.0.0-alpha.8
10+
hooks:
11+
- id: prettier
12+
13+
- repo: https://github.com/asottile/pyupgrade
14+
rev: v3.19.0
15+
hooks:
16+
- id: pyupgrade
17+
args: [--py38-plus]
18+
19+
- repo: https://github.com/pycqa/isort
20+
rev: 5.13.2
21+
hooks:
22+
- id: isort
23+
args: ["--filter-files"]
24+
25+
- repo: https://github.com/pre-commit/pre-commit-hooks
26+
rev: v5.0.0
27+
hooks:
28+
# Modifiers
29+
- id: trailing-whitespace
30+
# Static Checkers
1731
- id: check-added-large-files
18-
name: Check for added large files
19-
entry: check-added-large-files
20-
language: system
2132
- id: check-toml
22-
name: Check Toml
23-
entry: check-toml
24-
language: system
25-
types: [toml]
2633
- id: check-yaml
27-
name: Check Yaml
28-
entry: check-yaml
29-
language: system
30-
types: [yaml]
3134
- id: end-of-file-fixer
32-
name: Fix End of Files
33-
entry: end-of-file-fixer
34-
language: system
35-
types: [text]
36-
stages: [commit, push, manual]
35+
36+
- repo: https://github.com/pycqa/flake8
37+
rev: 7.1.1
38+
hooks:
3739
- id: flake8
38-
name: flake8
39-
entry: flake8
40-
language: system
41-
types: [python]
42-
require_serial: true
43-
- id: isort
44-
name: isort
45-
entry: isort
46-
require_serial: true
47-
language: system
48-
types_or: [cython, pyi, python]
49-
args: ["--filter-files"]
50-
- id: pyupgrade
51-
name: pyupgrade
52-
description: Automatically upgrade syntax for newer versions.
53-
entry: pyupgrade
54-
language: system
55-
types: [python]
56-
args: [--py38-plus]
57-
- id: trailing-whitespace
58-
name: Trim Trailing Whitespace
59-
entry: trailing-whitespace-fixer
60-
language: system
61-
types: [text]
62-
stages: [commit, push, manual]
63-
- repo: https://github.com/pre-commit/mirrors-prettier
64-
rev: v2.1.2
40+
41+
# Static Checkers
42+
- repo: https://github.com/PyCQA/bandit
43+
rev: 1.7.10
6544
hooks:
66-
- id: prettier
45+
- id: bandit
46+
additional_dependencies: [".[toml]"]
47+
args: ["-c", "bandit.yml"]

docs/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Sphinx configuration."""
2+
23
from datetime import datetime
34

45

src/human_readable/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Human Readable."""
2+
23
from human_readable.files import file_size
34
from human_readable.i18n import activate
45
from human_readable.i18n import deactivate

src/human_readable/i18n.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Activate, get and deactivate translations."""
2+
23
from __future__ import annotations
34

45
import gettext as gettext_module

src/human_readable/lists.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Tests for lists humanization."""
2+
23
from __future__ import annotations
34

45

src/human_readable/numbers.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Humanizing functions for numbers."""
2+
23
from __future__ import annotations
34

45
import fractions

src/human_readable/times.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Time humanizing functions."""
2+
23
from __future__ import annotations
34

45
import datetime as dt

tests/functional/conftest.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Fixtures for functional tests."""
2+
23
import pytest
34
from pytest_mock import MockerFixture
45

tests/functional/en_ABBR/test_numbers.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Tests for ru_RU numbers humanizing."""
2+
23
from pytest_mock import MockerFixture
34

45
import human_readable

tests/functional/en_ABBR/test_times.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Tests for time humanizing."""
2+
23
import datetime as dt
34

45
import pytest

0 commit comments

Comments
 (0)