Skip to content

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

@pekkaklarck

Description

@pekkaklarck

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.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions