~/talk

Chasten Your Python Program: Configurable Program Analysis and Linting with XPath

Talkat PyOhio 2025 · 2025-07-26..07-27· [developer-experience, testing]
slides:none on file

Chasten is an open source Python tool that runs XPath queries over the Python AST (via pistgrep) to implement YAML-configured checks, emit results to JSON/CSV/SQLite and serve interactive views with Datasette. Example run finds seven nested-loop matches in a small codebase; rules live in a YAML database and gates can fail CI builds. It trades type inference and Rust-level speed for ease of ad hoc pattern writing and project-specific linting.

AI-written summary · about

  1. 0:00Chasten introduction
  2. 3:58Who benefits from Chasten
  3. 8:55Avoid reinventing analysis
  4. 12:29Alternatives to regular expressions for code analysis
  5. 16:21Understanding abstract syntax trees in Python
  6. 20:15Chasten and PIST grep
  7. 23:26Detecting nested loops
  8. 26:15Chasten limitations
  9. 28:21Conclusion
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.