Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 2 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,15 @@ jobs:
- uses: actions/setup-python@v5
id: setup-python
with:
allow-prereleases: true
python-version: |
3.8
3.9
3.10
3.11
3.12
3.13
3.14

# get the week of the year (1-52) for cache control
# this ensures that at least weekly we'll test with a clear cache
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ classifiers = [
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
]
Expand Down
4 changes: 2 additions & 2 deletions src/dependency_groups/__main__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import argparse
import sys

from ._argparse_compat import ArgumentParser
from ._implementation import resolve
from ._toml_compat import tomllib

Expand All @@ -13,7 +13,7 @@ def main() -> None:
)
raise SystemExit(2)

parser = argparse.ArgumentParser(
parser = ArgumentParser(
description=(
"A dependency-groups CLI. Prints out a resolved group, newline-delimited."
)
Expand Down
19 changes: 19 additions & 0 deletions src/dependency_groups/_argparse_compat.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
from __future__ import annotations

import argparse
import functools
import sys

__all__ = ["ArgumentParser"]


def __dir__() -> list[str]:
return __all__


ArgumentParser = functools.partial(argparse.ArgumentParser)

if sys.version_info >= (3, 14):
ArgumentParser = functools.partial(
ArgumentParser, color=True, suggest_on_error=True
)
4 changes: 2 additions & 2 deletions src/dependency_groups/_lint_dependency_groups.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from __future__ import annotations

import argparse
import sys

from ._argparse_compat import ArgumentParser
from ._implementation import DependencyGroupResolver
from ._toml_compat import tomllib

Expand All @@ -15,7 +15,7 @@ def main(*, argv: list[str] | None = None) -> None:
)
raise SystemExit(2)

parser = argparse.ArgumentParser(
parser = ArgumentParser(
description=(
"Lint Dependency Groups for validity. "
"This will eagerly load and check all of your Dependency Groups."
Expand Down
4 changes: 2 additions & 2 deletions src/dependency_groups/_pip_wrapper.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from __future__ import annotations

import argparse
import subprocess
import sys

from ._argparse_compat import ArgumentParser
from ._implementation import DependencyGroupResolver
from ._toml_compat import tomllib

Expand All @@ -20,7 +20,7 @@ def main(*, argv: list[str] | None = None) -> None:
)
raise SystemExit(2)

parser = argparse.ArgumentParser(description="Install Dependency Groups.")
parser = ArgumentParser(description="Install Dependency Groups.")
parser.add_argument(
"DEPENDENCY_GROUP", nargs="+", help="The dependency groups to install."
)
Expand Down
8 changes: 4 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ env_list =
lint
mypy
covclean
py{38,39,310,311,312,313}
py{38,39,310,311,312,313,314}
covcombine
covreport
labels =
ci = py{38,39,310,311,312,313}, covcombine, covreport
ci = py{38,39,310,311,312,313,314}, covcombine, covreport
ci-mypy = mypy-py38, mypy-py313
ci-package-check = twine-check
minversion = 4.22.0
Expand All @@ -19,8 +19,8 @@ dependency_groups = test
commands = coverage run -m pytest -v {posargs}

depends =
py{38,39,310,311,312},py: clean
covcombine: py,py{38,39,310,311,312}
py{38,39,310,311,312,313,314},py: clean
covcombine: py,py{38,39,310,311,312,313,314}
covreport: covcombine

[testenv:covclean]
Expand Down
Loading