Post #1821652
2026-04-29 01:59 UTC
Dykes "first pass" was making sure that exactly this works.
Type hint your argument class with a Path and get the right behavior.
My word counter's looks like this:
```
@dataclass
class WordCounter:
"""
A simple markdown word counter.
"""
paths: Annotated[list[Path], "Paths to files to operate on."]
debugging: Annotated[bool, "Show debugging output."] = False
```
https://mastodon.social/@treyhunner/116485316980526241
Replies (0)
No replies.