Skip to content

ci: more ty mangling#35

Merged
vEnhance merged 10 commits intomainfrom
claude/fix-type-checking-gT3uN
Apr 3, 2026
Merged

ci: more ty mangling#35
vEnhance merged 10 commits intomainfrom
claude/fix-type-checking-gT3uN

Conversation

@vEnhance
Copy link
Copy Markdown
Owner

@vEnhance vEnhance commented Apr 3, 2026

No description provided.

claude added 10 commits April 3, 2026 19:43
- Add pyproject.toml configuring ty to target Python 3.11 and ignore
  unresolved-import errors for third-party packages not in this env
- config/qutebrowser/config.py: use cast(Any, None) in TYPE_CHECKING
  block so c and config are typed Any (bare annotations aren't definitions)
- dot/jupyter/jupyter_notebook_config.py: suppress get_config undefined
  reference with type: ignore (injected by Jupyter at runtime)
- py-scripts/wah.py: annotate data as Dict[str, Any] and replace walrus
  operator pattern that ty couldn't narrow through
- venueQ/venueQ.py: add _Vim stub class so vim has correct attribute types
  in TYPE_CHECKING context; rename deprecated warn() to warning()
- py-scripts/aur-auto-vote-with-chaotic.py: remove now-unused type: ignore

https://claude.ai/code/session_01Pa53zwdcjHTSJcRZUxD6ib
- Replace pyproject.toml with ty.toml (more appropriate for a dotfiles
  repo that isn't a Python project)
- Drop python-version setting; only configure unresolved-import = "ignore"
- venueQ/otis.py: replace datetime.UTC (Python 3.11+) with
  timezone.utc which works in all Python 3 versions

https://claude.ai/code/session_01Pa53zwdcjHTSJcRZUxD6ib
- ty.toml: ignore deprecated rule (os.system and argparse.FileType
  deprecations are 3.14-era soft deprecations, not actionable now)
- py-scripts/wah.py: cast Fore/Style/Back to Any after import; colorama
  is installed so ty resolves its stubs and incorrectly types the ANSI
  color constants as Literal[int] instead of str

https://claude.ai/code/session_01Pa53zwdcjHTSJcRZUxD6ib
- ty.toml: remove deprecated = "ignore" now that issues are fixed
- cp-templates/main.py: replace argparse.FileType with open() after parsing
- py-scripts/demacro.py: replace os.system() with subprocess.run() and
  os.makedirs(); use Path.expanduser() instead of shell ~ expansion
- py-scripts/oscar.py: replace argparse.FileType with plain str args,
  open files after parsing in __main__

https://claude.ai/code/session_01Pa53zwdcjHTSJcRZUxD6ib
The colorama integer-literal type bug is fixed in ty 0.0.28; no need
to work around it in code.

https://claude.ai/code/session_01Pa53zwdcjHTSJcRZUxD6ib
yaml is installed in the real environment so ty 0.0.28 can resolve
SafeDumper's attributes cleanly; the suppressions are no longer needed.

https://claude.ai/code/session_01Pa53zwdcjHTSJcRZUxD6ib
- ty.toml: replace blanket unresolved-import rule with just excluding
  the 3kon submodule (which imports fa_icons)
- py-scripts/cal2discord.py: add per-line type: ignore[unresolved-import]
  for humanize, recurring_ical_events, discord_webhook, icalendar
- venueQ/__init__.py: add package init re-exporting from venueQ.venueQ
  so "from venueQ import ..." resolves correctly for ty
- py-scripts/orch.py, venueQ/venueQ.py: replace direct attribute
  assignment/access on SafeDumper with setattr/getattr to avoid
  unresolved-attribute errors when yaml stubs are available

https://claude.ai/code/session_01Pa53zwdcjHTSJcRZUxD6ib
@vEnhance vEnhance merged commit 6d9a411 into main Apr 3, 2026
2 checks passed
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.

2 participants