Skip to content

Commit a31a9cd

Browse files
authored
feat: Python π beta 1, color, no abbrev (#108)
* ci: test on Python π beta 1 Signed-off-by: Henry Schreiner <[email protected]> * feat: color, suggestions, and no abbrev Signed-off-by: Henry Schreiner <[email protected]> --------- Signed-off-by: Henry Schreiner <[email protected]>
1 parent 349d5a0 commit a31a9cd

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
strategy:
3333
fail-fast: false
3434
matrix:
35-
python-version: ["3.9", "3.13"]
35+
python-version: ["3.9", "3.13", "3.14"]
3636
runs-on: [ubuntu-latest, macos-14, windows-latest]
3737

3838
include:

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ classifiers = [
2323
"Programming Language :: Python :: 3.11",
2424
"Programming Language :: Python :: 3.12",
2525
"Programming Language :: Python :: 3.13",
26+
"Programming Language :: Python :: 3.14",
2627
"Typing :: Typed",
2728
]
2829
dynamic = ["version"]

src/check_sdist/__main__.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import argparse
44
import contextlib
5+
import sys
56
from collections.abc import Sequence
67
from pathlib import Path
78
from typing import Literal
@@ -117,7 +118,14 @@ def compare(
117118

118119
def main(sys_args: Sequence[str] | None = None, /) -> None:
119120
"""Parse the command line arguments and call compare()."""
120-
parser = argparse.ArgumentParser(prog=None if sys_args is None else "check-sdist")
121+
argopts = (
122+
{} if sys.version_info < (3, 14) else {"color": True, "suggest_on_error": True}
123+
)
124+
parser = argparse.ArgumentParser(
125+
prog=None if sys_args is None else "check-sdist",
126+
allow_abbrev=False,
127+
**argopts, # type: ignore[arg-type]
128+
)
121129
parser.add_argument(
122130
"--version", action="version", version=f"%(prog)s {__version__}"
123131
)

0 commit comments

Comments
 (0)