pypi basedpyright 1.32.0
v1.32.0 (pyright 1.1.407)

22 hours ago

What's Changed

enableBasedFeatures

until now, basedpyright-exclusive type checking features have mostly come in the form of an additional diagnostic rule that users have the option to disable. but this approach limits us from making any interesting breaking changes to the type system itself.

this release introduces a new setting called enableBasedFeatures, which is disabled by default. enabling it will opt you into any changes we make that introduce breaking changes to the type system. in other words, if you're developing a library and expect your users to be using other type checkers, you should probably keep it disabled.

currently only one feature is behind this flag: the new skip_replace argument to the @dataclass_transform, implemented by @decorator-factory in #1568

new diagnostic rule - reportSelfClsDefault

Pyright allows specifying a default value for self in instance methods and cls in class methods:

class Foo:
    def foo(self=1):
        ...

this is almost certainly a mistake, so this new diagnostic rule will warn against it.

also implemented by @decorator-factory in #1581

docs

other changes

  • use the name basedpyright instead of python when instantiating vscode's LanguageClient so that the logging can be configured using basedpyright.trace.server by @DetachHead in #1583
  • [zh-cn l10n] fix incorrect translation of paramNameMissing by @NCBM in #1588
  • Merge pyright 1.1.407 by @DetachHead in #1590

Full Changelog: v1.31.7...v1.32.0

Don't miss a new basedpyright release

NewReleases is sending notifications on new releases.