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

Fix rustworkx.layers return typing #1340

Open
amirebrahimi opened this issue Dec 18, 2024 · 2 comments · May be fixed by #1341
Open

Fix rustworkx.layers return typing #1340

amirebrahimi opened this issue Dec 18, 2024 · 2 comments · May be fixed by #1341
Labels
bug Something isn't working

Comments

@amirebrahimi
Copy link

Information

  • rustworkx version: 0.14.2
  • Python version: 3.9.12
  • Rust version:
  • Operating system: Windows 10

What is the current behavior?

rustworkx.layers has typing info stating it returns a list[int], which causes an issue with mypy.

What is the expected behavior?

Should be list[list[int]].

Steps to reproduce the problem

Make use of the function somewhere and run mypy.

@amirebrahimi amirebrahimi added the bug Something isn't working label Dec 18, 2024
@IvanIsCoding
Copy link
Collaborator

I will send a fix. Thanks for finding the bug.

Until the next version is released you’ll need to ignore the mypy error for those calls or manually call cast

@amirebrahimi
Copy link
Author

Thank you.

@IvanIsCoding IvanIsCoding linked a pull request Dec 19, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants