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