Commit 2bf00f8311

2bf00f831142d10b767b456de863d0d6e6a5243c

parent: 9c61efa82c

Verified · cmc

cmc <hello@cleberg.net> · 2026-07-30 22:34 UTC

fix python ruff formatting

Layout: unified · split

build.py +10 −12
@@ -29,11 +29,10 @@ import re
2929import shutil
3030import subprocess
3131import sys
32from html import escape
33from urllib.parse import quote
3432from datetime import datetime
33from html import escape
3534from pathlib import Path
36
35from urllib.parse import quote
3736
3837SITE_TEMPLATE_VARS = {
3938 "site_name": "cleberg.net",
@@ -45,9 +44,7 @@ SITE_TEMPLATE_VARS = {
4544def run_ruff():
4645 print("Running ruff...")
4746 for cmd in [["ruff", "check", "--fix"], ["ruff", "format"]]:
48 result = subprocess.run(
49 cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True
50 )
47 result = subprocess.run(cmd, capture_output=True, text=True, check=False)
5148 if result.returncode != 0:
5249 print(f"ruff error ({' '.join(cmd)}):")
5350 print(result.stderr, file=sys.stderr)
@@ -300,9 +297,9 @@ def minify_css(src_css, dest_css):
300297 print(f"Minifying CSS: {src_css} → {dest_css}")
301298 result = subprocess.run(
302299 ["minify", "-o", str(dest_css), str(src_css)],
303 stdout=subprocess.PIPE,
304 stderr=subprocess.PIPE,
300 capture_output=True,
305301 text=True,
302 check=False,
306303 )
307304 if result.returncode != 0:
308305 print("Error during CSS minification:")
@@ -314,9 +311,9 @@ def minify_html(src_html, dest_html):
314311 print(f"Minifying HTML: {src_html} → {dest_html}")
315312 result = subprocess.run(
316313 ["minify", "-o", str(dest_html), str(src_html)],
317 stdout=subprocess.PIPE,
318 stderr=subprocess.PIPE,
314 capture_output=True,
319315 text=True,
316 check=False,
320317 )
321318 if result.returncode != 0:
322319 print("Error during HTML minification:")
@@ -333,6 +330,7 @@ def run_emacs_publish(dev_mode=True):
333330 stdout=subprocess.PIPE,
334331 stderr=subprocess.STDOUT,
335332 text=True,
333 check=False,
336334 )
337335
338336 if result.returncode != 0:
@@ -538,9 +536,9 @@ def deploy_to_server(build_dir, server):
538536 print(f"Deploying .build/ → {remote_path}")
539537 result = subprocess.run(
540538 ["rsync", "-r", "--delete-before", f"{build_dir}/", remote_path],
541 stdout=subprocess.PIPE,
542 stderr=subprocess.PIPE,
539 capture_output=True,
543540 text=True,
541 check=False,
544542 )
545543 if result.returncode != 0:
546544 print("Error during rsync deployment:")
ruff.toml added +3
@@ -0,0 +1,3 @@
1# ruff.toml
2[lint]
3ignore = ["DTZ006", "DTZ007"]
utils/salary_visualization.py +1
@@ -6,6 +6,7 @@ plotly.
66"""
77
88import locale
9
910import pandas as pd
1011import plotly.graph_objs as go
1112from pandas import read_csv as pd_read_csv