What's Changed
new diagnostic rules
reportIncompatibleUnannotatedOverride
pyright's reportIncompatibleVariableOverride
rule does not report an error if the attribute in the base class does not have a type annotation:
class A:
value = 1 # inferred as `int`
class B(A):
value = None # no error, even though the type on the base class is `int` and the type here is `None`
the new reportIncompatibleUnannotatedOverride
rule will report an error in such cases. note that this rule is intended to replace reportUnannotatedClassAttribute
in the future, but it is currently disabled by default. see the docs for more information
implemented in #1207
reportInvalidAbstractMethod
pyright ignores methods decorated with @abstractmethod
if the class is not abstract:
from abc import abstractmethod
class Foo:
@abstractmethod
def foo(): ...
Foo() # no error
the new reportInvalidAbstractMethod
rule will report an error on the method definition. see the docs for more info
implemented in in #1238
other changes
- update the pylance modal dialog to just disable the conflicting settings instead of uninstall pylance because vscode always just reinstalls it automatically by @DetachHead in #1229
- add option to configure the path to the baseline file by @ivanbelenky in #1234
- update pycharm documentation and config by @DetachHead in #1219
- fix upstream bug where
basedpyright.disableLanguageServices
incorrectly disables diagnostics when pull diagnostics is enabled by @DetachHead in #1231
New Contributors
- @ivanbelenky made their first contribution in #1234
Full Changelog: v1.28.5...v1.29.0