Skip to content

Rewrite Qt imports without wildcards - #3881

Merged
nycrat merged 2 commits into
masterfrom
avah/remove_wildcard_imports_qt
Aug 25, 2026
Merged

Rewrite Qt imports without wildcards#3881
nycrat merged 2 commits into
masterfrom
avah/remove_wildcard_imports_qt

Conversation

@nycrat

@nycrat nycrat commented Aug 19, 2026

Copy link
Copy Markdown
Member

Description

Look at #3645 for context. Basically we're trying to remove all wildcard imports in python because they don't work well with LSP, and contributes to namespace pollution (https://peps.python.org/pep-0008/#imports).

This PR re-writes all the import statements related to Qt/our Thunderscope graphics code to not use wildcard imports, and instead imports entire modules instead.

Testing Done

Ran thunderscope, and the UI and simulated gameplay looks the same. Also ran the full test suite, and all tests pass.

Resolved Issues

contributes to #3645, but not resolved yet

Length Justification and Key Files to Review

Lots of small refactoring changes, should be easy to review.

Review Checklist

It is the reviewers responsibility to also make sure every item here has been covered

  • Function & Class comments: All function definitions (usually in the .h file) should have a javadoc style comment at the start of them. For examples, see the functions defined in thunderbots/software/geom. Similarly, all classes should have an associated Javadoc comment explaining the purpose of the class.
  • Remove all commented out code
  • Remove extra print statements: for example, those just used for testing
  • Resolve all TODO's: All TODO (or similar) statements should either be completed or associated with a github issue

Apeiros-46B
Apeiros-46B previously approved these changes Aug 22, 2026

@Apeiros-46B Apeiros-46B left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, thunderscope works and tests are passing for me too

@GrayHoang GrayHoang left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Minor nits, thanks for cleaning this up

Comment thread src/software/thunderscope/common/fps_widget.py Outdated
Comment thread src/software/thunderscope/common/fps_widget.py Outdated
@nycrat
nycrat force-pushed the avah/remove_wildcard_imports_qt branch from fd34ee4 to fecd004 Compare August 24, 2026 21:45

@StarrryNight StarrryNight left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looked at a few of them and they Lgtm.

@nycrat
nycrat merged commit 1c6a96a into master Aug 25, 2026
8 checks passed
@nycrat
nycrat deleted the avah/remove_wildcard_imports_qt branch September 5, 2026 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants