-
-
Notifications
You must be signed in to change notification settings - Fork 482
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
signature
for permutations has inconsistent signature compared to its behavior
#36198
Comments
Yes, one need mypy, most probably.
No idea how it plays with cython, though. Should we run mypy on all the *.py files, at least, in our CI? |
|
I tried
|
…hods return type `Integer` instead of type `int`.
I am using the bash alias
|
<!-- ^ Please provide a concise and informative title. --> <!-- ^ Don't put issue numbers in the title, do this in the PR description below. --> <!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method to calculate 1 + 2". --> <!-- v Describe your changes below in detail. --> <!-- v Why is this change required? What problem does it solve? --> <!-- v If this PR resolves an open issue, please link to it here. For example, "Fixes sagemath#12345". --> Configuration from sagemath#36198 (comment) @fchapoton @jhpalmieri ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> - [x] The title is concise and informative. - [ ] 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. For example, --> <!-- - sagemath#12345: short description why this is a dependency --> <!-- - sagemath#34567: ... --> URL: sagemath#37522 Reported by: Matthias Köppe Reviewer(s): Frédéric Chapoton
Steps To Reproduce
as compared to
in combinat/permutation.py
Expected Behavior
I think that
signature
should return anInteger
, not anint
. There may be similar issues in this file; for exampleand a few others that are supposed to return type
Integer
but actually returnlen(something)
.Actual Behavior
The method returns an
int
, not anInteger
.Additional Information
See https://stackoverflow.com/questions/77052185/unexpected-error-with-sign-function-in-sagemath/77054009#77054009 for one person running into problems because of this.
Environment
Checklist
The text was updated successfully, but these errors were encountered: