I wrote some bad code which mypy didn't catch. It boils down to:
class FooError(Exception):
pass
raise FooError("Couldn't foo {username}", username="username")
Running the above yields: TypeError: FooError does not take keyword arguments but mypy doesn't complain. Probably because:
class BaseException:
def __init__(self, *args: object, **kwargs: object) -> None: ...
I'd just make a change but part of me wonders if this was done on purpose.
I wrote some bad code which mypy didn't catch. It boils down to:
Running the above yields:
TypeError: FooError does not take keyword argumentsbut mypy doesn't complain. Probably because:I'd just make a change but part of me wonders if this was done on purpose.