refactor(robot-server): Remove most __init__.py re-exports #14543
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
Rip off the band-aid in
robot-server
: remove re-exports from most__init__.py
files, following our new Python guidelines. See there for a rationale.Testing with the same command as #14480 suggests this will provide a slight speedup from ~31 sec. to ~29 sec. I don't consider that worthwhile to merge into
chore_release-7.2.0
, so this is targeted toedge
. This is really more intended to set a consistent pattern to follow, rather than make any real performance improvements. Real performance improvements will come from doing this inapi
.Test plan
We're covered by automated tests.
Review requests
As described in our new Python guidelines, we should now use
_underscore_prefixes
to indicate that a module is private. I've done that insiderobot_server.persistence
because I just worked on that code and I'm familiar with it, but I haven't done it elsewhere. So this PR might accidentally make a bunch of files look more public than before. Is that acceptable, or do we want to put more effort into tidying that up right now?Risk assessment
Very low.