Skip to content

Conversation

@jeromeetienne
Copy link
Contributor

Added float type hinting, without it, the type hint is assume to be a int. In var=0, 0 is integer so it got confused

Added `float` type hinting, without it, the type hint is assume to be a `int`. In var=0, `0` is integer so it got confused
@rougier
Copy link
Owner

rougier commented Oct 6, 2025

Not sure to see where it is necessary.

@jeromeetienne
Copy link
Contributor Author

pylance/pyright will detect the following as an error.

matrix.xrotate(10.0)

because the user is using a float when the function expect a int

@rougier
Copy link
Owner

rougier commented Oct 6, 2025

There will be an implicit conversion anyway. But I agree with the fix. My only problem would be to make the fix on gsp directly. This code is kind of legacy and the new glm might deserve type hinting.

@jeromeetienne
Copy link
Contributor Author

@rougier this PR is on repo https://github.com/rougier/matplotlib-3d . This is unrelated to current GSP code

if you agree with the fix, can you merge it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants