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

Efficient imports #5024

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

GarethCabournDavies
Copy link
Contributor

@GarethCabournDavies GarethCabournDavies commented Jan 24, 2025

In an attempt to remove "from xxx import *"-style imports from more places, I've used git grep import | grep "*" | grep -v css| grep -v __init__ to find any places where this is used.

I then commented out the import, ran the tests to find what needs importing and getting that explicitly (not the most sophisticated, but seems to have worked).

After this change there is now 1 place which uses "from xxx import *", which is the versioning module, and I think that is valid.

The changes are mainly in the test suite - I've tried as much as possible to get tests to now pass, using cpu and cuda schemes, as these were what was catered for before!

I'd like to have other schemes / backends working, and some cuda tests fail, but that is for another PR

Standard information about the request

This is a code quality change
This change affects: the offline search, the live search, inference, PyGRB

This change: has appropriate unit tests, follows style guidelines (See e.g. PEP8), has been proposed using the contribution guidelines

Motivation

#4783

Testing performed

Ran tests manually - they worked. The CI will also check this

  • The author of this pull request confirms they will adhere to the code of conduct

@GarethCabournDavies GarethCabournDavies added the code-quality Improvements to code quality label Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code-quality Improvements to code quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant