if positional_args:
all_arg_strs.append(positional_args)
keyword_args = ", ".join([
"{}={}".format(k, repr(v)) for k, v in self._kwargs.items()
])
if keyword_args:
all_arg_strs.append(keyword_args)
After Change
def _gen_init_args_str(self) -> str:
all_arg_strs = []
positional_args = ", ".join(repr(p) for p in self._patterns)
if positional_args:
all_arg_strs.append(positional_args)
all_arg_strs.append(f"spec_path={self._spec_path}")