Conversation
|
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
| def parseBang(self, block: Node) -> Literal[True]: ... | ||
| def parseCloseBracket(self, block: Node) -> Literal[True]: ... | ||
| def addBracket(self, node, index, image) -> None: ... | ||
| def addBracket(self, node: Node, index: int, image: bool | None) -> None: ... |
There was a problem hiding this comment.
Not sure if None is completely appropriate here. It technically works, but looking at the source, it's always used as a boolean, no None check, and only ever passed True or False in this method's usage.
But I also see that when a parameter is unused, the source defaults it to None, even boolean.
There was a problem hiding this comment.
That's why I left None because the internal logic doesn't prohibit it
maybe someone prefers not to pass this argument then it will work as False
There was a problem hiding this comment.
Well in this case if you don't pass an argument you'll get TypeError: addBracket() missing 1 required positional argument: 'image' 😉
But semantic details aside, reviewing this PR made me realize the library this stubs is archived and deprecated. And now that you completed it, I think it's good for a sendoff. #13725
There was a problem hiding this comment.
indeed, this can be fixed together with dict in PR before deletion
No description provided.