rope icon indicating copy to clipboard operation
rope copied to clipboard

Type annotations for public API would be nice

Open smheidrich opened this issue 1 year ago • 0 comments

Is your feature request related to a problem? Please describe. Most of the project's public API lacks static type annotations and consequently there is also no py.typed marker that signals to library consumers that their usages of these APIs may be type checked.

Describe the solution you'd like It would be nice if at least the public API of this project was fully statically typed and then a py.typed marker added so that dependent projects can check that their usages of this library are correct, get type-based IDE autocompletion etc.

Describe alternatives you've considered

  • Wait for a 3rd party to publish a type stubs package. But there already are some type hints in Rope's codebase, so I don't see the point.

Additional context

  • API docs as suggested in #796 would also greatly benefit from type annotations.
  • Pyright's --verifytypes option may be used to check if the public interface is in fact "type complete". Mypy might have something similar in the form of coverage reports.

smheidrich avatar Sep 20 '24 19:09 smheidrich