mirror of
https://github.com/kuhyx/testsAndMisc.git
synced 2026-07-04 15:03:01 +02:00
Apply pre-commit formatting fixes
Co-authored-by: kuhyx <147418882+kuhyx@users.noreply.github.com>
This commit is contained in:
parent
452b93f42b
commit
e739b1b227
@ -137,9 +137,7 @@ class TestGenerateAnkiDeck:
|
||||
|
||||
lines = result.split("\n")
|
||||
# Skip header lines and empty lines
|
||||
data_lines = [
|
||||
line for line in lines if line and not line.startswith("#")
|
||||
]
|
||||
data_lines = [line for line in lines if line and not line.startswith("#")]
|
||||
|
||||
# Each data line should have exactly 2 fields (front;back)
|
||||
for line in data_lines:
|
||||
@ -159,10 +157,14 @@ class TestMain:
|
||||
output_file = tmp_path / "test_output.txt"
|
||||
image_dir = tmp_path / "images"
|
||||
|
||||
result = main([
|
||||
"--output", str(output_file),
|
||||
"--image-dir", str(image_dir),
|
||||
])
|
||||
result = main(
|
||||
[
|
||||
"--output",
|
||||
str(output_file),
|
||||
"--image-dir",
|
||||
str(image_dir),
|
||||
]
|
||||
)
|
||||
|
||||
assert result == 0
|
||||
assert output_file.exists()
|
||||
@ -173,10 +175,14 @@ class TestMain:
|
||||
output_file = tmp_path / "test_output.txt"
|
||||
image_dir = tmp_path / "images"
|
||||
|
||||
main([
|
||||
"--output", str(output_file),
|
||||
"--image-dir", str(image_dir),
|
||||
])
|
||||
main(
|
||||
[
|
||||
"--output",
|
||||
str(output_file),
|
||||
"--image-dir",
|
||||
str(image_dir),
|
||||
]
|
||||
)
|
||||
|
||||
image_files = list(image_dir.glob("*.png"))
|
||||
assert len(image_files) == 18
|
||||
@ -186,11 +192,16 @@ class TestMain:
|
||||
output_file = tmp_path / "test_output.txt"
|
||||
image_dir = tmp_path / "images"
|
||||
|
||||
main([
|
||||
"--output", str(output_file),
|
||||
"--image-dir", str(image_dir),
|
||||
"--deck-name", "Custom Deck",
|
||||
])
|
||||
main(
|
||||
[
|
||||
"--output",
|
||||
str(output_file),
|
||||
"--image-dir",
|
||||
str(image_dir),
|
||||
"--deck-name",
|
||||
"Custom Deck",
|
||||
]
|
||||
)
|
||||
|
||||
content = output_file.read_text()
|
||||
assert "#deck:Custom Deck" in content
|
||||
|
||||
@ -69,9 +69,7 @@ WARSAW_DISTRICTS: list[District] = [
|
||||
]
|
||||
|
||||
|
||||
def create_district_map(
|
||||
district: District, *, highlight_only: bool = True
|
||||
) -> Figure:
|
||||
def create_district_map(district: District, *, highlight_only: bool = True) -> Figure:
|
||||
"""Create a map showing Warsaw districts with one district highlighted.
|
||||
|
||||
Args:
|
||||
|
||||
@ -2,10 +2,10 @@ beautifulsoup4>=4.0
|
||||
berserk>=0.13
|
||||
bottle>=0.12
|
||||
lxml>=5.0
|
||||
mitmproxy>=10.0
|
||||
|
||||
# Optional dependencies for specific scripts (needed for full pylint analysis)
|
||||
matplotlib>=3.0
|
||||
mitmproxy>=10.0
|
||||
opencv-python>=4.0
|
||||
pillow>=10.0
|
||||
pygame>=2.0
|
||||
|
||||
Loading…
Reference in New Issue
Block a user