click-contrib / click-default-group

Extends click.Group to invoke a command without explicit subcommand name.
BSD 3-Clause "New" or "Revised" License
73 stars 17 forks source link

Missing type hints causes mypy to complain #26

Open jnewbigin opened 9 months ago

jnewbigin commented 9 months ago

Because of the missing type hints, when using cls=DefaultGroupit is necessary to use # type: ignore to prevent errors like:

error: Untyped decorator makes function "my_function" untyped  [misc]

So I copied the types from click 8.1.7 which makes mypy happy. I'll open the PR shortly.

jnewbigin commented 9 months ago

See https://github.com/click-contrib/click-default-group/pull/27 for possible resolution for this issue