minor fixes

- line jumps on save
- `RE_NUM` declaration point
This commit is contained in:
Jörn-Michael Miehe 2025-11-30 14:20:15 +01:00
parent 60a417dc64
commit 4f603d3cb1
3 changed files with 8 additions and 4 deletions

View file

@ -1,4 +1,4 @@
[flake8]
max-line-length = 80
select = C,E,F,W,B,B950
extend-ignore = E203, E501
extend-select = B950
extend-ignore = E203,E501

3
api/.isort.cfg Normal file
View file

@ -0,0 +1,3 @@
[settings]
profile = black
line_length = 80

View file

@ -24,6 +24,8 @@ from .helpers import (
set_len,
)
RE_NUM = re.compile(r"/(\d+)\.", flags=re.IGNORECASE)
async def get_all_sorted_days(
cal_cfg: CalendarConfig = Depends(get_calendar_config),
@ -109,11 +111,10 @@ async def get_all_manual_image_names(
Bilder: "manual" zuordnen
"""
num_re = re.compile(r"/(\d+)\.", flags=re.IGNORECASE)
return {
int(num_match.group(1)): name
for name in manual_image_names
if (num_match := num_re.search(name)) is not None
if (num_match := RE_NUM.search(name)) is not None
}