Skip to content

Add explicit APIs to robot root package and to all sub packages #5414

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
pekkaklarck opened this issue Apr 27, 2025 · 0 comments
Closed

Add explicit APIs to robot root package and to all sub packages #5414

pekkaklarck opened this issue Apr 27, 2025 · 0 comments

Comments

@pekkaklarck
Copy link
Member

We added explicit public API to the robot.api package in RF 7.2 (#5245) using redundant import aliases like from robot.parsing import get_tokens as get_tokens. That has worked well and we should now do the same with the robot root package and all sub packages. Most important reasons are:

  • It is in general a good idea to specify public API. Not all sub packages are part of the actual public API, but even internally explicit APIs are good.
  • Linters complain about normal imports that aren't used. Using redundant import aliases or __all__ avoids that, and we decided to go with the former approach earlier. We want to do linting as part of code formatting (see Automatic code formatting #5387).
  • Explicit package APIs ought to help with IDEs when they add automatic imports.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant