| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
LGTM, you an merge it yourself once the tests pass. Yay! |
Sorry, something went wrong.
|
Hold on, I don't know the binder that well. --Guido (mobile)
|
Sorry, something went wrong.
|
One caveat that I realized is that this will widen the type if you assert something very defensively. For example: def f(x: int):
assert isinstance(x, object)
# x now has type object
return x + 1 # errorI ran this against our current annotations and found one instance of something like this. (Worked fine otherwise, though!) |
Sorry, something went wrong.
|
And what does the equivalent code using `if isinstance(x, object)` do?
|
Sorry, something went wrong.
|
Just checked -- it has the same behavior. (Which make sense, as I based this code on the if isinstance(...) code.) |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Fixes #475.
Should probably be reviewed by someone who understands the checker's self.binder.