-
Notifications
You must be signed in to change notification settings - Fork 370
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
Dev no relative imports 2 #1277
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…d code removed a long time ago in e7a4305
…way because it never worked
…r janitorial work
…fix some weird imports for cv2
…lear it's a caiman thing
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This is a successor to #1202 (which was too stale to commit and probably benefitted anyhow from another look).
At point of PR it's relatively maximalist (except in a few cases where I backed off a bit), particularly in cases where the full name of a function competes with a local name (where I think we really need to go to the extra effort to distinguish them).
After the PR exists:
A) I'll fix anything that CI catches
B) I'll go back and look at walking some of this; being able to reliably know from looking at code where something came from is important (and where an object, method, or local function has the same name as a pathed function/class, staying maximalist makes sense no matter how long things get), but where pathed functions get long enough and there are no overlaps, I'll consider doing named function imports. Particularly where we're just doing one import. I think this is a workable compromise and will get us more consistency than what we'd get if we go to bat for-or-against particular cases.
C) I'll also have to grep the codebase for any more relative imports, as I may have missed some. Hoping to also entirely get rid of any instances of "import caiman as cm / cm.foo()" which is not grep-friendly b/c of matplotlib.cm.foo() and a few other weird things.
I'll be landing this pretty soon to avoid risk of merge conflicts because it touches a lot of the codebase and I don't want to redo it again