Skip to content

chore: add 5 return type hints in completer.py#15159

Open
travellingsoldier85 wants to merge 1 commit intoipython:mainfrom
travellingsoldier85:auto-improve/type_hint/209aa0-202603170902
Open

chore: add 5 return type hints in completer.py#15159
travellingsoldier85 wants to merge 1 commit intoipython:mainfrom
travellingsoldier85:auto-improve/type_hint/209aa0-202603170902

Conversation

@travellingsoldier85
Copy link

Summary

Added concrete return type annotations to functions in IPython/core/completer.py based on static analysis of return statements.

Changes

  • Add return type hint -> list to function
  • Add return type hint -> list to function
  • Add return type hint -> tuple to function
  • Add return type hint -> bool to function
  • Add return type hint -> list to function

Type of Change

  • Code quality improvement (type hints)
  • Bug fix
  • New feature

Motivation

These type annotations are inferred from actual return values in the function bodies (e.g. return True-> bool, return []-> list). They improve:

  • IDE autocompletion and type checking (mypy/pyright)
  • Code readability for contributors navigating the codebase
  • Bug prevention via static analysis

No functional changes — only type annotations added.

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