Skip to content
Myr

🚸 Improve assertion error message if a group is not a valid subclass (#425)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Chris Burr · committed by GitHub · parent b98d0fe · Browse files · 1 file+1 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Trailers

  • Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
  • Co-authored-by: svlandeg <svlandeg@github.com>

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:typer/main.py+1 added-1 removed
503 unmodified lines
504 convertors,505 context_param_name,506 ) = get_params_convertors_ctx_param_name_from_function(solved_info.callback)507 cls = solved_info.cls or TyperGroup508 assert issubclass(cls, TyperGroup)508 assert issubclass(cls, TyperGroup), f"{cls} should be a subclass of {TyperGroup}"509 group = cls(510 name=solved_info.name or "",511 commands=commands,512 invoke_without_command=solved_info.invoke_without_command,
558 unmodified lines