Skip to content

Refactor: Improve type hinting in CoreUtilsMixin#324

Merged
vicsanity623 merged 1 commit into
mainfrom
pyob-evolution-v2-1779959885
May 28, 2026
Merged

Refactor: Improve type hinting in CoreUtilsMixin#324
vicsanity623 merged 1 commit into
mainfrom
pyob-evolution-v2-1779959885

Conversation

@pyob-bot
Copy link
Copy Markdown
Collaborator

Summary of Changes

This PR improves type safety within src/pyob/core_utils.py by adding explicit type annotations to local variables and method signatures.

  • Added explicit str type annotations to input_str variables in _win32_input and the Unix-based input method.
  • Added a -> None return type hint to the restore_workspace method.

Technical Impact

  • Code Quality: Enhances static analysis and IDE autocompletion support.
  • Maintainability: Improves code readability and ensures consistency with modern Python type-hinting standards.
  • Safety: Reduces the risk of type-related bugs by making variable expectations explicit.

@vicsanity623 vicsanity623 merged commit c08c831 into main May 28, 2026
1 check passed
@vicsanity623 vicsanity623 deleted the pyob-evolution-v2-1779959885 branch May 28, 2026 11:23
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