Releases: DetachHead/basedpyright
v1.32.1 (pyright 1.1.407)
What's Changed
- fix an accidental breaking change to
dataclass_transformthat was introduced in pyright 1.1.407 by @DetachHead in #1595
Full Changelog: v1.32.0...v1.32.1
v1.32.0 (pyright 1.1.407)
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 decorator, 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
- recommend my fork of tach because tach has been abandoned by @DetachHead in #1572
- fix typos in docs by @decorator-factory in #1582
other changes
- use the name
basedpyrightinstead ofpythonwhen instantiating vscode'sLanguageClientso that the logging can be configured usingbasedpyright.trace.serverby @DetachHead in #1583 - [zh-cn l10n] fix incorrect translation of
paramNameMissingby @NCBM in #1588 - Merge pyright 1.1.407 by @DetachHead in #1590
Full Changelog: v1.31.7...v1.32.0
v1.31.7 (pyright 1.1.406)
What's Changed
performance fixes
- fix performance issues on large enums by @jabbera in #1535
- quicker way to check if a class is an enum before reporting
reportUnannotatedClassAttributeby @DetachHead in #1544
semantic highlighting
- Use declarations as the primary source of semantic tokens by @KurtBoehm in #1521 & @DetachHead in #1555
- Type-based descriptor instance highlighting by @KurtBoehm in #1557
docs
- update cli installation instructions to make it clear that we recommend uv by @DetachHead in #1549
- update basedpyright badge to match the colour of the logo by @DetachHead in #1571
other changes
- Chinese (Simplified) translations update (2025.10) by @NCBM in #1546
- suggest import aliases from user code if explicitly re-exported by @mstmb-alan in #1539
- report an error when attempting to subscript
array.arrayat runtime on python <3.12 by @DetachHead in #1552 - fix errors from new builtin
string.templatelibmodule and generate stub docstrings for 3.14 by @DetachHead in #1551
New Contributors
- @jabbera made their first contribution in #1535
- @mstmb-alan made their first contribution in #1539
Full Changelog: v1.31.6...v1.31.7
v1.31.6 (pyright 1.1.406)
What's Changed
- fix duplicated
reportMatchNotExhaustiveand missingreportImplicitOverridein the docs by @DetachHead in #1522 - Remove
vfrom rev tag for prek in the docs by @sakosha in #1520 - Merge pyright 1.1.406 by @DetachHead in #1537
- Fix some typos in the Russian localization by @decorator-factory in #1531
New Contributors
Full Changelog: v1.31.5...v1.31.6
v1.31.5 (pyright 1.1.405)
What's Changed
semantic highlighting
- Semantic Tokens for custom builtins specified in project
__builtins__.pyiby @Wizzerinus in #1451 - Improved Semantic Tokens: Enums, Properties, Constants, and Static Methods by @KurtBoehm in #1469
baseline
- add back baseline cache by @DetachHead in #1473
- fix
--baselinefilecli argument and update the docs to reflect that the baseline file functionality is now stable by @DetachHead in #1480
docs
- update pre-commit docs to primarily mention prek instead of pre-commit by @DetachHead in #1487
- update zed installation instructions to reflect that basedpyright is now the default language server by @DetachHead in #1495
uv pip install->uv tool installby @HairlessVillager in #1482
other changes
- fix
\N{(named unicode characters) in strings being turned into f-strings by @DetachHead in #1504 - don't report
reportInvalidTypeVarUsefor type var in return type by @KotlinIsland in #1498 - Update Russian localization by @decorator-factory in #1497
- enable
basedpyright.analysis.inlayHints.genericTypesby default by @KotlinIsland in #1513 - display an error when attempting to rename a symbol to an invalid python identifier by @decorator-factory in #1514
New Contributors
- @HairlessVillager made their first contribution in #1482
- @KurtBoehm made their first contribution in #1469
Full Changelog: v1.31.4...v1.31.5
v1.31.4 (pyright 1.1.405)
What's Changed
- make
allowedUntypedLibrarieswork on overloads by @leonardo-panseri in #1437 - fix
autoFormatStringswhen client does not support dynamic registration foronTypeFormattingby @ribru17 in #1452 - docs: update pycharm screenshot for required plugins by @euri10 in #1449
- Merge pyright 1.1.405 by @DetachHead in #1453
New Contributors
- @leonardo-panseri made their first contribution in #1437
- @euri10 made their first contribution in #1449
- @ribru17 made their first contribution in #1452
Full Changelog: v1.31.3...v1.31.4
v1.31.3 (pyright 1.1.404)
What's Changed
- fix link in vscode description for
diagnosticSeverityOverridesby @DetachHead in #1431 - Merge pyright 1.1.404 by @DetachHead in #1438
Full Changelog: v1.31.2...v1.31.3
v1.31.2 (pyright 1.1.403)
What's Changed
- Hide inlay hints when the parameter matches an accessed member's name by @tylerlaprade in #1420
- fix completions in quoted types not working in vscode by @DetachHead in #1428
- Update
prefligittoprekin docs by @j178 in #1423 - improve zed installation instructions by @DetachHead in #1425
New Contributors
Full Changelog: v1.31.1...v1.31.2
v1.31.1 (pyright 1.1.403)
What's Changed
- fix
# pyright: ignorecode actions inserting the comment before the last character if the error is on the last line in the file by @DetachHead in #1398 - fix inlay hints not appearing on instance attribute declarations by @DetachHead in #1410
- fix renaming files when imported with a relative import by @DetachHead in #1414
- fix "find all references" on
__init__and__new__methods by @DetachHead in #1415 - add tip to the docs recommending prefligit over pre-commit by @DetachHead in #1413
Full Changelog: v1.31.0...v1.31.1
v1.31.0 (pyright 1.1.403)
What's Changed
automatic conversion to f-string when typing { inside a string
implement basedpyright.analysis.autoFormatStrings setting from pylance:
implemented in #1390
other changes
- Remove duplicate semantic tokens for readonly properties by @ValdezFOmar in #1386
- fix
writeBaseline,restartServerandcreateTypeStubcommands only being registered in the vscode extension instead of the language server by @DetachHead in #1385 - Change default diagnostic category for
reportImplicitAbstractClassto"error"whentypeCheckingModeis"recommended"by @tylerlaprade in #1392 - improve wording in the cards on the docs home page & mention upstream merging by @DetachHead in #1393
Full Changelog: v1.30.1...v1.31.0
