Note that `Locale.parse()` does not accept `None` by akx · Pull Request #978 · python-babel/babel
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a bit complicated here since all the LC_... constants could be None if there is a problem determining the default and they are potentially passed to this method, meaning for type checkers, it sees this function as accepting None, but always raising the exception here.
Effectively, the input hasn't changed, but now in the case where there's no default, a TypeError will occur instead of an AttributeError later on.