Skip to content

Commit 457a23f

Browse files
committed
lint
1 parent 2b499c2 commit 457a23f

8 files changed

Lines changed: 15 additions & 26 deletions

File tree

ci/check_html_metadata.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,4 +95,3 @@ def main() -> int:
9595

9696
if __name__ == "__main__":
9797
sys.exit(main())
98-

ci/generate_index.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -377,12 +377,6 @@
377377
<h1>Ricardo Decal's Tools</h1>
378378
<p class="subtitle">Simple, self-contained, and immediately runnable</p>
379379
380-
<div style="margin-bottom: 2rem;">
381-
<a href="https://github.com/crypdick/tools" class="repo-link">
382-
📦 View on GitHub
383-
</a>
384-
</div>
385-
386380
{content}
387381
388382
<footer>

ci/generate_readme.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def extract_html_metadata(path: Path) -> tuple[str, str, str]:
9595
r'<p\s+class="subtitle">(.*?)</p>', content, re.IGNORECASE | re.DOTALL
9696
)
9797
if not subtitle_match or not subtitle_match.group(1).strip():
98-
raise ValueError(f"{path.name}: Missing or empty <p class=\"subtitle\">")
98+
raise ValueError(f'{path.name}: Missing or empty <p class="subtitle">')
9999

100100
# Strip HTML tags and clean up
101101
desc_html = subtitle_match.group(1)

html/html_to_text.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,4 +420,3 @@ <h1>HTML to Text</h1>
420420
</script>
421421
</body>
422422
</html>
423-

html/strip_pdf_metadata.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,4 +545,3 @@ <h1>Strip PDF Metadata</h1>
545545
</script>
546546
</body>
547547
</html>
548-

index.html

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -357,12 +357,6 @@
357357
<h1>Ricardo Decal's Tools</h1>
358358
<p class="subtitle">Simple, self-contained, and immediately runnable</p>
359359

360-
<div style="margin-bottom: 2rem;">
361-
<a href="https://github.com/crypdick/tools" class="repo-link">
362-
📦 View on GitHub
363-
</a>
364-
</div>
365-
366360
<p>A collection of simple, self-contained tools in two flavors:</p>
367361
<ul>
368362
<li><strong>Scripts</strong> — Python CLI tools runnable with <code>uv run https://tools.ricardodecal.com/python/foo.py</code>, which spawns a self-contained and ephemeral <a href="https://github.com/astral-sh/uv"><code>uv</code></a> environment.</li>

python/burn_iso.py

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@ def show_available_devices() -> None:
4949
model = device.get("model", "") or ""
5050

5151
if device_type == "disk":
52-
click.echo(f"/dev/{name:<8} {size:<10} {device_type:<8} {mountpoint:<20} {model}")
52+
click.echo(
53+
f"/dev/{name:<8} {size:<10} {device_type:<8} {mountpoint:<20} {model}"
54+
)
5355

5456
click.echo("-" * 70)
5557

@@ -125,7 +127,9 @@ def unmount_device_partitions(device_path: str) -> None:
125127
subprocess.run(["sudo", "umount", partition], check=True)
126128
click.secho(f"✓ Unmounted {partition}", fg="green")
127129
except subprocess.CalledProcessError as e:
128-
raise click.ClickException(f"Failed to unmount {partition}: {e}") from e
130+
raise click.ClickException(
131+
f"Failed to unmount {partition}: {e}"
132+
) from e
129133
else:
130134
click.echo("No mounted partitions found")
131135

@@ -168,7 +172,9 @@ def burn_iso_to_usb(iso_path: Path, device_path: str) -> None:
168172

169173
return_code = process.poll()
170174
if return_code != 0:
171-
raise click.ClickException(f"dd command failed with return code {return_code}")
175+
raise click.ClickException(
176+
f"dd command failed with return code {return_code}"
177+
)
172178

173179
except KeyboardInterrupt:
174180
raise click.ClickException("Operation cancelled by user")
@@ -259,12 +265,14 @@ def main(
259265
else:
260266
verify_usb_device(device)
261267

262-
click.echo(f"\nOperation Summary:")
268+
click.echo("\nOperation Summary:")
263269
click.echo(f" ISO file: {iso_path} ({iso_path.stat().st_size / (1024**3):.2f} GB)")
264270
click.echo(f" Target device: {device}")
265271

266272
if dry_run:
267-
click.secho("\n🔍 DRY RUN MODE - No changes will be made!", fg="yellow", bold=True)
273+
click.secho(
274+
"\n🔍 DRY RUN MODE - No changes will be made!", fg="yellow", bold=True
275+
)
268276
click.echo("The following operations would be performed:")
269277
click.echo(f" 1. Check and unmount any partitions on {device}")
270278
click.echo(f" 2. Write {iso_path.name} to {device} using dd with 4MB blocks")
@@ -292,4 +300,3 @@ def main(
292300

293301
if __name__ == "__main__":
294302
main()
295-

python/html_to_text.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,7 @@ def normalize_url(url: str) -> str:
3030

3131
def fetch_url(url: str, timeout: int) -> str:
3232
"""Fetch a URL and return HTML text."""
33-
headers = {
34-
"User-Agent": "Mozilla/5.0 (compatible; html_to_text/1.0)"
35-
}
33+
headers = {"User-Agent": "Mozilla/5.0 (compatible; html_to_text/1.0)"}
3634
response = requests.get(url, headers=headers, timeout=timeout)
3735
response.raise_for_status()
3836
response.encoding = response.apparent_encoding
@@ -105,4 +103,3 @@ def main(url: str, timeout: int, raw: bool) -> None:
105103

106104
if __name__ == "__main__":
107105
main()
108-

0 commit comments

Comments
 (0)