Skip to content

Commit d1c2aad

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 84d3f3f commit d1c2aad

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

pre_commit_hooks/check_added_large_files.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
from __future__ import annotations
22

33
import argparse
4-
from fnmatch import fnmatch
54
import math
65
import os
76
import subprocess
87
from collections.abc import Sequence
8+
from fnmatch import fnmatch
99

1010
from pre_commit_hooks.util import added_files
1111
from pre_commit_hooks.util import zsplit
@@ -35,7 +35,7 @@ def find_large_added_files(
3535
filenames: Sequence[str],
3636
maxkb: int,
3737
*,
38-
exclude: list[str]|None = None,
38+
exclude: list[str] | None = None,
3939
enforce_all: bool = False,
4040
) -> int:
4141
# Find all added files that are also in the list of files pre-commit tells
@@ -76,15 +76,15 @@ def main(argv: Sequence[str] | None = None) -> int:
7676
)
7777
parser.add_argument(
7878
'--exclude', type=str, default='',
79-
help="Comma-separated list of glob-style patterns to be excluded",
79+
help='Comma-separated list of glob-style patterns to be excluded',
8080
)
8181
args = parser.parse_args(argv)
8282

8383
return find_large_added_files(
8484
args.filenames,
8585
args.maxkb,
8686
enforce_all=args.enforce_all,
87-
exclude=args.exclude.split(',')
87+
exclude=args.exclude.split(','),
8888
)
8989

9090

tests/check_added_large_files_test.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ def test_add_something_giant(temp_git_dir):
4242
# Should pass with higher bound
4343
assert find_large_added_files(['f.py'], 10) == 0
4444

45+
4546
def test_use_exclude(temp_git_dir):
4647
with temp_git_dir.as_cwd():
4748
temp_git_dir.join('uv.lock').write('a' * 10_000)

0 commit comments

Comments
 (0)