Skip to content

Commit 6e36975

Browse files
authored
Merge pull request #71 from realshouzy/pre-commit-ci-update-config
2 parents 65c6312 + 9f0800a commit 6e36975

File tree

5 files changed

+25
-25
lines changed

5 files changed

+25
-25
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ repos:
3636
hooks:
3737
- id: isort
3838
- repo: https://github.com/astral-sh/ruff-pre-commit
39-
rev: v0.7.4
39+
rev: v0.8.0
4040
hooks:
4141
- id: ruff
4242
args: [--fix, --exit-non-zero-on-fix]

auto_file_sorter/args_handling.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
from __future__ import annotations
44

55
__all__: list[str] = [
6-
"handle_write_args",
6+
"handle_locations_args",
77
"handle_read_args",
88
"handle_track_args",
9-
"handle_locations_args",
9+
"handle_write_args",
1010
]
1111

1212
import logging

auto_file_sorter/configs_handling.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
from __future__ import annotations
44

55
__all__: list[str] = [
6-
"read_from_configs",
7-
"write_to_configs",
8-
"get_selected_configs",
96
"add_new_config_to_configs",
7+
"get_extension_paths_from_configs",
8+
"get_selected_configs",
109
"load_json_file_into_configs",
10+
"read_from_configs",
1111
"remove_configs",
12-
"get_extension_paths_from_configs",
12+
"write_to_configs",
1313
]
1414

1515
import json

auto_file_sorter/constants.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,33 +3,33 @@
33
from __future__ import annotations
44

55
__all__: list[str] = [
6-
"PROGRAM_LOCATION",
6+
"CONFIG_LOG_LEVEL",
77
"DEFAULT_CONFIGS_LOCATION",
88
"DEFAULT_LOG_LOCATION",
9+
"EXIT_FAILURE",
10+
"EXIT_SUCCESS",
11+
"FILE_EXTENSION_PATTERN",
912
"LOG_FORMAT",
13+
"MAX_VERBOSITY_LEVEL",
1014
"MOVE_LOG_LEVEL",
11-
"CONFIG_LOG_LEVEL",
15+
"PROGRAM_LOCATION",
1216
"STREAM_HANDLER_FORMATTER",
13-
"MAX_VERBOSITY_LEVEL",
14-
"EXIT_SUCCESS",
15-
"EXIT_FAILURE",
16-
"FILE_EXTENSION_PATTERN",
1717
]
1818

1919
import logging
2020
import re
2121
from pathlib import Path
22-
from typing import Final, Literal
22+
from typing import Final
2323

2424
PROGRAM_LOCATION: Final[Path] = Path(__file__).resolve().parent
2525
DEFAULT_CONFIGS_LOCATION: Final[Path] = PROGRAM_LOCATION / "configs.json"
2626
DEFAULT_LOG_LOCATION: Final[Path] = PROGRAM_LOCATION / "auto-file-sorter.log"
2727

28-
LOG_FORMAT: Final[Literal["%(name)s [%(levelname)s] %(asctime)s - %(message)s"]] = (
28+
LOG_FORMAT: Final = (
2929
"%(name)s [%(levelname)s] %(asctime)s - %(message)s"
3030
)
31-
MOVE_LOG_LEVEL: Final[Literal[60]] = 60
32-
CONFIG_LOG_LEVEL: Final[Literal[70]] = 70
31+
MOVE_LOG_LEVEL: Final = 60
32+
CONFIG_LOG_LEVEL: Final = 70
3333
STREAM_HANDLER_FORMATTER: Final[logging.Formatter] = logging.Formatter(
3434
"[%(levelname)s] %(message)s",
3535
)
@@ -39,12 +39,12 @@
3939
2: logging.INFO,
4040
3: logging.DEBUG,
4141
}
42-
MAX_VERBOSITY_LEVEL: Final[Literal[3]] = 3
42+
MAX_VERBOSITY_LEVEL: Final = 3
4343

4444
FILE_EXTENSION_PATTERN: Final[re.Pattern[str]] = re.compile(
4545
r"^\.[a-zA-Z0-9]+$",
4646
re.IGNORECASE,
4747
)
4848

49-
EXIT_SUCCESS: Final[Literal[0]] = 0
50-
EXIT_FAILURE: Final[Literal[1]] = 1
49+
EXIT_SUCCESS: Final = 0
50+
EXIT_FAILURE: Final = 1

tests/fixtures.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@
33
from __future__ import annotations
44

55
__all__: list[str] = [
6+
"empty_test_configs",
7+
"extension_paths",
68
"info_caplog",
7-
"valid_json_data",
89
"invalid_json_data",
9-
"test_configs",
10-
"empty_test_configs",
1110
"invalid_test_configs",
12-
"extension_paths",
1311
"path_for_undefined_extensions",
14-
"test_log_as_str",
12+
"test_configs",
1513
"test_log",
14+
"test_log_as_str",
15+
"valid_json_data",
1616
]
1717

1818
import json

0 commit comments

Comments
 (0)