Commit a490bcf
fix: resolve mypy type errors and exclude test cassettes from yamllint (#9)
* fix: resolve mypy type errors and exclude test cassettes from yamllint
- Add explicit type annotations for after_date variables in cli.py to fix
mypy type inference errors when using datetime | None across if/elif branches
- Exclude tests/cassettes/ directory from yamllint checks since these are
auto-generated VCR.py test fixtures with formatting that violates yamllint
rules (long lines, indentation)
Fixes mypy errors:
- cli.py:374 - Incompatible types in assignment (datetime | None vs datetime)
- cli.py:529 - Incompatible types in assignment (datetime | None vs datetime)
All pre-commit hooks now pass except no-commit-to-branch (expected on master).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor: address CodeRabbit review feedback
- Use explicit glob pattern `tests/cassettes/**` in yamllint config for
clarity (instead of `tests/cassettes/`)
- Hoist datetime variable declarations in ascents and stats commands to
improve type checker flow analysis and avoid redefinition warnings
- Declare `after_date` and `before_date` as `datetime | None` upfront
before if/elif blocks for cleaner scoping
Addresses CodeRabbit nitpick comments on PR #9.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 1faa61c commit a490bcf
3 files changed
+735
-724
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
4 | 7 | | |
5 | 8 | | |
6 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
361 | 361 | | |
362 | 362 | | |
363 | 363 | | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
364 | 367 | | |
365 | 368 | | |
366 | 369 | | |
| |||
516 | 519 | | |
517 | 520 | | |
518 | 521 | | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
519 | 525 | | |
520 | 526 | | |
521 | 527 | | |
| |||
0 commit comments