소스 검색

Make `get_cmd_params()` tollerate commands with no arguments

Michael Hanke 1 년 전
부모
커밋
76347d109c
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      datalad_gooey/api_utils.py

+ 2 - 0
datalad_gooey/api_utils.py

@@ -28,6 +28,8 @@ def get_cmd_params(cmd: Callable) -> List:
     """
     # lifted from setup_parser_for_interface()
     args, varargs, varkw, defaults = getargspec(cmd, include_kwonlyargs=True)
+    if not args:
+        return []
     return list(
         zip_longest(
             # fuse parameters from the back, to match with their respective