Skip to content

Releases: DetachHead/basedpyright

v1.28.1 (pyright 1.1.396)

01 Mar 05:47
c75de56
Compare
Choose a tag to compare

What's Changed

Full Changelog: v1.28.0...v1.28.1

v1.28.0 (pyright 1.1.395)

26 Feb 14:29
Compare
Choose a tag to compare

What's Changed

  • add deprecated tag to completions by @DetachHead in #1083, #1086
    deprecated-completion-1
  • fix issues when deleting notebook cells by @DetachHead in #1074
  • fix occasional error notification in the language server when reading notebook file contents from disk by @DetachHead in #1076
  • include serverInfo in initializeResult by @disrupted in #1077
  • fix logging in the language server printing upstream version number instead of the basedpyright version number by @DetachHead in #1080
  • fix: include deprecated/unused diagnostic tags for all severity levels except none on relevant rules by @disrupted in #1084, #1089
  • automatically import IPython.display.display in notebooks by @DetachHead in #1098
  • don't add @override decorator on method completions if targeting python <3.12 unless basedpyright.analysis.useTypingExtensions is enabled by @DetachHead in #1099
  • fix @override completion text edit being added to __init_subclass__ and metaclass members by @DetachHead in #1103, #1109
  • update pyright to 1.1.395 by @DetachHead in #1108
    • fix a bug introduced in 1.1.395 where overloads that use to omit the default value don’t get matched
  • Chinese (Simplified) localization update (2025.02) by @NCBM in #1054

New Contributors

Full Changelog: v1.27.1...v1.28.0

v1.27.1 (pyright 1.1.394)

12 Feb 12:41
Compare
Choose a tag to compare

What's Changed

jupyter notebook fixes

  • fix crash on invalid notebook files by @DetachHead in #1050
  • fix language server crash when diagnosticMode is "workspace" and workspace contains jupyter notebooks that haven't yet been opened by @DetachHead in #1065
  • fix language server crash on interactive mode cells and notebooks that haven't yet been saved to disk by @DetachHead in #1066

other changes

  • revert chokidar file watcher fallback for lsp clients that don't support file watching because it was causing more problems than it solved by @DetachHead in #1053
  • update pyright to 1.1.394 by @DetachHead in #1060
  • fix a regression in 1.1.394 that caused a false negative for reportUninitializedInstanceVariable by @DetachHead in #1060

Full Changelog: v1.27.0...v1.27.1

v1.27.0 (pyright 1.1.393)

08 Feb 15:39
Compare
Choose a tag to compare

What's Changed

jupyter notebook support

just like pylance, basedpyright now works with jupyter notebooks:

jupyter

but unlike pylance, you can also type check your notebooks with the CLI:

>basedpyright
c:\project\asdf.ipynb - cell 1
  c:\project\asdf.ipynb:1:1:12 - error: Type "Literal['']" is not assignable to declared type "int"
    "Literal['']" is not assignable to "int" (reportAssignmentType)
c:\project\asdf.ipynb - cell 2
  c:\project\asdf.ipynb:2:1:12 - error: Type "int" is not assignable to declared type "str"
    "int" is not assignable to "str" (reportAssignmentType)
2 errors, 0 warnings, 0 notes

implemented in #1035 & #1046

other changes

Full Changelog: v1.26.0...v1.27.0

v1.26.0 (pyright 1.1.393)

29 Jan 16:19
Compare
Choose a tag to compare

What's Changed

Full Changelog: v1.25.0...v1.26.0

v1.25.0 (pyright 1.1.392)

27 Jan 15:32
Compare
Choose a tag to compare

What's Changed

double click to insert inlay hints

basedpyright now supports double clicking inlay hints to insert them into your code. unlike pylance, this also works on Callable types:

implemented in #968 & #1020

improved default value for pythonPath

configuring your python interpreter in pyright is needlessly confusing. if you aren't using vscode or you aren't running it from inside a virtual environment, you'll likely encounter errors as a result of pyright using the wrong interpreter. to fix this you'd have to use the venv and venvPath settings which are two separate settings for some reason.

in this release, basedpyright now detects the most common location for a virtual environment: a folder named .venv in the project root, which it uses as the default value for pythonPath. this means most users shouldn't have to manually configure basedpyright to use the correct python interpreter anymore. see the docs for more info

implemented by @cpprust in #1006

other changes

  • fall back to chokidar file watcher if the lsp client doesn't support capabilities.workspace.didChangeWatchedFiles.dynamicRegistration by @DetachHead in #1011
  • fix inlay hints incorrectly appearing on pseudo-generic classes by @DetachHead in #1021
  • docs: correct typos and grammar in comments.md by @jamestrew in #1012

New Contributors

Full Changelog: v1.24.0...v1.25.0

v1.24.0 (pyright 1.1.392)

15 Jan 12:11
Compare
Choose a tag to compare

What's Changed

  • add allowedUntypedLibraries setting to support disabling diagnostics for untyped functions/classes imported from specific modules by @Wizzerinus in #970
  • report an error instead of crashing when attempting to baseline errors from files that are located outside of the project root by @DetachHead in #982
  • fix import suggestion code actions being disabled when basedpyright.analysis.autoImportCompletions is disabled by @DetachHead in #983
  • update pyright to 1.1.392 by @DetachHead in #996
  • improve example in the docs for configuring the language server in neovim by @korchizhinskiy in #980

New Contributors

Full Changelog: v1.23.2...v1.24.0

v1.23.2 (pyright 1.1.391)

05 Jan 12:06
Compare
Choose a tag to compare

What's Changed

  • fix second generic for AbstractContextManager being ignored when determining whether the context manager can suppress exceptions by @DetachHead in #963
  • fix File or directory "/<default workspace root>" does not exist error being reported as a language server notification by @DetachHead in #966
  • eliminate some false positives on reportUninitializedInstanceVariable by @beauxq in #975
  • fix "files to analyze" notification hanging on typeshed stubs when they aren't actually being analyzed by @DetachHead in #978

Full Changelog: v1.23.1...v1.23.2

v1.23.1 (pyright 1.1.391)

18 Dec 09:10
Compare
Choose a tag to compare

What's Changed

  • fix reportUnusedParameter false positive on abstract setters by @DetachHead in #956
  • fix semantic highlighting on names that are wrapped in parentheses across multiple lines by @DetachHead in #957
  • update pyright to 1.1.391 by @DetachHead in #959

Full Changelog: v1.23.0...v1.23.1

v1.23.0 (pyright 1.1.390)

15 Dec 14:58
Compare
Choose a tag to compare

What's Changed

  • fix duplicated semantic token for decorators which caused them to not get highlighted as decorators in neovim by @DetachHead in #925
  • fix typeshed files sometimes being treated as source files which can lead to renames causing edits to be applied to typeshed files by @DetachHead in #932
  • fix some typos in the documentation by @DetachHead in #936
  • reportUnusedFunction on unused protected methods when the class is decorated with @final by @DetachHead in #937
  • fix reportUnsafeMultipleInheritance false positive in diamond inheritance scenarios, which is safe due to how MRO works by @DetachHead in #940
  • Add documentation for localization helper by @NCBM in #942
  • fix paramspecs being printed as Callable types in inlay hints by @DetachHead in #943
  • Add eglot configuration example to the website by @VictorCMiraldo in #935
  • docs: fix typo by @kiyoon in #945
  • docs: add missing settings table by @baggiponte in #950
  • handle errors reading & writing the baseline file and report config / baseline errors more reliably by @DetachHead in #947
  • officially support installing basedpyright via npm by @DetachHead in #953

New Contributors

Full Changelog: v1.22.1...v1.23.0