Skip to content

Typehint most of magic.py#1322

Merged
rolandwalker merged 1 commit into
mainfrom
RW/typehint-magic-py
Aug 16, 2025
Merged

Typehint most of magic.py#1322
rolandwalker merged 1 commit into
mainfrom
RW/typehint-magic-py

Conversation

@rolandwalker

Copy link
Copy Markdown
Contributor

Description

Changes

  • add type hints and needed imports
  • account for magic.py passing init_command=None to connect(), instead of str
  • doubly ignore undefined get_ipython()
  • update the changelog entry to reflect that typehinting is complete, outside of the test suite

Incidentally remove a type: ignore comment from main.py which is no longer needed.

No meaningful return value was deduced for mycli_line_magic().

Checklist

  • I've added this contribution to the changelog.md.
  • I've added my name to the AUTHORS file (or it's already there).
  • I ran uv run ruff check && uv run ruff format to lint and format the code.

 * add type hints and needed imports
 * account for magic.py passing init_command=None to connect(), instead
   of str
 * doubly ignore undefined get_ipython()
 * update the changelog entry to reflect that typehinting is complete,
   outside of the test suite

Incidentally remove a "type: ignore" from main.py which is no longer
needed.

No meaningful return value was deduced for mycli_line_magic().
@rolandwalker rolandwalker self-assigned this Aug 16, 2025
@rolandwalker rolandwalker merged commit df22512 into main Aug 16, 2025
8 checks passed
@rolandwalker rolandwalker deleted the RW/typehint-magic-py branch August 16, 2025 14:43
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