-
-
Notifications
You must be signed in to change notification settings - Fork 491
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
cython-lint : add note about unused imports #36053
cython-lint : add note about unused imports #36053
Conversation
dd9a31b
to
f5c81ff
Compare
this seems to trigger an import failure. I have no idea why and how |
These are not unused imports. The functions in this module are called by mpmath. |
f5c81ff
to
1b03ee5
Compare
thanks. This seems to be a rather dubious situation. One should change the place using these things inside mpmath, so that it imports from the correct place, maybe ? |
@@ -4,6 +4,7 @@ Faster versions of some key functions in mpmath.libmp | |||
from .ext_impl cimport * | |||
from sage.libs.gmp.all cimport * | |||
|
|||
# the next line is used by mpmath | |||
from .ext_impl import exp_fixed, cos_sin_fixed, log_int_fixed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think some use the idiom from .ext_impl import exp_fixed as exp_fixed, cos_sin_fixed as cos_sin_fixed, log_int_fixed as log_int_fixed
to explain that the purpose of the import is to fill the namespace
I don't know if this would suppress the cylint warning
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not think changing the import would be useful. Let just add a note to remember where this is used.
Documentation preview for this PR (built with commit 193e644; changes) is ready! 🎉 |
<!-- ^^^^^ Please provide a concise, informative and self-explanatory title. Don't put issue numbers in there, do this in the PR body below. For example, instead of "Fixes sagemath#1234" use "Introduce new method to calculate 1+1" --> <!-- Describe your changes here in detail --> removing some unused imports, following suggestions of cython-lint <!-- Why is this change required? What problem does it solve? --> <!-- If this PR resolves an open issue, please link to it here. For example "Fixes sagemath#12345". --> <!-- If your change requires a documentation PR, please link it appropriately. --> ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> <!-- If your change requires a documentation PR, please link it appropriately --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> <!-- Feel free to remove irrelevant items. --> - [x] The title is concise, informative, and self-explanatory. - [x] The description explains in detail what this PR is about. - [ ] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation accordingly. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on - sagemath#12345: short description why this is a dependency - sagemath#34567: ... --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> URL: sagemath#36053 Reported by: Frédéric Chapoton Reviewer(s): Frédéric Chapoton, Matthias Köppe
removing some unused imports, following suggestions of cython-lint
📝 Checklist
⌛ Dependencies