Skip to content

Fix issues in dignified-python#75

Open
schrockn wants to merge 2 commits intomasterfrom
dignified-audit
Open

Fix issues in dignified-python#75
schrockn wants to merge 2 commits intomasterfrom
dignified-audit

Conversation

@schrockn
Copy link
Copy Markdown
Member

@schrockn schrockn commented Apr 3, 2026

Summary & Motivation

Test Plan

Changelog

The changelog is generated by an agent that examines merged PRs and
summarizes/categorizes user-facing changes. You can optionally replace
this text with a terse description of any user-facing changes in your PR,
which the agent will prioritize. Otherwise, delete this section.

Copy link
Copy Markdown
Member Author

schrockn commented Apr 3, 2026

This stack of pull requests is managed by Graphite. Learn more about stacking.

@greptile-apps
Copy link
Copy Markdown

greptile-apps bot commented Apr 3, 2026

Greptile Summary

This PR refines the dignified-python skill from an absolute "LBYL always" stance to a more nuanced house-style guide, corrects two technically incorrect claims about the Python pathlib API, fixes example code that recommended brittle pre-checks over proper parser calls, and removes internal "erk" branding in favour of generic placeholder names.

Confidence Score: 5/5

Safe to merge — all changes are documentation corrections with no logic or code changes.

All 12 changed files are markdown documentation. The PR corrects two verifiably wrong Python API claims (Path.resolve() raising by default, is_relative_to() raising ValueError), replaces brittle string pre-check examples with correct try/except-around-parser patterns, fixes YAML frontmatter reference paths, and debrands internal erk names. All referenced files (subprocess.md, typing-advanced.md, etc.) were confirmed to exist in the repo. No P0/P1 findings.

No files require special attention.

Important Files Changed

Filename Overview
skills/dignified-python/skills/dignified-python/dignified-python-core.md Softened LBYL-over-EAFP rule to a contextual preference; corrected two wrong pathlib claims (resolve() does not raise by default, is_relative_to() returns bool not ValueError); example imports debranded from erk to myapp.
skills/dignified-python/skills/dignified-python/references/advanced/exception-handling.md Replaced brittle LBYL pre-check examples (str.isdigit, hand-rolled ISO date check) with correct try/except-around-parser pattern; adds raise-from exception chaining in the CLI boundary example.
skills/dignified-python/skills/dignified-python/SKILL.md Fixed YAML frontmatter reference paths (added references/ prefix for advanced docs, renamed core-standards to dignified-python-core); updated description and pattern-detection prose.
skills/dignified-python/skills/dignified-python/references/README.md Updated all relative links to match renamed/moved files; adjusted LBYL philosophy description to match the softer house-style framing.
skills/dignified-python/skills/dignified-python/references/checklists.md Updated pathlib checklist items to reflect correct API behaviour (exists() is optional, is_relative_to() is boolean); exception checklist softened from dogmatic to pragmatic language.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[User invokes /dignified-python] --> B[Load dignified-python-core.md]
    B --> C{Detect Python version}
    C --> D[versions/python-3.10.md]
    C --> E[versions/python-3.11.md]
    C --> F[versions/python-3.12.md]
    C --> G[versions/python-3.13.md]
    B --> H{Task context?}
    H -- click/CLI --> I[cli-patterns.md]
    H -- subprocess --> J[subprocess.md]
    H -- API design --> K[references/advanced/api-design.md]
    H -- exceptions --> L[references/advanced/exception-handling.md]
    H -- interfaces --> M[references/advanced/interfaces.md]
    H -- typing --> N[references/advanced/typing-advanced.md]
    H -- module design --> O[references/module-design.md]
    H -- checklists --> P[references/checklists.md]
Loading

Reviews (1): Last reviewed commit: "Fix issues in dignified-python" | Re-trigger Greptile

…_parse helper

Remove hedging language ("house style", "team style guide", "not a universal Python rule")
throughout all dignified-python skill files. Replace separate parse_port/parse_timestamp
examples with a generic try_parse helper function.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Comment on lines +69 to +74
def try_parse(parse: Callable[[str], T], value: str, default: T) -> T:
"""Parse *value* with *parse*, returning *default* on ValueError."""
try:
return parse(value)
except ValueError:
return default
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is too generic. let's just do the int example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant