3 ms·
I linked directly to the section of mypy docs that shows you are wrong - all you have to do is click the link to understand that you are wrong: >(Using stub fi
by mathisfun123 3y ago
I linked directly to the section of mypy docs that shows you are wrong - all you have to do is click the link to understand that you are wrong:
>(Using stub file syntax at runtime). You may also occasionally need to elide actual logic in regular Python code... You can also elide default arguments as long as the function body also contains no runtime logic: the function body only contains a single ellipsis, the pass statement, or a raise NotImplementedError(). It is also acceptable for the function body to contain a docstring. For example:
- veber-alex 3y agoAnd why would I care about mypy docs? pyright does the correct thing by showing an error. In any case, the second example is definitely not a stub.
- mathisfun123 3y agothis is the weirdest "head in sand" moment; you literally called out mypy as a desirable alternative >And to add insult to injury Pycharm doesn't even have a pyright plugin and the mypy plugin is extremely slow and buggy. ie you recognize that aligning with mypy is desirable.