8000 Add `stubdefaulter` to `create_baseline_stubs.py` by Avasam · Pull Request #10127 · python/typeshed · GitHub
[go: up one dir, main page]

Skip to content

Add stubdefaulter to create_baseline_stubs.py #10127

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 2, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add stubdefaulter to create_baseline_stubs
  • Loading branch information
Avasam committed May 1, 2023
commit 76853c325fb3fef9a242c219e7f429c0c7c2c1e8
1 change: 1 addition & 0 deletions requirements-tests.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ pre-commit-hooks==4.4.0 # must match .pre-commit-confi
pycln==2.1.3 # must match .pre-commit-config.yaml
pytype==2023.4.27; platform_system != "Windows" and python_version < "3.11"
pyyaml==6.0
stubdefaulter==0.1.0
termcolor>=2.3
tomli==2.0.1
tomlkit==0.11.8
Expand Down
6 changes: 6 additions & 0 deletions scripts/create_baseline_stubs.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ def run_stubgen(package: str, output: str) -> None:
subprocess.run(["stubgen", "-o", output, "-p", package, "--export-less"], check=True)


def run_stubdefaulter(stub_dir: str) -> None:
print(f"Running stubdefaulter: stubdefaulter --packages {stub_dir}")
subprocess.run(["stubdefaulter", "--packages", stub_dir])


def run_black(stub_dir: str) -> None:
print(f"Running black: black {stub_dir}")
subprocess.run(["black", stub_dir])
Expand Down Expand Up @@ -153,6 +158,7 @@ def main() -> None:

run_stubgen(package, stub_dir)

run_stubdefaulter(stub_dir)
run_isort(stub_dir)
run_black(stub_dir)

Expand Down
0