Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@edreamleo
Copy link
Contributor

@edreamleo edreamleo commented Dec 17, 2022

This PR suggests suppressing and updating annotations in stages:

  • Stage 1: Add annotations and # type:ignore comments to eliminate all mypy complaints.
  • Stage 2: Add annotations for args such as pyfunction, pymodule, pyobject and scope.
  • Stage 3: Remove most # type:ignore comments.
    • Allow # type:ignore comments for optional import statements.
    • For now, skip mypy checking for type_hinting/evaluate.py, prefs.py and versioning.py.
  • Stage 4: Require full annotations for important type inference files.
    • Remove most Any annotations.
  • Stage 5: (Optional) Require full annotations for all (most?) files in rope.base.

Valid mypy complaints

The following complaints suggest real errors in Rope:

  • MoveGlobal.get_changes: "Resource" has no attribute "has_child"/ "get_child".
  • _GlobalUnboundNameFinder.__init__: "PyObject" has no attribute "get_scope".
  • AutoImport._get_python_folders:
    error: Incompatible types in assignment
    (expression has type "filter[Path]", variable has type "map[Path]")

@edreamleo edreamleo marked this pull request as draft December 17, 2022 14:39
@edreamleo edreamleo marked this pull request as ready for review January 1, 2023 16:16
@edreamleo
Copy link
Contributor Author

Fixed at Rev e121c8f.

@edreamleo edreamleo marked this pull request as draft February 11, 2023 02:57
@edreamleo
Copy link
Contributor Author

@lieryan I am going to close this PR.

I'll use ekr-fork-rope2 to work on the Theory of Operation without bothering you.

@edreamleo edreamleo closed this Feb 20, 2023
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