-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat: add hadd #5
Conversation
Cannot figure out why it is a problem that I have "from operations.hadd import *" in the init file? |
from module import * is generally scorned nowadays, like import module as m or import SomeClass from module say in the import statement what new name is being added to the namespace. Importing x = 123
from module import * might replace Since the purpose of a linter is to discourage bad choices, it's telling you to not do that. If you have some particular classes or functions to copy from the However, if you disagree, you can tell ruff to stop complaining by adding a from odapt.operations.hadd import * ; noqa: F403 (That's what the code number for this error is for: so that you have a quick way to mute this specific error, while still checking for everything else.) It's also possible to tell ruff to not check for certain types of errors in certain files in the pyproject.toml (I think). If you copied this I don't think that applies to your situation here: you probably have only one or two functions in By the way, most packages nowadays encourage a two-letter abbreviation for themselves, like import numpy as np and import awkward as ak Whether people use it depends on how much they think other people use it as a convention, and that can be encouraged by documentation. Odapt shortens nicely to |
Appeasing the linter, specifying what functions are imported.
Okay, thank you! I will do as the linter says, yes there are few functions so it's easy (though I still have to add noqa comments because it considers them unused inputs...hope that is normal), and definitely about the import odapt as od, I will add it to the docs! |
No description provided.