Skip to content

Commit 61d1add

Browse files
committed
Remove tool.poetry.dev.dependencies from nox task dependency:licenses as not poetry 2.x+ compatible
1 parent 097f0be commit 61d1add

File tree

3 files changed

+12
-34
lines changed

3 files changed

+12
-34
lines changed

doc/changes/unreleased.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ which is specified in the `noxconfig.py`
1010

1111
## ✨ Features
1212

13-
* [#441](https://github.com/exasol/python-toolbox/issues/441): Switched nox task for `version:check` to use the config value of `version_file` to specify the location of the `version.py`
13+
* [#441](https://github.com/exasol/python-toolbox/issues/441): Switched nox task for `version:check` to use the config value of `version_file` to specify the location of the `version.py`
14+
* [#382](https://github.com/exasol/python-toolbox/issues/382): Removed `tool.poetry.dev.dependencies` from nox task `dependency:licenses` as not poetry 2.x+ compatible

exasol/toolbox/nox/_dependencies.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,6 @@ def _dependencies(toml_str: str) -> dict[str, list]:
3434
for package in packages:
3535
dependencies["project"].append(package)
3636

37-
packages = poetry.get("dev", {}).get("dependencies", {})
38-
if packages:
39-
dependencies["dev"] = []
40-
for package in packages:
41-
dependencies["dev"].append(package)
42-
4337
groups = poetry.get("group", {})
4438
for group in groups:
4539
packages = groups.get(group, {}).get("dependencies")

test/unit/dependencies_test.py

Lines changed: 10 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -12,36 +12,19 @@
1212
)
1313

1414

15-
@pytest.mark.parametrize(
16-
"toml,expected",
17-
[
18-
(
19-
"""
20-
[tool.poetry.dependencies]
21-
pytest = ">=7.2.2,<9"
22-
python = "^3.9"
23-
""",
24-
{"project": ["pytest", "python"]},
25-
),
26-
(
27-
"""
28-
[tool.poetry.dependencies]
29-
pytest = ">=7.2.2,<9"
30-
python = "^3.9"
15+
def test_dependencies():
16+
toml = """
17+
[tool.poetry.dependencies]
18+
pytest = ">=7.2.2,<9"
19+
python = "^3.9"
20+
21+
[tool.poetry.group.dev.dependencies]
22+
autoimport = "^1.4.0"
23+
"""
3124

32-
[tool.poetry.dev.dependencies]
33-
pip-licenses = "^5.0.0"
3425

35-
[tool.poetry.group.dev.dependencies]
36-
autoimport = "^1.4.0"
37-
""",
38-
{"project": ["pytest", "python"], "dev": ["pip-licenses", "autoimport"]},
39-
),
40-
],
41-
)
42-
def test_dependencies(toml, expected):
4326
actual = _dependencies(toml)
44-
assert actual == expected
27+
assert actual == {"project": ["pytest", "python"], "dev": ["autoimport"]}
4528

4629

4730
@pytest.mark.parametrize(

0 commit comments

Comments
 (0)