Skip to content

Incorrect type hint in the aliases decorator signature #243

@neithere

Description

@neithere

Problem

Symptoms as of Argh 0.31.3:

  • mypy: Argument 1 to "aliases" has incompatible type "str"; expected "list[str]" [arg-type]
  • pyright:
    Argument of type "Literal['ls']" cannot be assigned to parameter "names" of type "List[str]" in function "aliases"
      Literal['ls']" is not assignable to "List[str]" (reportArgumentType)
    

Solution

- def aliases(*names: List[str]) -> Callable:
+ def aliases(*names: str) -> Callable:

Metadata

Metadata

Assignees

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions