Skip to content

Commit

Permalink
add back 3.8 support
Browse files Browse the repository at this point in the history
  • Loading branch information
DetachHead committed Jun 17, 2024
1 parent f500885 commit 65aca13
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 36 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,8 @@ pylance works around this problem by running a "docstring scraper" script on the
- only docstrings for modules and functions available on the user's current OS and python version will be generated. so if you're working on a cross-platform project, or code that's intended to be run on multiple versions of python, you won't be able to see docstrings for compiled builtin modules that are not available in your current python installation.
- it's (probably) slower because these docstrings need to be scraped either when the user launches vscode, or when the user hovers over a builtin class/function (disclaimer: i don't actually know when it runs, because pylance is closed source)

in basedpyright's implementation, the docstrings for all compiled builtin modules for all python versions (except 3.8 for now, sorry!) and all platforms (macos, windows and linux) are bundled in the default typeshed stubs that come with the basedpyright package.
in basedpyright's implementation, the docstrings for all compiled builtin modules for all currently supported python versions and all platforms (macos, windows and linux) are bundled in the default typeshed stubs that come with the basedpyright package.

##### examples

here's a demo of basedpyright's builtin docstrings when running on windows, compared to pylance:
Expand Down
93 changes: 63 additions & 30 deletions pdm.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ dev = [
# these deps are also needed in build-system.requires. see https://github.com/pdm-project/pdm/issues/2947
docstubs = [
"docify @ git+https://github.com/DetachHead/docify@20ac945391c14de82cb5281e4ce019f262311633", # https://github.com/AThePeanut4/docify/pull/2 & https://github.com/AThePeanut4/docify/issues/3
"libcst==1.4.0",
"libcst==1.1.0",
"tqdm==4.66.4",
]

Expand Down Expand Up @@ -48,7 +48,7 @@ dependencies = [
# since the user shouldn't have a node/npm binary unknowingly added to their PATH
"nodejs-wheel-binaries>=20.13.1",
]
requires-python = ">=3.9"
requires-python = ">=3.8"
readme = "README.md"
license = { text = "MIT" }

Expand All @@ -68,7 +68,7 @@ requires = [
# used in pdm_build.py:
"typing_extensions>=4.12.2",
"docify @ git+https://github.com/DetachHead/docify@20ac945391c14de82cb5281e4ce019f262311633",
"libcst==1.4.0",
"libcst==1.1.0",
"tqdm==4.66.4",
]
build-backend = "pdm.backend"
Expand Down Expand Up @@ -178,7 +178,7 @@ score = "no"
max-line-length = 200

[tool.basedpyright]
pythonVersion = "3.9"
pythonVersion = "3.8"
include = ["basedpyright", "based_build", "pdm_build.py"]
ignore = ["pw", "basedpyright/dist", "packages", "build"]
typeCheckingMode = "all"
Expand All @@ -187,7 +187,7 @@ enableTypeIgnoreComments = false # https://github.com/D


[tool.ruff]
target-version = "py39"
target-version = "py38"
respect-gitignore = true
line-length = 100
preview = true
Expand Down

0 comments on commit 65aca13

Please sign in to comment.