Skip to content
Myr

🔧 Upgrade mypy and config (#768)

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

authored by Sebastián Ramírez · committed by GitHub · parent 4c051bc · Browse files · 6 files+28 added−19 removed
This commit

State

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

Diff stats

6 files+28 added−19 removed

  • other:+28 added−19 removed

6 files+28 added−19 removed

modified:scripts/lint.sh+2 added-2 removed
modified:typer/core.py+7 added-6 removed
75 unmodified lines
76 from click.shell_completion import CompletionItem7778 out = []7980 for c in autocompletion(ctx, [], incomplete): # type: ignore80 for c in autocompletion(ctx, [], incomplete):81 if isinstance(c, tuple):82 c = CompletionItem(c[0], help=c[1])83 elif isinstance(c, str):84 c = CompletionItem(c)82 use_completion = CompletionItem(c[0], help=c[1])83 else:84 assert isinstance(c, str)85 use_completion = CompletionItem(c)8686 if c.value.startswith(incomplete):87 out.append(c)87 if use_completion.value.startswith(incomplete):88 out.append(use_completion)8990 return out9192 self._custom_shell_complete = compat_autocompletion
648 unmodified lines
modified:typer/main.py+4 added-4 removed
93 unmodified lines
94 )95 else:96 stack.append(frame)97 # Type ignore ref: https://github.com/python/typeshed/pull/824498 final_stack_summary = StackSummary.from_list(stack) # type: ignore98 final_stack_summary = StackSummary.from_list(stack)99 tb_exc.stack = final_stack_summary100 for line in tb_exc.format():101 print(line, file=sys.stderr)102 return
581 unmodified lines
684 else:685 use_params[k] = v686 if context_param_name:687 use_params[context_param_name] = click.get_current_context()688 return callback(**use_params) # type: ignore688 return callback(**use_params)689690 update_wrapper(wrapper, callback)691 return wrapper692
304 unmodified lines
997 use_value = convertor(value)998 else:999 use_value = value1000 use_params[value_name] = use_value1001 return callback(**use_params) # type: ignore1001 return callback(**use_params)10021003 update_wrapper(wrapper, callback)1004 return wrapper1005
44 unmodified lines
1050 if args_name:1051 use_params[args_name] = args1052 if incomplete_name:1053 use_params[incomplete_name] = incomplete1054 return callback(**use_params) # type: ignore1054 return callback(**use_params)10551056 update_wrapper(wrapper, callback)1057 return wrapper1058
5 unmodified lines
deleted:mypy.ini-6 removed
1[mypy]2ignore_missing_imports = True34[mypy-typer.*]5disallow_untyped_defs = True6strict = True
modified:pyproject.toml+14 added
modified:requirements-tests.txt+1 added-1 removed
3 unmodified lines
4pytest-cov >=2.10.0,<5.0.05coverage[toml] >=6.2,<7.06pytest-xdist >=1.32.0,<4.0.07pytest-sugar >=0.9.4,<0.10.08mypy ==0.9718mypy ==1.4.19ruff ==0.2.0