Skip to content

Incorrect type of dependency_groups? #39

Description

@zedzhen

dependency_groups: Mapping[str, str | Mapping[str, str]], but i think correct type is Mapping[str, list[str | Mapping[str, str]]] (value is list).

def _parse_group(
self, group: str
) -> tuple[Requirement | DependencyGroupInclude, ...]:

group is str

raw_group = self.dependency_groups[group]
if not isinstance(raw_group, list):
raise TypeError(f"Dependency group '{group}' is not a list")

raw_group is a value of dependency_groups => is str | Mapping[str, str]
but check is list

and in exmaple

[dependency-groups]
test = ["pytest", {include-group = "runtime"}]
runtime = ["flask"]

type of value of dependency-groups is list

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions