Skip to content

Commit 0082ca3

Browse files
akxWhyNotHugo
authored andcommitted
Update pre-commit tools; apply ruff format
1 parent e77c50f commit 0082ca3

File tree

10 files changed

+17
-10
lines changed

10 files changed

+17
-10
lines changed

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v4.5.0
3+
rev: v5.0.0
44
hooks:
55
- id: trailing-whitespace
66
args: [--markdown-linebreak-ext=md]
77
- id: end-of-file-fixer
88
- id: debug-statements
99
- repo: https://github.com/pre-commit/mirrors-mypy
10-
rev: 'v1.7.1'
10+
rev: 'v1.15.0'
1111
hooks:
1212
- id: mypy
1313
- repo: https://github.com/astral-sh/ruff-pre-commit
14-
rev: 'v0.1.6'
14+
rev: 'v0.11.9'
1515
hooks:
1616
- id: ruff
1717
args: [--fix, --exit-non-zero-on-fix]

barcode/__init__.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
created as SVG objects. If Pillow is installed, the barcodes can also be
44
rendered as images (all formats supported by Pillow).
55
"""
6+
67
from __future__ import annotations
78

89
import os
@@ -65,8 +66,7 @@
6566
@overload
6667
def get(
6768
name: str, code: str, writer: BaseWriter | None = None, options: dict | None = None
68-
) -> Barcode:
69-
...
69+
) -> Barcode: ...
7070

7171

7272
@overload
@@ -75,8 +75,7 @@ def get(
7575
code: None = None,
7676
writer: BaseWriter | None = None,
7777
options: dict | None = None,
78-
) -> type[Barcode]:
79-
...
78+
) -> type[Barcode]: ...
8079

8180

8281
def get(

barcode/base.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
"""barcode.base
1+
"""barcode.base"""
22

3-
"""
43
from __future__ import annotations
54

65
from typing import TYPE_CHECKING

barcode/codabar.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
33
:Provided barcodes: Codabar (NW-7)
44
"""
5+
56
from __future__ import annotations
67

78
__docformat__ = "restructuredtext en"

barcode/errors.py

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

45
__docformat__ = "restructuredtext en"

barcode/isxn.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
'0132354187'
2222
2323
"""
24+
2425
from __future__ import annotations
2526

2627
from barcode.ean import EuropeanArticleNumber13

barcode/itf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
33
:Provided barcodes: Interleaved 2 of 5
44
"""
5+
56
from __future__ import annotations
67

78
__docformat__ = "restructuredtext en"

barcode/upc.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
33
:Provided barcodes: UPC-A
44
"""
5+
56
from __future__ import annotations
67

78
__docformat__ = "restructuredtext en"

pyproject.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ write_to = "barcode/version.py"
5252
version_scheme = "post-release"
5353

5454
[tool.ruff]
55+
target-version = "py38"
56+
57+
[tool.ruff.lint]
5558
select = [
5659
"F",
5760
"E",
@@ -83,7 +86,7 @@ select = [
8386
"RUF",
8487
]
8588

86-
[tool.ruff.isort]
89+
[tool.ruff.lint.isort]
8790
force-single-line = true
8891
required-imports = ["from __future__ import annotations"]
8992

tests/test_manually.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Generates barcodes for visually inspecting the results."""
2+
23
from __future__ import annotations
34

45
import codecs

0 commit comments

Comments
 (0)