Skip to content
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

refactor(robot-server): Remove most __init__.py re-exports #14543

Merged
merged 12 commits into from
Feb 23, 2024

Conversation

SyntaxColoring
Copy link
Contributor

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 to edge. 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 in api.

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 inside robot_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.

@SyntaxColoring SyntaxColoring added the robot server Affects the `robot-server` project label Feb 23, 2024
@SyntaxColoring SyntaxColoring requested a review from a team February 23, 2024 19:37
@SyntaxColoring SyntaxColoring requested a review from a team as a code owner February 23, 2024 19:37
Copy link
Member

@sfoster1 sfoster1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very very nice

@SyntaxColoring SyntaxColoring merged commit 4c2d5ba into edge Feb 23, 2024
17 checks passed
@SyntaxColoring SyntaxColoring deleted the rewrite_imports branch February 23, 2024 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
robot server Affects the `robot-server` project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants