Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
179 commits
Select commit Hold shift + click to select a range
5e79c98
feat(ladder): Add ladder module for Click PLC clipboard encode/decode
ssweber Mar 2, 2026
ceaac80
feat(ladder): Add stream-based capture tool and update findings
ssweber Mar 2, 2026
1b52a6e
feat: more capture.py updates
ssweber Mar 2, 2026
c49194f
feat(ladder): add immediate/range coil variants and dynamic Click str…
ssweber Mar 2, 2026
5f8376e
feat: 2-series paste work
ssweber Mar 2, 2026
e3da07a
feat(ladder): add Click Ladder CSV v1 consumer, strict shorthand norm…
ssweber Mar 2, 2026
3b0fd9b
feat(ladder): add capture-backed two-series immediate variants and do…
ssweber Mar 2, 2026
110c142
feat(ladder): migrate AF token string parsing to v1.1 doubled-quote e…
ssweber Mar 3, 2026
707f13a
Align RungGrid shorthand with CSV v1.1 : delimiter token (:,out(...))
ssweber Mar 3, 2026
651a675
Add ladder topology helpers and scratchpad capture baseline
ssweber Mar 3, 2026
5e47258
ladder: switch to canonical scaffold and add hermetic fixtures
ssweber Mar 3, 2026
2a317da
Fix two-series paste structure and header variants
ssweber Mar 3, 2026
0685e82
Update handoff with validated header/topology findings
ssweber Mar 3, 2026
2d67026
Canonicalize smoke verify and add smoke native fixtures
ssweber Mar 3, 2026
a7695ac
Delete dataview-live-plan.md
ssweber Mar 3, 2026
b41a87f
Add instruction matrix workflow for manual pasteback
ssweber Mar 3, 2026
fee67f9
Harden clipboard encoder and add control-byte diff tooling
ssweber Mar 3, 2026
7921fa4
Add matrix native captures and hermetic fixture copies
ssweber Mar 3, 2026
cad03bb
closer to a working codec
ssweber Mar 3, 2026
347a4d5
Working 2 series with immediate
ssweber Mar 3, 2026
07adfcf
Document second-immediate isolation findings and final header gate fix
ssweber Mar 4, 2026
355ce0a
Add RE notes documenting clipboard investigation workflow
ssweber Mar 4, 2026
dc3e255
Add header-gate regression guards for non-second-immediate variants
ssweber Mar 4, 2026
79f8ada
feat(ladder): upgrade capture manifest to v2 and refactor wire condit…
ssweber Mar 4, 2026
36dd335
feat(ladder): unify capture workflow (shared backend + CLI/TUI), add …
ssweber Mar 4, 2026
1cb996e
feat(ladder-capture): add pending native capture queue in TUI and see…
ssweber Mar 4, 2026
2f329d5
lint
ssweber Mar 4, 2026
463dbfa
feat: new contact capture checklist scratchpad
ssweber Mar 4, 2026
ecd43f0
feat(ladder): add `report profile` command to clicknick-ladder-captur…
ssweber Mar 4, 2026
b861d70
feat(docs): add LLM capture checklist guide for ladder-capture CLI an…
ssweber Mar 4, 2026
ef71767
Add ladder capture expansion set and update profile investigations
ssweber Mar 4, 2026
cb9e406
Add multi-series ladder encoding and profile-columns report
ssweber Mar 4, 2026
a71d657
Harden verify workflow and roll back unsafe long-series encoding
ssweber Mar 4, 2026
90de2a0
feat(ladder-capture): ensure MDB addresses exist before verify prepar…
ssweber Mar 4, 2026
e5db0d6
Create AGENTS.md
ssweber Mar 4, 2026
f683ad5
add uid spoofing, commit other work
ssweber Mar 4, 2026
9e93d47
Deswamp
ssweber Mar 4, 2026
54a291e
feat: add-patch-batch CLI arguments
ssweber Mar 5, 2026
12d2434
Add noise-mask tooling, tests, and grid-baseline manifest entries
ssweber Mar 5, 2026
c2f481d
Add generated manual capture/verify command queue
ssweber Mar 5, 2026
ed1875e
Add TUI verify payload source override for file/shorthand/default
ssweber Mar 5, 2026
6e9c992
Record verified grid-basics captures and width-noise analysis
ssweber Mar 5, 2026
8df0580
Finalize Phase5 refined mask verification and reassessment
ssweber Mar 5, 2026
18489b3
Update handoff and AGENTS for Phase5 refined workflow
ssweber Mar 5, 2026
a885b5a
Add empty-template grid synthesis tool and lane1 verify queue
ssweber Mar 5, 2026
952783d
Record lane1 synth verify and queue +0x18 isolation batch
ssweber Mar 5, 2026
1e5f067
Record +0x18 isolation pass and update RE status docs
ssweber Mar 5, 2026
93925e2
Queue two-row and three-row native recaptures before isolation
ssweber Mar 5, 2026
002caf1
Add multirow recaptures and region isolation verify batch
ssweber Mar 5, 2026
2c022fc
Reset multirow isolation verify state after no-copyback runs
ssweber Mar 5, 2026
deefb1e
Tag copied verify results with needs_recopyback provenance note
ssweber Mar 5, 2026
4f61f57
Record multirow isolation outcomes and queue phase2 row0 matrix
ssweber Mar 5, 2026
47a55a6
Record multirow phase2 result: row0+row1 sufficient for 2-row stability
ssweber Mar 5, 2026
fd15e6d
Queue phase3 multirow row1-band minimization matrix
ssweber Mar 5, 2026
47f596a
Document queue-and-run manual verify cadence in AGENTS
ssweber Mar 5, 2026
4a36b68
Record phase3 outcomes and queue phase4 row1 subset narrowing
ssweber Mar 5, 2026
ab9f25e
Record phase4 outcomes and queue phase5 row0 minimization batch
ssweber Mar 5, 2026
ee1aa5c
Record phase5 minima and queue phase6 col31 dependency split
ssweber Mar 5, 2026
7c37b4b
Record phase6 minimal two-row companion byte rule
ssweber Mar 5, 2026
65c9ba1
Add multirow companion mode and queue confirm/probe scenario
ssweber Mar 5, 2026
cee43f2
Record companion confirm/probe results for 2-row and 3-row empties
ssweber Mar 5, 2026
feb34f1
Checkpoint empty multirow scaling runs and investigator handoff
ssweber Mar 5, 2026
e05fd17
Add empty multi-row row-rule isolation results and queues
ssweber Mar 5, 2026
b1ff325
Document empty multi-row seeded row rules and capture workflow
ssweber Mar 5, 2026
b93988b
Integrate empty multirow rule synthesis and promote fixtures
ssweber Mar 6, 2026
af085ab
Fix empty multirow header field writes for Click paste compatibility
ssweber Mar 6, 2026
04e4254
Create non-empty-multirow-prompt.md
ssweber Mar 6, 2026
bb3a3bf
chore: stage pending handoff and scratchpad updates
ssweber Mar 6, 2026
0078e7a
Capture non-empty multirow horiz/vert isolation findings
ssweber Mar 6, 2026
703ecf7
Queue 4+ row non-empty row-combo validation batch
ssweber Mar 6, 2026
1426157
Record 4+ rowcombo verify outcomes and corrected observation
ssweber Mar 6, 2026
6e05626
Record scale-to-32 validation and draft implementation plan
ssweber Mar 6, 2026
7bf4b74
Add non-empty multirow synthesis and smoke verify batch
ssweber Mar 6, 2026
67d3bd2
Record non-empty asymmetry batch and update handoff/map
ssweber Mar 6, 2026
575b42b
Capture phase1 AF NOP results and phase2 rungcomment mapping with mix…
ssweber Mar 6, 2026
da04bb6
phase2: capture companion-isolation results and pickup handoff
ssweber Mar 6, 2026
8d8e9d2
Document rung comment closure findings
ssweber Mar 7, 2026
ce178cd
Document further max 1400 comment length work
ssweber Mar 7, 2026
27552e2
Document max1400 structural family analysis
ssweber Mar 7, 2026
2b49b2b
Queue row32 max1400 native capture pair
ssweber Mar 7, 2026
d208642
Default captured native verify to file payload
ssweber Mar 7, 2026
cfe6ab7
Record row32 max1400 native scaling results
ssweber Mar 7, 2026
6beb1bb
Add row32 full-wire max1400 discriminator analysis
ssweber Mar 7, 2026
94e7e37
Decode max1400 page17 record structure
ssweber Mar 7, 2026
de06c60
Document max1400 paired-row descriptor pages
ssweber Mar 7, 2026
7671b6d
Analyze max1400 terminal page regeneration
ssweber Mar 7, 2026
652d056
Add max1400 splice prototype and pickup handoff
ssweber Mar 7, 2026
b4ed3a6
Add ladder comment row support
ssweber Mar 8, 2026
d390db7
Clarify comment-band terminology and add clean empty reverify set
ssweber Mar 8, 2026
b0cd04d
Start phase 3 March 8 wireframe baseline
ssweber Mar 8, 2026
4ec55b8
Isolate March 8 wireframe band templates
ssweber Mar 8, 2026
37f161b
Assess March 8 plain comment synthesis readiness
ssweber Mar 8, 2026
c413807
Tighten March 8 plain comment stream model
ssweber Mar 8, 2026
0533f0b
Reach exact offline March 8 plain comment synthesis
ssweber Mar 8, 2026
59d5031
Compress medium comment branch to ring model
ssweber Mar 8, 2026
57a706e
Queue exact March 8 plain comment paste verify
ssweber Mar 8, 2026
81632b8
Repair exact comment verify manifest state
ssweber Mar 8, 2026
7f5ae11
Verify exact March 8 plain comment synthesis
ssweber Mar 8, 2026
bf6e699
Document RE view-switch heuristic
ssweber Mar 8, 2026
d55c17a
Implement March 8 ladder codec v2
ssweber Mar 8, 2026
b8cabce
refactor: Move csv_* to a csv/ directory and update tests/imports
ssweber Mar 9, 2026
1d8fbc8
Remove obsolete ladder slimming tests
ssweber Mar 9, 2026
badff34
large scale ladder investigation repo cleanup
ssweber Mar 9, 2026
7ee0063
new encode function
ssweber Mar 9, 2026
7a1a91a
Remove handoff, replace with Status
ssweber Mar 9, 2026
81a7a2c
Fix comment encoding: native RTF framing, comment-present flag, skip …
ssweber Mar 9, 2026
9c7afa5
Verify 19/20 encoder shapes pass Click round-trip
ssweber Mar 9, 2026
7b46f6d
Remove old comment donor, add ladder CLAUDE.md workflow guide
ssweber Mar 9, 2026
71c309e
Support comment + wire/NOP on 1-row rungs
ssweber Mar 9, 2026
fe60e18
Fix comment encoder: unified 0x5A flag, phase-A wire placement
ssweber Mar 9, 2026
57b4241
lint/ssort
ssweber Mar 9, 2026
f34cefa
Clean up captures: delete superseded entries, promote native references
ssweber Mar 9, 2026
457e9e5
Update ladder docs: comment+wire support is fully verified
ssweber Mar 9, 2026
408b8bc
Remove stale capture binaries and clear manifest references
ssweber Mar 9, 2026
d3f07a9
Add max1400+sparse+NOP verify, 2-row native captures, update docs
ssweber Mar 9, 2026
d4811dc
Add compact shorthand docs to AGENTS.md, add 'today' filter to TUI ve…
ssweber Mar 10, 2026
023983f
Fix 2-row comment encoder: no-pad, NOP +0x19, down +0x29, validation
ssweber Mar 10, 2026
4551bfa
Promote 2-row comment captures to fixtures, clean up scratchpad
ssweber Mar 10, 2026
c5da418
Extend comment encoder to 3+ rows, add quick capture TUI option
ssweber Mar 10, 2026
b474de9
Update settings.local.json
ssweber Mar 10, 2026
fa7e461
Fix 1-row comment encoder: stop clobbering phase-A at 0x0A59, skip co…
ssweber Mar 10, 2026
7b22f44
Auto-resolve verify source per entry in TUI guided queue
ssweber Mar 10, 2026
17e516c
Add 25 golden encoder regression tests, update docs
ssweber Mar 10, 2026
bca0e54
Update ladder_capture_manifest.json
ssweber Mar 10, 2026
b35ae7b
dump
ssweber Mar 10, 2026
dcf10e2
Replace ladder codec and CSV with laddercodec dependency
ssweber Mar 11, 2026
f5cfbf4
Update ladder/CLAUDE.md to reflect laddercodec extraction
ssweber Mar 11, 2026
2fafef3
Replace capture workflow with simple golden fixture verifier
ssweber Mar 11, 2026
b4f29dc
Polish capture_verify CLI: descriptions, bin sizes, --skip-to, error …
ssweber Mar 11, 2026
670f6b5
Unify golden and folder verify into shared run_batch() with CSV shape…
ssweber Mar 11, 2026
b74d146
Improve capture_verify: precise descriptions, resume, worked/info-onl…
ssweber Mar 11, 2026
496909d
Add multi-rung support to capture_verify
ssweber Mar 12, 2026
6618409
Add --file flag and Contact/Coil parsing to capture_verify
ssweber Mar 13, 2026
06de9f7
Support CompareContact and Timer in capture_verify CSV parsing
ssweber Mar 14, 2026
543d6b9
feat: support CSV files in --file flag for capture_verify
ssweber Mar 17, 2026
998ad5e
refactor: use laddercodec.csv.reader instead of local CSV parsing copies
ssweber Mar 17, 2026
7f140ec
refactor!: rename clicknick-ladder-verify to clicknick-rung with subc…
ssweber Mar 18, 2026
de82cc5
fix: handle clipboard errors gracefully in clicknick-rung CLI
ssweber Mar 18, 2026
b74e693
fix: handle laddercodec parse errors gracefully in clicknick-rung CLI
ssweber Mar 18, 2026
a0bf3b3
feat: smart output format for clicknick-rung save based on file exten…
ssweber Mar 19, 2026
b8592b5
refactor: write guided notes to progress log instead of .note.txt files
ssweber Mar 19, 2026
b097320
refactor(ladder): migrate to laddercodec.csv.read_csv() unified API
ssweber Mar 19, 2026
c0a1d86
refactor(ladder): rename capture_verify.py to cli.py
ssweber Mar 19, 2026
cc542f5
refactor(ladder): use laddercodec unified public API imports
ssweber Mar 19, 2026
b322360
feat(ladder): add --best-effort flag to clicknick-rung load
ssweber Mar 19, 2026
4e8cc56
fix(ladder): update mock signature for --best-effort in test_load_csv…
ssweber Mar 19, 2026
eda6722
Update uv.lock
ssweber Mar 19, 2026
b07b274
refactor(ladder): use to_csv() for operand extraction instead of isin…
ssweber Mar 20, 2026
1cfc936
docs(scratchpad): add RE narrative "These Aren't the Rungs You're Loo…
ssweber Mar 24, 2026
a3a3f4f
Update these-arent-the-rungs.md
ssweber Mar 25, 2026
4e0ddad
Update these-arent-the-rungs.md
ssweber Mar 25, 2026
c7a5a57
Delete these-arent-the-rungs.md
ssweber Mar 26, 2026
dac7c96
feat(cli): add `clicknick-rung program` command
ssweber Mar 27, 2026
757a674
fix(ladder): restore csv decode shim and operand parsing
ssweber Mar 27, 2026
49909a8
feat(cli): split `program` into `program load` and `program save` sub…
ssweber Mar 27, 2026
563a0a7
feat(cli): add --output flag to `program save`
ssweber Mar 27, 2026
8554b6b
feat(ladder): improve program and split-rung CSV workflows
ssweber Mar 27, 2026
87cf916
refactor(ladder): extract program.py service layer from CLI
ssweber Mar 28, 2026
908c0f8
feat(gui): add Export Ladder CSV to File menu
ssweber Mar 28, 2026
448d84a
feat(gui): add Guided Paste panel for loading ladder CSV folders
ssweber Mar 28, 2026
ff69642
feat(gui): add show-nicknames toggle to Guided Paste panel
ssweber Mar 29, 2026
84308e1
feat(gui): add Convert Ladder to pyrung menu and nicknames.csv export
ssweber Mar 29, 2026
183eb0c
feat(gui): improve Guided Paste with nickname import and two-step copy
ssweber Mar 29, 2026
75f4e71
fix(gui): polish Guided Paste button icons, column widths, and UX
ssweber Mar 29, 2026
6370176
refactor(gui): add Ladder menu and rename menu items
ssweber Mar 29, 2026
77199e3
docs: add Ladder Tools section to README
ssweber Mar 29, 2026
04f04c0
feat(gui): mark Export from Click as beta with first-run popup
ssweber Mar 29, 2026
f0f5026
fix(gui): handle PermissionError in Export from Click with retry dialog
ssweber Mar 29, 2026
650a9c4
refactor(gui): move Ladder menu to the right of Tools
ssweber Mar 30, 2026
6dd3106
fix: preserve structured timer block names in interleaved sync
ssweber Mar 30, 2026
427e33a
fix: preserve structured block names in tree and pair sync
ssweber Mar 30, 2026
9d5289e
feat(dataview): Add reconnect, more sensible timeout defaults
ssweber Apr 1, 2026
4227527
chore: prune dev tooling, fix ruff F821 lint error
ssweber Apr 1, 2026
865ad25
feat(gui): add Load Ladder CSV to Clipboard menu option
ssweber Apr 1, 2026
9a8a873
fix(tests): accept timeout kwarg in FakeModbusService.connect
ssweber Apr 1, 2026
6b83414
chore: except laddercodec from exclude-newer-package
ssweber Apr 1, 2026
0f3639c
feat(fixtures) new math multi
ssweber Apr 1, 2026
0aff15d
feat(gui): reorganize Ladder menu, add Save Clipboard to CSV
ssweber Apr 2, 2026
312d088
chore: switch laddercodec and pyrung to published PyPI packages
ssweber Apr 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .claude/settings.local.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"WebFetch(domain:ragardner.github.io)",
"WebFetch(domain:raw.githubusercontent.com)",
"Bash(uv run pytest:*)",
"Bash(uv run repomapper:*)"
"Bash(uv run:*)",
"Bash(do uv:*)"
]
}
}
13 changes: 8 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,16 @@ jobs:
# https://docs.astral.sh/uv/guides/integration/github/

- name: Checkout (official GitHub action)
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
# Important for versioning plugins:
fetch-depth: 0

- name: Install uv (official Astral action)
uses: astral-sh/setup-uv@v5
uses: astral-sh/setup-uv@v7
with:
# Update this as needed:
version: "0.6.14"
version: "0.9.25"
enable-cache: true
python-version: ${{ matrix.python-version }}

Expand All @@ -54,7 +54,10 @@ jobs:
# python-version: ${{ matrix.python-version }}

- name: Install all dependencies
run: uv sync --all-extras --dev
run: uv sync --locked --all-extras --dev

- name: Report locked tool versions
run: uv run python -c "import importlib.metadata as md; print('ruff', md.version('ruff')); print('ssort', md.version('ssort'))"

- name: Run linting
run: uv run python devtools/lint.py
run: uv run python devtools/lint.py --check
10 changes: 5 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ jobs:
runs-on: windows-latest
steps:
- name: Checkout (official GitHub action)
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-depth: 0

- name: Install uv (official Astral action)
uses: astral-sh/setup-uv@v5
uses: astral-sh/setup-uv@v7
with:
version: "0.6.14"
version: "0.9.25"
enable-cache: true
python-version: "3.12"

Expand All @@ -28,7 +28,7 @@ jobs:

- name: Install dependencies
# This works now because we are on Windows
run: uv sync --all-extras --dev
run: uv sync --locked --all-extras --dev

- name: Build package
run: uv build
Expand All @@ -55,4 +55,4 @@ jobs:
path: dist/

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
uses: pypa/gh-action-pypi-publish@release/v1
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
default: install lint test

install:
uv sync --all-extras --dev
uv sync --locked --all-extras --dev

lint:
uv run python devtools/lint.py
Expand All @@ -18,7 +18,8 @@ test:
uv run pytest --quiet --tb=short

upgrade:
uv sync --upgrade
uv lock --upgrade
uv sync --locked --all-extras --dev

build:
uv build
Expand Down Expand Up @@ -50,4 +51,4 @@ clean:
$(RM) .pytest_cache/
$(RM) .mypy_cache/
$(RM) .venv/
$(FIND_PYCACHE)
$(FIND_PYCACHE)
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
| **Address Editing** | One-by-one in app | ✅ **Bulk edit**, multi-window, search/replace |
| **Tag View** | Flat list | ✅ **Color named blocks** + **tree outline** (hierarchy & arrays) |
| **DataView** | Input raw addresses, limited reordering | ✅ **Autocomplete**, add entire grouped structures and blocks, drag and drop reordering |
| **Ladder Portability** | Copy/paste within app | ✅ **Export** to CSV, **convert** to Python, paste between projects |
| **Price** | Free (bundled) | Free (open source) |
| **Best For** | Simple projects | Complex projects, productivity |

Expand All @@ -28,6 +29,7 @@ CLICK PLCs were my first PLC experience, but remembering addresses became painfu
- **[📑 Tag Browser](#tag-browser)** – Tree view with automatic hierarchy and array grouping
- **[📊 Dataview Editor](#dataview-editor)** – Tabbed interface, nickname lookup, unlimited reordering
- **[🔌 Connectivity](#connectivity)** – CSV import and live ODBC database support
- **[📐 Ladder Tools](#ladder-tools)** – Export ladder logic to CSV, convert to Python, paste between projects

**Beta** – Review Address & Dataview changes before saving in CLICK. [Feedback welcome](https://github.com/ssweber/clicknick/issues).

Expand Down Expand Up @@ -143,6 +145,16 @@ Alm[1-2]

---

### <a name="ladder-tools"></a>📐 Ladder Tools

Access these from the **Ladder** menu:

- **Export from Click** – Decode your connected Click project's ladder logic into readable CSV files (powered by [laddercodec](https://github.com/ssweber/laddercodec))
- **Convert to pyrung** – Generate a [pyrung](https://github.com/ssweber/pyrung) Python project from an exported ladder folder, for unit testing and simulation
- **Guided Paste** – Load an exported ladder project and walk through importing it into Click, file by file

---

<details>
<summary><strong>Block Tag Specification</strong> (Advanced)</summary>

Expand Down
67 changes: 42 additions & 25 deletions devtools/lint.py
Original file line number Diff line number Diff line change
@@ -1,51 +1,68 @@
import argparse
import subprocess

from funlog import log_calls
from rich import get_console, reconfigure
from rich import print as rprint
import sys

# Update as needed.
SRC_PATHS = ["src", "tests", "devtools"]
DOC_PATHS = ["README.md"]


reconfigure(emoji=not get_console().options.legacy_windows) # No emojis on legacy windows.
def parse_args() -> argparse.Namespace:
parser = argparse.ArgumentParser(description="Run lint checks for the repository.")
parser.add_argument(
"--check",
action="store_true",
help="Run read-only checks suitable for CI (no autofix).",
)
return parser.parse_args()


@log_calls(level="warning", show_timing_only=True)
def run(cmd: list[str]) -> int:
rprint()
rprint(f"[bold green]:arrow_forward: {' '.join(cmd)}[/bold green]")
errcount = 0
print()
print(f"==> {' '.join(cmd)}")
try:
subprocess.run(cmd, text=True, check=True)
except subprocess.CalledProcessError as e:
rprint(f"[bold red]Error: {e}[/bold red]")
errcount = 1
except subprocess.CalledProcessError as exc:
print(f"Error: {exc}")
return 1
except FileNotFoundError as exc:
print(f"Executable not found: {exc}")
return 1

return errcount
return 0


def main():
rprint()
def main() -> int:
args = parse_args()
print()

errcount = 0
errcount += run(["codespell", "--write-changes", *SRC_PATHS, *DOC_PATHS])
errcount += run(["ssort", *SRC_PATHS])
errcount += run(["ruff", "check", "--fix", *SRC_PATHS])
errcount += run(["ruff", "format", *SRC_PATHS])
if args.check:
errcount += run(["ssort", "--check", *SRC_PATHS])
else:
errcount += run(["ssort", *SRC_PATHS])

if args.check:
errcount += run(["ruff", "check", *SRC_PATHS])
else:
errcount += run(["ruff", "check", "--fix", *SRC_PATHS])

if args.check:
errcount += run(["ruff", "format", "--check", *SRC_PATHS])
else:
errcount += run(["ruff", "format", *SRC_PATHS])

# errcount += run(["basedpyright", *SRC_PATHS])

rprint()
print()

if errcount != 0:
rprint(f"[bold red]:x: Lint failed with {errcount} errors.[/bold red]")
print(f"Lint failed with {errcount} error(s).")
else:
rprint("[bold green]:white_check_mark: Lint passed![/bold green]")
rprint()
print("Lint passed.")
print()

return errcount


if __name__ == "__main__":
exit(main())
sys.exit(main())
Loading