Skip to content

Commit 8112701

Browse files
committed
TMP: alwasy return none when getting group name
1 parent 3b7fe59 commit 8112701

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

typer/main.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -390,17 +390,17 @@ def get_command(typer_instance: Typer) -> click.Command:
390390

391391

392392
def get_group_name(typer_info: TyperInfo) -> Optional[str]:
393-
if typer_info.callback:
394-
# Priority 1: Callback passed in app.add_typer()
395-
return get_command_name(typer_info.callback.__name__)
396-
if typer_info.typer_instance:
397-
registered_callback = typer_info.typer_instance.registered_callback
398-
if registered_callback:
399-
if registered_callback.callback:
400-
# Priority 2: Callback passed in @subapp.callback()
401-
return get_command_name(registered_callback.callback.__name__)
402-
if typer_info.typer_instance.info.callback:
403-
return get_command_name(typer_info.typer_instance.info.callback.__name__)
393+
# if typer_info.callback:
394+
# # Priority 1: Callback passed in app.add_typer()
395+
# return get_command_name(typer_info.callback.__name__)
396+
# if typer_info.typer_instance:
397+
# registered_callback = typer_info.typer_instance.registered_callback
398+
# if registered_callback:
399+
# if registered_callback.callback:
400+
# # Priority 2: Callback passed in @subapp.callback()
401+
# return get_command_name(registered_callback.callback.__name__)
402+
# if typer_info.typer_instance.info.callback:
403+
# return get_command_name(typer_info.typer_instance.info.callback.__name__)
404404
return None
405405

406406

0 commit comments

Comments
 (0)