Skip to content

Incorrect type hint in the aliases decorator signature #243

Open

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:

Activity

  1. self-assigned this
    on Jan 5, 2026
  2. added this to the 0.31.4 milestone on Jan 5, 2026
  3. Prajithaa1Parani commented on Jan 5, 2026

    @Prajithaa1Parani

    Hi! Thanks for reporting this issue.

    I’ve reviewed the problem description and the type-checker errors mentioned (mypy / pyright). I believe this is a clear and well-scoped issue, and I’d like to work on fixing the incorrect type hint in the aliases decorator signature.

    I’ll start by reproducing the issue locally and propose a fix that aligns with the expected typing behavior. Please let me know if there’s any preferred approach or additional context I should be aware of before submitting a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions