mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-07-09 09:59:16 +08:00
Update most test/lint dependencies (#15582)
This commit is contained in:
@@ -188,12 +188,10 @@ def add_pyright_exclusion(stub_dir: Path) -> None:
|
||||
|
||||
|
||||
def main() -> None:
|
||||
parser = argparse.ArgumentParser(
|
||||
description="""Generate baseline stubs automatically for an installed pip package
|
||||
parser = argparse.ArgumentParser(description="""Generate baseline stubs automatically for an installed pip package
|
||||
using stubgen. Also run Black and Ruff. If the name of
|
||||
the project is different from the runtime Python package name, you may
|
||||
need to use --package (example: --package yaml PyYAML)."""
|
||||
)
|
||||
need to use --package (example: --package yaml PyYAML).""")
|
||||
parser.add_argument("project", help="name of PyPI project for which to generate stubs under stubs/")
|
||||
parser.add_argument("--package", help="generate stubs for this Python package (default is autodetected)")
|
||||
args = parser.parse_args()
|
||||
|
||||
@@ -844,24 +844,20 @@ def get_update_pr_body(update: Update, metadata: Mapping[str, Any]) -> str:
|
||||
stubtest_settings: dict[str, Any] = metadata.get("tool", {}).get("stubtest", {})
|
||||
stubtest_will_run = not stubtest_settings.get("skip", False)
|
||||
if stubtest_will_run:
|
||||
body += textwrap.dedent(
|
||||
"""
|
||||
body += textwrap.dedent("""
|
||||
|
||||
If stubtest fails for this PR:
|
||||
- Leave this PR open (as a reminder, and to prevent stubsabot from opening another PR)
|
||||
- Fix stubtest failures in another PR, then close this PR
|
||||
|
||||
Note that you will need to close and re-open the PR in order to trigger CI
|
||||
"""
|
||||
)
|
||||
""")
|
||||
else:
|
||||
body += textwrap.dedent(
|
||||
f"""
|
||||
body += textwrap.dedent(f"""
|
||||
|
||||
:warning: Review this PR manually, as stubtest is skipped in CI for {update.distribution}!
|
||||
Also check whether stubtest can be reenabled. :warning:
|
||||
"""
|
||||
)
|
||||
""")
|
||||
return body
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user