| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
|
||
| with pytest.raises(TypeError, match="multiple values for argument 'rect'"): | ||
| fig.add_axes([0, 0, 1, 1], rect=[0, 0, 1, 1]) | ||
| fig.add_axes((0, 0, 1, 1), rect=[0, 0, 1, 1]) |
There was a problem hiding this comment.
rect should also be a tuple, though I'm surprised you don't get a type error for invalid parameters here (though that's on purpose and should be ignored.)
Sorry, something went wrong.
There was a problem hiding this comment.
This is because I identify one type of error and then do regex-based search and replace for that on all files.
Sorry, something went wrong.
|
Will sort the comments out and over time find and fix more if this type when bored. |
Sorry, something went wrong.
|
I take the liberty of putting this one in draft since it seems to be contingent on @oscargus' boredom levels. |
Sorry, something went wrong.
|
I am also in favor of these changes, of course lists work, but don't allow you to specify length, which is why the type hints are Tuple... since the number of elements is super important for these cases |
Sorry, something went wrong.
|
I took the liberty to rebase and fix the commented issues. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
PR summary
Not sure if this is wanted, so I have only done this for a few methods as a discussion opener.
Background: I got a typing error in my editor when looking at an example.
It seems to me that if we type something as a tuple (and not as a tuple or a list), it makes sense to provide a tuple in all examples (and tests as I did some search-and-replace). But then I do not know the background to typing it as a tuple only.
PR checklist