Update jsonschema.protocols
I'm very inexperienced with type annotations so I hope my conclusions were correct. Recently, when working on a project using jsonschema I had trouble with the following error raised by mypy:
error: Unexpected keyword argument "registry" for "Validator" [call-arg]
However, ever since jsonschema 4.18 (commit), the Validator protocol's __init__() method has a a registry parameter.
From what I gather, the protocols.pyi stubs were never updated to reflect this change.
I basically only copied the signatures from the current version to protocols.pyi. Here's hoping that's what I'm supposed to do.
Edit: I left in the resolver param which was removed from the library's signature in the same release, to be replaced by registry. However, according to the docs, resolver is only deprecated and it is still entirely possible to use it. Removing it from the stub would lead to the same error for all current users of the resolver param. This goes somewhat counter to CONTRIBUTING.md but I felt this scenario is a little different than what is described there. This looks like an "error" in the function signature, not the docs.
Diff from mypy_primer, showing the effect of this PR on open source code:
cloud-init (https://github.com/canonical/cloud-init)
- tests/hypothesis_jsonschema.py:8: error: Unused "type: ignore" comment [unused-ignore]
- cloudinit/sources/helpers/cloudsigma.py:70: error: Unexpected keyword argument "writeTimeout" for "Serial"; did you mean "write_timeout"? [call-arg]
- cloudinit/net/netops/__init__.py:8: error: Missing return statement [empty-body]
- cloudinit/net/netops/__init__.py:12: error: Missing return statement [empty-body]
- cloudinit/net/netops/__init__.py:44: error: Missing return statement [empty-body]
- cloudinit/safeyaml.py:165: error: Signature of "construct_mapping" incompatible with supertype "SafeConstructor" [override]
- cloudinit/safeyaml.py:165: note: Superclass:
- cloudinit/safeyaml.py:165: note: def construct_mapping(self, node: MappingNode, deep: bool = ...) -> dict[Hashable, Any]
- cloudinit/safeyaml.py:165: note: Subclass:
- cloudinit/safeyaml.py:165: note: def construct_mapping(self, node: Any) -> Any
- cloudinit/safeyaml.py:165: error: Signature of "construct_mapping" incompatible with supertype "BaseConstructor" [override]
- cloudinit/safeyaml.py:165: note: Superclass:
- cloudinit/safeyaml.py:165: note: def construct_mapping(self, node: MappingNode, deep: bool = ...) -> dict[Hashable, Any]
- cloudinit/safeyaml.py:165: note: Subclass:
- cloudinit/safeyaml.py:165: note: def construct_mapping(self, node: Any) -> Any
- tests/hypothesis.py:10: error: Unused "type: ignore" comment [unused-ignore]
- cloudinit/url_helper.py:283: error: Unused "type: ignore" comment [unused-ignore]
- cloudinit/net/sysconfig.py:999: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
- cloudinit/net/openbsd.py:13: error: Signature of "write_config" incompatible with supertype "BSDRenderer" [override]
- cloudinit/net/openbsd.py:13: note: Superclass:
- cloudinit/net/openbsd.py:13: note: def write_config(self, target: Any = ...) -> Any
- cloudinit/net/openbsd.py:13: note: Subclass:
- cloudinit/net/openbsd.py:13: note: def write_config(self) -> Any
- cloudinit/distros/__init__.py:168: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
- cloudinit/distros/__init__.py:172: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
- cloudinit/distros/aosc.py:110: error: Signature of "update_package_sources" incompatible with supertype "Distro" [override]
- cloudinit/distros/aosc.py:110: note: Superclass:
- cloudinit/distros/aosc.py:110: note: def update_package_sources(self, *, force: Any = ...) -> Any
- cloudinit/distros/aosc.py:110: note: Subclass:
- cloudinit/distros/aosc.py:110: note: def update_package_sources(self) -> Any
- cloudinit/distros/alpine.py:278: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
- cloudinit/sources/DataSourceOracle.py:143: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
- cloudinit/sources/DataSourceAzure.py:334: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
- cloudinit/sources/DataSourceAzure.py:1835: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
- cloudinit/config/cc_ubuntu_pro.py:229: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
- cloudinit/config/cc_ubuntu_pro.py:237: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
- cloudinit/config/cc_growpart.py:298: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
- cloudinit/config/cc_apt_configure.py:615: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
- cloudinit/config/cc_apt_configure.py:616: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
- tests/unittests/test_templating.py:268: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
- tests/unittests/test_net.py:3559: error: Statement is unreachable [unreachable]
- tests/unittests/config/test_cc_write_files.py:152: error: Argument 1 to "load_binary_file" has incompatible type "str | Any | bytes"; expected "str | PathLike[Any]" [arg-type]
- tests/unittests/config/test_cc_ubuntu_drivers.py:84: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
- cloudinit/cmd/devel/hotplug_hook.py:83: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
schemathesis (https://github.com/schemathesis/schemathesis)
- src/schemathesis/failures.py: note: In member "from_exception" of class "ValidationErrorContext":
- src/schemathesis/failures.py:68: error: Argument "schema" to "ValidationErrorContext" has incompatible type "Union[Mapping[str, Any], bool, Unset]"; expected "Union[Dict[str, Any], bool]" [arg-type]
- src/schemathesis/failures.py:70: error: Argument "instance" to "ValidationErrorContext" has incompatible type "Union[Any, Unset]"; expected "Union[bool, float, str, List[Any], Dict[str, Any], None]" [arg-type]
- src/schemathesis/_compat.py: note: In function "_load_infer_type":
- src/schemathesis/_compat.py:30: error: Module "hypothesis.utils.conventions" has no attribute "InferType" [attr-defined]
- src/schemathesis/_compat.py: note: In function "_load_get_interesting_origin":
- src/schemathesis/_compat.py:39: error: Module "hypothesis.internal.escalation" has no attribute "get_interesting_origin"; maybe "InterestingOrigin"? [attr-defined]
- src/schemathesis/_compat.py: note: At top level:
- src/schemathesis/_compat.py:52: error: Unused "type: ignore" comment [unused-ignore]
- src/schemathesis/cli/constants.py: note: In member "filter_from_all" of class "Phase":
- src/schemathesis/cli/constants.py:35: error: Argument 1 to "set" has incompatible type "List[schemathesis.cli.constants.Phase]"; expected "Iterable[Optional[hypothesis._settings.Phase]]" [arg-type]
- src/schemathesis/specs/openapi/negative/mutations.py:125: error: Unused "type: ignore" comment [unused-ignore]
- src/schemathesis/specs/openapi/negative/__init__.py:108: error: Unused "type: ignore" comment [unused-ignore]
- src/schemathesis/hooks.py: note: In function "register":
- src/schemathesis/hooks.py:86: error: Redundant cast to "str" [redundant-cast]
- src/schemathesis/hooks.py: note: In function "before_generate_path_parameters":
- src/schemathesis/hooks.py:267: error: Missing return statement [empty-body]
- src/schemathesis/hooks.py: note: In function "before_generate_headers":
- src/schemathesis/hooks.py:272: error: Missing return statement [empty-body]
- src/schemathesis/hooks.py: note: In function "before_generate_cookies":
- src/schemathesis/hooks.py:277: error: Missing return statement [empty-body]
- src/schemathesis/hooks.py: note: In function "before_generate_query":
- src/schemathesis/hooks.py:282: error: Missing return statement [empty-body]
- src/schemathesis/hooks.py: note: In function "before_generate_body":
- src/schemathesis/hooks.py:287: error: Missing return statement [empty-body]
- src/schemathesis/hooks.py: note: In function "before_generate_case":
- src/schemathesis/hooks.py:292: error: Missing return statement [empty-body]
- src/schemathesis/cli/options.py: note: In member "fail_on_invalid_options" of class "BaseCsvChoice":
- src/schemathesis/cli/options.py:29: error: Implicit return in function which does not return [misc]
- src/schemathesis/cli/options.py: note: At top level:
- src/schemathesis/cli/options.py:41: error: Unused "type: ignore" comment [unused-ignore]
- src/schemathesis/loaders.py:102: error: Unused "type: ignore" comment [unused-ignore]
- src/schemathesis/service/client.py:51: error: Unused "type: ignore" comment [unused-ignore]
- src/schemathesis/fixups/__init__.py:20: error: Unused "type: ignore" comment [unused-ignore]
- src/schemathesis/fixups/__init__.py:32: error: Unused "type: ignore" comment [unused-ignore]
- src/schemathesis/specs/openapi/references.py: note: In member "resolve" of class "InliningResolver":
- src/schemathesis/specs/openapi/references.py:72: error: Call to untyped function "resolve" in typed context [no-untyped-call]
- src/schemathesis/specs/openapi/references.py:74: error: "RefResolutionError" has no attribute "__notes__" [attr-defined]
- src/schemathesis/targets.py:76: error: Unused "type: ignore" comment [unused-ignore]
- src/schemathesis/transports/__init__.py:166: error: Unused "type: ignore" comment [unused-ignore]
- src/schemathesis/specs/openapi/loaders.py:245: error: Unused "type: ignore" comment [unused-ignore]
- src/schemathesis/specs/graphql/scalars.py: note: In function "get_extra_scalar_strategies":
- src/schemathesis/specs/graphql/scalars.py:41: error: Argument 1 to "map" of "SearchStrategy" has incompatible type "Optional[Any]"; expected "Callable[[str], Any]" [arg-type]
- src/schemathesis/specs/graphql/scalars.py:42: error: Argument 1 to "map" of "SearchStrategy" has incompatible type "Optional[Any]"; expected "Callable[[str], Any]" [arg-type]
- src/schemathesis/specs/graphql/scalars.py:43: error: Argument 1 to "map" of "SearchStrategy" has incompatible type "Optional[Any]"; expected "Callable[[str], Any]" [arg-type]
- src/schemathesis/specs/graphql/scalars.py:44: error: Argument 1 to "map" of "SearchStrategy" has incompatible type "Optional[Any]"; expected "Callable[[str], Any]" [arg-type]
- src/schemathesis/specs/graphql/scalars.py:45: error: Argument 1 to "map" of "SearchStrategy" has incompatible type "Optional[Any]"; expected "Callable[[str], Any]" [arg-type]
- src/schemathesis/specs/graphql/scalars.py:46: error: Argument 1 to "map" of "SearchStrategy" has incompatible type "Optional[Any]"; expected "Callable[[str], Any]" [arg-type]
- src/schemathesis/specs/graphql/scalars.py:47: error: Argument 1 to "map" of "SearchStrategy" has incompatible type "Optional[Any]"; expected "Callable[[int], Any]" [arg-type]
- src/schemathesis/specs/graphql/scalars.py:48: error: Argument 1 to "map" of "SearchStrategy" has incompatible type "Optional[Any]"; expected "Callable[[int], Any]" [arg-type]
- src/schemathesis/specs/graphql/scalars.py:49: error: Argument 1 to "map" of "SearchStrategy" has incompatible type "Optional[Any]"; expected "Callable[[str], Any]" [arg-type]
- src/schemathesis/specs/graphql/loaders.py:267: error: Unused "type: ignore" comment [unused-ignore]
- src/schemathesis/models.py:92: error: Unused "type: ignore" comment [unused-ignore]
- src/schemathesis/models.py:99: error: Unused "type: ignore" comment [unused-ignore]
- src/schemathesis/models.py:503: error: Unused "type: ignore" comment [unused-ignore]
- src/schemathesis/models.py:869: error: Unused "type: ignore" comment [unused-ignore]
- src/schemathesis/checks.py:74: error: Unused "type: ignore" comment [unused-ignore]
- src/schemathesis/stateful/context.py: note: In function "_failure_cache_key":
- src/schemathesis/stateful/context.py:28: error: Call to untyped function "get_trimmed_traceback" in typed context [no-untyped-call]
- src/schemathesis/_hypothesis.py:70: error: Unused "type: ignore" comment [unused-ignore]
- src/schemathesis/_hypothesis.py: note: In function "create_test":
- src/schemathesis/_hypothesis.py:90: error: "Callable[..., None]" has no attribute "_hypothesis_internal_use_settings" [attr-defined]
- src/schemathesis/_hypothesis.py:91: error: "Callable[..., None]" has no attribute "_hypothesis_internal_use_settings" [attr-defined]
- src/schemathesis/_hypothesis.py: note: At top level:
- src/schemathesis/_hypothesis.py:260: error: Unused "type: ignore" comment [unused-ignore]
- src/schemathesis/_hypothesis.py:261: error: Unused "type: ignore" comment [unused-ignore]
- src/schemathesis/service/extensions.py: note: In function "_strategy_from_definition":
- src/schemathesis/service/extensions.py:185: error: "SearchStrategy[Any]" not callable [operator]
- src/schemathesis/specs/openapi/security.py: note: In member "get_security_definitions" of class "OpenAPISecurityProcessor":
- src/schemathesis/specs/openapi/security.py:131: error: "RefResolver" has no attribute "_scopes_stack" [attr-defined]
- src/schemathesis/specs/openapi/security.py:139: error: Call to untyped function (unknown) in typed context [no-untyped-call]
- src/schemathesis/specs/openapi/security.py:141: error: Call to untyped function (unknown) in typed context [no-untyped-call]
- src/schemathesis/specs/openapi/security.py:145: error: "RefResolver" has no attribute "_scopes_stack" [attr-defined]
- src/schemathesis/specs/openapi/_hypothesis.py:111: error: Unused "type: ignore" comment [unused-ignore]
- src/schemathesis/specs/openapi/_hypothesis.py: note: In function "get_parameters_strategy":
- src/schemathesis/specs/openapi/_hypothesis.py:412: error: Argument 1 to "filter" of "SearchStrategy" has incompatible type "Callable[[Dict[str, Any]], bool]"; expected "Callable[[None], Any]" [arg-type]
- src/schemathesis/runner/__init__.py:94: error: Unused "type: ignore" comment [unused-ignore]
- src/schemathesis/runner/__init__.py: note: In function "prepare_hypothesis_settings":
- src/schemathesis/runner/__init__.py:572: error: Incompatible types in assignment (expression has type "None", target has type "Union[int, List[Phase], List[HealthCheck]]") [assignment]
- src/schemathesis/runner/__init__.py:577: error: Incompatible types in assignment (expression has type "None", target has type "Union[int, List[Phase], List[HealthCheck]]") [assignment]
- src/schemathesis/runner/__init__.py:579: error: Call to untyped function "InMemoryExampleDatabase" in typed context [no-untyped-call]
- src/schemathesis/runner/__init__.py:579: error: Incompatible types in assignment (expression has type "InMemoryExampleDatabase", target has type "Union[int, List[Phase], List[HealthCheck]]") [assignment]
- src/schemathesis/runner/__init__.py:581: error: Incompatible types in assignment (expression has type "DirectoryBasedExampleDatabase", target has type "Union[int, List[Phase], List[HealthCheck]]") [assignment]
- src/schemathesis/runner/__init__.py:581: error: Argument 1 to "DirectoryBasedExampleDatabase" has incompatible type "str"; expected "PathLike[Any]" [arg-type]
- src/schemathesis/runner/__init__.py:583: error: Argument 2 to "settings" has incompatible type "**Dict[str, Union[int, List[Phase], List[HealthCheck]]]"; expected "Optional[settings]" [arg-type]
- src/schemathesis/runner/__init__.py:583: error: Argument 2 to "settings" has incompatible type "**Dict[str, Union[int, List[Phase], List[HealthCheck]]]"; expected "int" [arg-type]
- src/schemathesis/runner/__init__.py:583: error: Argument 2 to "settings" has incompatible type "**Dict[str, Union[int, List[Phase], List[HealthCheck]]]"; expected "bool" [arg-type]
- src/schemathesis/runner/__init__.py:583: error: Argument 2 to "settings" has incompatible type "**Dict[str, Union[int, List[Phase], List[HealthCheck]]]"; expected "Optional[ExampleDatabase]" [arg-type]
- src/schemathesis/runner/__init__.py:583: error: Argument 2 to "settings" has incompatible type "**Dict[str, Union[int, List[Phase], List[HealthCheck]]]"; expected "Verbosity" [arg-type]
- src/schemathesis/runner/__init__.py:583: error: Argument 2 to "settings" has incompatible type "**Dict[str, Union[int, List[Phase], List[HealthCheck]]]"; expected "Collection[Phase]" [arg-type]
- src/schemathesis/runner/__init__.py:583: error: Argument 2 to "settings" has incompatible type "**Dict[str, Union[int, List[Phase], List[HealthCheck]]]"; expected "Collection[HealthCheck]" [arg-type]
- src/schemathesis/runner/__init__.py:583: error: Argument 2 to "settings" has incompatible type "**Dict[str, Union[int, List[Phase], List[HealthCheck]]]"; expected "Union[int, float, timedelta, None]" [arg-type]
- src/schemathesis/runner/__init__.py:583: error: Argument 2 to "settings" has incompatible type "**Dict[str, Union[int, List[Phase], List[HealthCheck]]]"; expected "str" [arg-type]
- src/schemathesis/stateful/state_machine.py:58: error: Unused "type: ignore" comment [unused-ignore]
- src/schemathesis/stateful/state_machine.py: note: In member "_to_test_case" of class "APIStateMachine":
- src/schemathesis/stateful/state_machine.py:70: error: Variable "hypothesis.stateful.RuleBasedStateMachine.TestCase" is not valid as a type [valid-type]
- src/schemathesis/stateful/state_machine.py:70: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases
- src/schemathesis/stateful/state_machine.py: note: In function "_to_test_case":
- src/schemathesis/stateful/state_machine.py:70: error: Invalid base class "RuleBasedStateMachine.TestCase" [misc]
- src/schemathesis/stateful/state_machine.py: note: In member "_add_result_to_targets" of class "APIStateMachine":
- src/schemathesis/stateful/state_machine.py:103: error: Call to untyped function "_add_result_to_targets" in typed context [no-untyped-call]
- src/schemathesis/stateful/__init__.py: note: In function "run_state_machine_as_test":
- src/schemathesis/stateful/__init__.py:143: error: Call to untyped function "run_state_machine_as_test" in typed context [no-untyped-call]
- src/schemathesis/schemas.py:411: error: Unused "type: ignore" comment [unused-ignore]
- src/schemathesis/schemas.py:413: error: Unused "type: ignore" comment [unused-ignore]
- src/schemathesis/schemas.py:422: error: Unused "type: ignore" comment [unused-ignore]
- src/schemathesis/specs/openapi/links.py: note: In function "add_link":
- src/schemathesis/specs/openapi/links.py:350: error: Call to untyped function "resolve" in typed context [no-untyped-call]
- src/schemathesis/cli/callbacks.py:14: error: Unused "type: ignore" comment [unused-ignore]
- src/schemathesis/cli/callbacks.py:128: error: Unused "type: ignore" comment [unused-ignore]
- src/schemathesis/lazy.py: note: In function "run_subtest":
- src/schemathesis/lazy.py:381: error: Call to untyped function "get_trimmed_traceback" in typed context [no-untyped-call]
- src/schemathesis/lazy.py:382: error: Call to untyped function "format_exception" in typed context [no-untyped-call]
- src/schemathesis/lazy.py:389: error: Item "None" of "Optional[TracebackType]" has no attribute "tb_next" [union-attr]
- src/schemathesis/lazy.py:391: error: Item "None" of "Union[TracebackType, Any, None]" has no attribute "tb_next" [union-attr]
- src/schemathesis/specs/openapi/stateful/__init__.py: note: In function "transition":
- src/schemathesis/specs/openapi/stateful/__init__.py:156: error: No overload variant of "rule" matches argument type "Dict[str, SearchStrategy[Any]]" [call-overload]
- src/schemathesis/specs/openapi/stateful/__init__.py:156: note: Possible overload variants:
- src/schemathesis/specs/openapi/stateful/__init__.py:156: note: def [Ex] rule(*, targets: Sequence[Bundle[Ex]], target: None = ..., **kwargs: SearchStrategy[Any]) -> Callable[[Callable[..., Union[MultipleResults[Ex], Ex]]], Callable[..., Union[MultipleResults[Ex], Ex]]]
- src/schemathesis/specs/openapi/stateful/__init__.py:156: note: def [Ex] rule(*, target: Bundle[Ex], targets: _OmittedArgument = ..., **kwargs: SearchStrategy[Any]) -> Callable[[Callable[..., Union[MultipleResults[Ex], Ex]]], Callable[..., Union[MultipleResults[Ex], Ex]]]
- src/schemathesis/specs/openapi/stateful/__init__.py:156: note: def rule(*, target: None = ..., targets: _OmittedArgument = ..., **kwargs: SearchStrategy[Any]) -> Callable[[Callable[..., None]], Callable[..., None]]
- src/schemathesis/specs/graphql/schemas.py:344: error: Unused "type: ignore" comment [unused-ignore]
- src/schemathesis/specs/graphql/schemas.py:368: error: Unused "type: ignore" comment [unused-ignore]
- src/schemathesis/specs/graphql/schemas.py:390: error: Unused "type: ignore" comment [unused-ignore]
- src/schemathesis/cli/output/default.py: note: In function "handle_initialized":
- src/schemathesis/cli/output/default.py:764: error: Call to untyped function "show_changed" in typed context [no-untyped-call]
- src/schemathesis/cli/__init__.py:550: error: Unused "type: ignore" comment [unused-ignore]
- src/schemathesis/cli/__init__.py: note: In function "run":
- src/schemathesis/cli/__init__.py:1116: error: Redundant cast to "str" [redundant-cast]
- src/schemathesis/specs/openapi/schemas.py: note: In member "validate_response" of class "BaseOpenAPISchema":
- src/schemathesis/specs/openapi/schemas.py:676: error: Argument "cls" to "validate" has incompatible type "Type[Validator]"; expected "Optional[Type[_Validator]]" [arg-type]
- src/schemathesis/specs/openapi/schemas.py: note: In member "_rewrite_references" of class "BaseOpenAPISchema":
- src/schemathesis/specs/openapi/schemas.py:764: error: "InliningResolver" has no attribute "_scopes_stack" [attr-defined]
- src/schemathesis/extra/pytest_plugin.py:65: error: Unused "type: ignore" comment [unused-ignore]
- src/schemathesis/extra/pytest_plugin.py:172: error: Unused "type: ignore" comment [unused-ignore]
- src/schemathesis/extra/pytest_plugin.py: note: In function "hypothesis_reporter":
- src/schemathesis/extra/pytest_plugin.py:245: error: Call to untyped function "default" in typed context [no-untyped-call]
- src/schemathesis/extra/pytest_plugin.py: note: At top level:
+ src/schemathesis/extra/pytest_plugin.py:15: note: ... from here:
- src/schemathesis/extra/pytest_plugin.py:303: error: Unused "type: ignore" comment [unused-ignore]
paasta (https://github.com/yelp/paasta)
- paasta_tools/cli/cli.py:177: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
- paasta_tools/utils.py:3425: error: Unexpected keyword argument "assert_hostname" for "kwargs_from_env" [call-arg]
- paasta_tools/utils.py:4097: error: Unused "type: ignore" comment [unused-ignore]
- paasta_tools/utils.py:4125: error: A function returning TypeVar should receive at least one argument containing the same TypeVar [type-var]
- paasta_tools/utils.py:4132: error: A function returning TypeVar should receive at least one argument containing the same TypeVar [type-var]
- paasta_tools/metrics/metrics_lib.py:188: error: Cannot instantiate abstract class "Counter" with abstract attribute "set" [abstract]
- paasta_tools/mesos/slave.py:112: error: Unused "type: ignore" comment [unused-ignore]
- paasta_tools/frameworks/task_store.py:127: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
- paasta_tools/mesos/master.py:303: error: Unused "type: ignore" comment [unused-ignore]
- paasta_tools/kubernetes_tools.py:1224: error: Unused "type: ignore" comment [unused-ignore]
- paasta_tools/kubernetes_tools.py:3912: error: Unused "type: ignore" comment [unused-ignore]
- paasta_tools/frameworks/native_scheduler.py:116: error: Unused "type: ignore" comment [unused-ignore]
- paasta_tools/api/settings.py:30: error: Unused "type: ignore" comment [unused-ignore]
- paasta_tools/metrics/metastatus_lib.py:617: error: Argument "key" to "sorted" has incompatible type "Callable[[Any], Sequence[Tuple[str, str]]]"; expected "Callable[[_SlaveT], Union[SupportsDunderLT[Any], SupportsDunderGT[Any]]]" [arg-type]
- paasta_tools/metrics/metastatus_lib.py:617: error: Argument "key" to "sorted" has incompatible type "Callable[[Any], Sequence[Tuple[str, str]]]"; expected "Callable[[Any], Union[SupportsDunderLT[Any], SupportsDunderGT[Any]]]" [arg-type]
- paasta_tools/cleanup_kubernetes_jobs.py:207: error: Unused "type: ignore" comment [unused-ignore]
- paasta_tools/secret_providers/vault.py:180: error: Item "Response" of "Union[Dict[str, Any], Response]" has no attribute "get" [union-attr]
- paasta_tools/secret_providers/vault.py:208: error: Module has no attribute "exceptions" [attr-defined]
- paasta_tools/cli/utils.py:399: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
- paasta_tools/cli/utils.py:1070: error: Unused "type: ignore" comment [unused-ignore]
- paasta_tools/instance/kubernetes.py:632: error: Unused "type: ignore" comment [unused-ignore]
- paasta_tools/instance/kubernetes.py:639: error: Argument 1 to "append" of "list" has incompatible type "Task[KubernetesAutoscalingStatusDict]"; expected "Future[Dict[str, Any]]" [arg-type]
- paasta_tools/instance/kubernetes.py:651: error: Argument 1 to "append" of "list" has incompatible type "Task[Sequence[Any]]"; expected "Future[Dict[str, Any]]" [arg-type]
- paasta_tools/instance/kubernetes.py:672: error: Argument 1 to "get_backends_from_mesh_status" has incompatible type "Task[Mapping[str, Any]]"; expected "Future[Dict[str, Any]]" [arg-type]
- paasta_tools/instance/kubernetes.py:674: error: List item 0 has incompatible type "Task[Mapping[str, Any]]"; expected "Future[Dict[str, Any]]" [list-item]
- paasta_tools/instance/kubernetes.py:674: error: List item 1 has incompatible type "Task[Set[str]]"; expected "Future[Dict[str, Any]]" [list-item]
- paasta_tools/instance/kubernetes.py:683: error: Argument 2 to "get_pod_status_tasks_by_sha_and_readiness" has incompatible type "Optional[Task[Set[str]]]"; expected "Future[Dict[str, Any]]" [arg-type]
- paasta_tools/instance/kubernetes.py:694: error: Argument "pod_status_by_sha_and_readiness_task" to "get_versions_for_controller_revisions" has incompatible type "Task[defaultdict[Tuple[str, str], defaultdict[bool, List[Future[Dict[str, Any]]]]]]"; expected "Future[Mapping[Tuple[str, str], Mapping[bool, Sequence[Future[Mapping[str, Any]]]]]]" [arg-type]
- paasta_tools/instance/kubernetes.py:697: error: List item 0 has incompatible type "Task[defaultdict[Tuple[str, str], defaultdict[bool, List[Future[Dict[str, Any]]]]]]"; expected "Future[Dict[str, Any]]" [list-item]
- paasta_tools/instance/kubernetes.py:697: error: List item 1 has incompatible type "Task[List[KubernetesVersionDict]]"; expected "Future[Dict[str, Any]]" [list-item]
- paasta_tools/instance/kubernetes.py:702: error: Argument 2 to "get_pod_status_tasks_by_replicaset" has incompatible type "Optional[Task[Set[str]]]"; expected "Future[Dict[str, Any]]" [arg-type]
- paasta_tools/instance/kubernetes.py:713: error: Argument "pod_status_by_replicaset_task" to "get_versions_for_replicasets" has incompatible type "Task[Dict[str, List[Future[Dict[str, Any]]]]]"; expected "Future[Mapping[str, Sequence[Future[Dict[str, Any]]]]]" [arg-type]
- paasta_tools/instance/kubernetes.py:716: error: List item 1 has incompatible type "Task[List[KubernetesVersionDict]]"; expected "Future[Dict[str, Any]]" [list-item]
- paasta_tools/instance/kubernetes.py:1154: error: Need type annotation for "pods_task" [var-annotated]
- paasta_tools/instance/kubernetes.py:1155: error: Argument 1 to "create_task" has incompatible type "Awaitable[Sequence[Any]]"; expected "Union[Generator[Any, None, Never], Coroutine[Any, Any, Never]]" [arg-type]
- paasta_tools/instance/kubernetes.py:1198: error: Unused "type: ignore" comment [unused-ignore]
- paasta_tools/instance/kubernetes.py:1330: error: Need type annotation for "pods_task" [var-annotated]
- paasta_tools/instance/kubernetes.py:1331: error: Argument 1 to "create_task" has incompatible type "Awaitable[Sequence[Any]]"; expected "Union[Generator[Any, None, Never], Coroutine[Any, Any, Never]]" [arg-type]
- paasta_tools/cli/cmds/status.py:911: error: Unused "type: ignore" comment [unused-ignore]
- paasta_tools/cli/cmds/get_image_version.py:57: error: Unused "type: ignore" comment [unused-ignore]
- paasta_tools/cli/cmds/mark_for_deployment.py:153: error: Unused "type: ignore" comment [unused-ignore]
- paasta_tools/cli/cmds/mark_for_deployment.py:161: error: Unused "type: ignore" comment [unused-ignore]
- paasta_tools/api/views/instance.py:146: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
- paasta_tools/api/views/instance.py:351: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
- paasta_tools/cli/cmds/spark_run.py:785: error: Unused "type: ignore" comment [unused-ignore]
- paasta_tools/cli/cmds/spark_run.py:795: error: Unused "type: ignore" comment [unused-ignore]
- paasta_tools/cli/cmds/rollback.py:79: error: Unused "type: ignore" comment [unused-ignore]
- paasta_tools/cli/cmds/rollback.py:89: error: Unused "type: ignore" comment [unused-ignore]
- paasta_tools/cli/cmds/rollback.py:100: error: Unused "type: ignore" comment [unused-ignore]
- paasta_tools/cli/cmds/rollback.py:112: error: Unused "type: ignore" comment [unused-ignore]
- paasta_tools/cli/cmds/local_run.py:856: error: Unused "type: ignore" comment [unused-ignore]
- paasta_tools/cli/cmds/local_run.py:964: error: Argument 1 to "write" of "TextIOBase" has incompatible type "Union[str, bytes]"; expected "str" [arg-type]
- paasta_tools/cli/cmds/local_run.py:969: error: Argument 1 to "write" of "BufferedWriter" has incompatible type "Union[str, bytes]"; expected "Buffer" [arg-type]
cki-lib (https://gitlab.com/cki-project/cki-lib)
- cki_lib/metrics/server.py:8: error: Function is missing a type annotation for one or more arguments [no-untyped-def]
- cki_lib/metrics/server.py:22: error: No return value expected [return-value]
- cki_lib/timer.py:13: error: Function is missing a type annotation [no-untyped-def]
- cki_lib/timer.py:29: error: Function is missing a return type annotation [no-untyped-def]
- cki_lib/timer.py:29: note: Use "-> None" if function does not return a value
- cki_lib/timer.py:33: error: Function is missing a return type annotation [no-untyped-def]
- cki_lib/timer.py:33: note: Use "-> None" if function does not return a value
- cki_lib/timer.py:39: error: Call to untyped function "cancel" in typed context [no-untyped-call]
- cki_lib/timer.py:44: error: Function is missing a return type annotation [no-untyped-def]
- cki_lib/timer.py:44: note: Use "-> None" if function does not return a value
- cki_lib/s3bucket.py:18: error: Function is missing a type annotation for one or more arguments [no-untyped-def]
- cki_lib/s3bucket.py:36: error: Function is missing a type annotation [no-untyped-def]
- cki_lib/s3bucket.py:57: error: Item "None" of "Any | None" has no attribute "get_credentials" [union-attr]
- cki_lib/s3bucket.py:76: error: Incompatible types in assignment (expression has type "ParseResult", variable has type "str") [assignment]
- cki_lib/s3bucket.py:77: error: "str" has no attribute "scheme" [attr-defined]
- cki_lib/s3bucket.py:77: error: "str" has no attribute "netloc" [attr-defined]
- cki_lib/s3bucket.py:78: error: "str" has no attribute "path" [attr-defined]
- cki_lib/s3bucket.py:83: error: Function is missing a return type annotation [no-untyped-def]
- cki_lib/retrying.py:7: error: Function is missing a type annotation [no-untyped-def]
- cki_lib/retrying.py:21: error: Function is missing a type annotation [no-untyped-def]
- cki_lib/retrying.py:22: error: Function is missing a type annotation [no-untyped-def]
- cki_lib/retrying.py:23: error: "Callable[[VarArg(Any), KwArg(Any)], Any]" has no attribute "failed_count" [attr-defined]
- cki_lib/retrying.py:24: error: "Callable[[VarArg(Any), KwArg(Any)], Any]" has no attribute "retries" [attr-defined]
- cki_lib/retrying.py:33: error: "Callable[[VarArg(Any), KwArg(Any)], Any]" has no attribute "failed_count" [attr-defined]
- cki_lib/retrying.py:35: error: "Callable[[VarArg(Any), KwArg(Any)], Any]" has no attribute "failed_count" [attr-defined]
- tests/cki_pipeline/mocks.py:12: error: Function is missing a type annotation [no-untyped-def]
- tests/cki_pipeline/mocks.py:35: error: Function is missing a type annotation [no-untyped-def]
- tests/cki_pipeline/mocks.py:47: error: Function is missing a type annotation [no-untyped-def]
- tests/cki_pipeline/mocks.py:62: error: Function is missing a type annotation [no-untyped-def]
- tests/cki_pipeline/mocks.py:76: error: Function is missing a type annotation [no-untyped-def]
- cki_lib/timeout.py:10: error: Function is missing a type annotation [no-untyped-def]
- cki_lib/timeout.py:13: error: Function is missing a type annotation [no-untyped-def]
- cki_lib/timeout.py:17: error: Function is missing a type annotation [no-untyped-def]
- cki_lib/timeout.py:32: error: Function is missing a type annotation [no-untyped-def]
- cki_lib/timeout.py:34: error: Call to untyped function "timeout" in typed context [no-untyped-call]
- cki_lib/psql.py:14: error: Function is missing a type annotation [no-untyped-def]
- cki_lib/psql.py:43: error: Function is missing a return type annotation [no-untyped-def]
- cki_lib/psql.py:59: error: Function is missing a type annotation [no-untyped-def]
- cki_lib/psql.py:64: error: Function is missing a type annotation [no-untyped-def]
- cki_lib/psql.py:67: error: Call to untyped function "_execute" in typed context [no-untyped-call]
- cki_lib/psql.py:71: error: Call to untyped function "_execute" in typed context [no-untyped-call]
- cki_lib/pool.py:10: error: Function is missing a return type annotation [no-untyped-def]
- cki_lib/pool.py:15: error: Function is missing a type annotation [no-untyped-def]
- cki_lib/pool.py:19: error: Unsupported dynamic base class "type" [misc]
- cki_lib/pool.py:30: error: Function is missing a type annotation [no-untyped-def]
- cki_lib/logger.py:118: error: Incompatible types in assignment (expression has type "StreamHandler[TextIO | Any]", variable has type "WatchedFileHandler") [assignment]
- tests/test_timer.py:12: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_timer.py:12: note: Use "-> None" if function does not return a value
- tests/test_timer.py:15: error: Call to untyped function "ScheduledTask" in typed context [no-untyped-call]
- tests/test_timer.py:16: error: Call to untyped function "start" in typed context [no-untyped-call]
- tests/test_timer.py:20: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_timer.py:20: note: Use "-> None" if function does not return a value
- tests/test_timer.py:28: error: Call to untyped function "ScheduledTask" in typed context [no-untyped-call]
- tests/test_timer.py:31: error: Call to untyped function "start" in typed context [no-untyped-call]
- tests/test_timer.py:35: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_timer.py:35: note: Use "-> None" if function does not return a value
- tests/test_timer.py:38: error: Call to untyped function "ScheduledTask" in typed context [no-untyped-call]
- tests/test_timer.py:39: error: Call to untyped function "start" in typed context [no-untyped-call]
- tests/test_timer.py:43: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_timer.py:43: note: Use "-> None" if function does not return a value
- tests/test_timer.py:46: error: Call to untyped function "ScheduledTask" in typed context [no-untyped-call]
- tests/test_timer.py:47: error: Call to untyped function "start" in typed context [no-untyped-call]
- tests/test_timer.py:48: error: Call to untyped function "cancel" in typed context [no-untyped-call]
- tests/test_timeout.py:13: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_timeout.py:13: note: Use "-> None" if function does not return a value
- tests/test_timeout.py:15: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_timeout.py:15: note: Use "-> None" if function does not return a value
- tests/test_timeout.py:19: error: Call to untyped function "func_timeout" in typed context [no-untyped-call]
- tests/test_timeout.py:21: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_timeout.py:21: note: Use "-> None" if function does not return a value
- tests/test_timeout.py:24: error: Call to untyped function "timeout" in typed context [no-untyped-call]
- tests/test_timeout.py:25: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_timeout.py:25: note: Use "-> None" if function does not return a value
- tests/test_session.py:20: error: Function is missing a type annotation [no-untyped-def]
- tests/test_session.py:28: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_session.py:28: note: Use "-> None" if function does not return a value
- tests/test_session.py:34: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_session.py:34: note: Use "-> None" if function does not return a value
- tests/test_session.py:41: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_session.py:41: note: Use "-> None" if function does not return a value
- tests/test_session.py:48: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_session.py:48: note: Use "-> None" if function does not return a value
- tests/test_session.py:55: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_session.py:55: note: Use "-> None" if function does not return a value
- tests/test_session.py:62: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_session.py:62: note: Use "-> None" if function does not return a value
- tests/test_session.py:69: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_session.py:69: note: Use "-> None" if function does not return a value
- tests/test_session.py:76: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_session.py:76: note: Use "-> None" if function does not return a value
- tests/test_session.py:84: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_session.py:84: note: Use "-> None" if function does not return a value
- tests/test_session.py:93: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_session.py:93: note: Use "-> None" if function does not return a value
- tests/test_session.py:101: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_session.py:101: note: Use "-> None" if function does not return a value
- tests/test_session.py:109: error: Function is missing a type annotation [no-untyped-def]
- tests/test_session.py:124: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_session.py:124: note: Use "-> None" if function does not return a value
- tests/test_session.py:136: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_session.py:136: note: Use "-> None" if function does not return a value
- tests/test_session.py:138: error: Need type annotation for "cases" [var-annotated]
- tests/test_session.py:148: error: "PreparedRequest" has no attribute "req_kwargs" [attr-defined]
- tests/test_session.py:152: error: Function is missing a type annotation [no-untyped-def]
- tests/test_session.py:168: error: Function is missing a type annotation [no-untyped-def]
- tests/test_session.py:182: error: Untyped decorator makes function "test_headers" untyped [misc]
- tests/test_session.py:185: error: Need type annotation for "cases" [var-annotated]
- tests/test_s3bucket.py:14: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_s3bucket.py:14: note: Use "-> None" if function does not return a value
- tests/test_s3bucket.py:24: error: Function is missing a type annotation [no-untyped-def]
- tests/test_s3bucket.py:32: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_s3bucket.py:32: note: Use "-> None" if function does not return a value
- tests/test_s3bucket.py:37: error: Function is missing a type annotation [no-untyped-def]
- tests/test_s3bucket.py:45: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_s3bucket.py:45: note: Use "-> None" if function does not return a value
- tests/test_s3bucket.py:53: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_s3bucket.py:53: note: Use "-> None" if function does not return a value
- tests/test_s3bucket.py:61: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_s3bucket.py:61: note: Use "-> None" if function does not return a value
- tests/test_s3bucket.py:67: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_s3bucket.py:67: note: Use "-> None" if function does not return a value
- tests/test_s3bucket.py:75: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_s3bucket.py:75: note: Use "-> None" if function does not return a value
- tests/test_s3bucket.py:84: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_s3bucket.py:84: note: Use "-> None" if function does not return a value
- tests/test_s3bucket.py:93: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_s3bucket.py:93: note: Use "-> None" if function does not return a value
- tests/test_s3bucket.py:107: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_s3bucket.py:107: note: Use "-> None" if function does not return a value
- tests/test_s3bucket.py:118: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_s3bucket.py:118: note: Use "-> None" if function does not return a value
- tests/test_s3bucket.py:129: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_s3bucket.py:129: note: Use "-> None" if function does not return a value
- tests/test_retrying.py:8: error: Function is missing a type annotation [no-untyped-def]
- tests/test_retrying.py:16: error: Function is missing a type annotation [no-untyped-def]
- tests/test_retrying.py:25: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_retrying.py:25: note: Use "-> None" if function does not return a value
- tests/test_retrying.py:28: error: Call to untyped function "retrying_on_exception" in typed context [no-untyped-call]
- tests/test_retrying.py:34: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_retrying.py:34: note: Use "-> None" if function does not return a value
- tests/test_retrying.py:37: error: Call to untyped function "retrying_on_exception" in typed context [no-untyped-call]
- tests/test_psql.py:18: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_psql.py:18: note: Use "-> None" if function does not return a value
- tests/test_psql.py:29: error: Call to untyped function "PSQLHandler" in typed context [no-untyped-call]
- tests/test_psql.py:35: error: Function is missing a type annotation [no-untyped-def]
- tests/test_psql.py:38: error: Call to untyped function "PSQLHandler" in typed context [no-untyped-call]
- tests/test_psql.py:45: error: Function is missing a type annotation [no-untyped-def]
- tests/test_psql.py:48: error: Call to untyped function "PSQLHandler" in typed context [no-untyped-call]
- tests/test_psql.py:55: error: Function is missing a type annotation [no-untyped-def]
- tests/test_psql.py:60: error: Call to untyped function "PSQLHandler" in typed context [no-untyped-call]
- tests/test_psql.py:66: error: Function is missing a type annotation [no-untyped-def]
- tests/test_psql.py:71: error: Call to untyped function "PSQLHandler" in typed context [no-untyped-call]
- tests/test_psql.py:79: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_psql.py:79: note: Use "-> None" if function does not return a value
- tests/test_psql.py:81: error: Call to untyped function "PSQLHandler" in typed context [no-untyped-call]
- tests/test_psql.py:85: error: Call to untyped function "execute" in typed context [no-untyped-call]
- tests/test_psql.py:95: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_psql.py:95: note: Use "-> None" if function does not return a value
- tests/test_psql.py:97: error: Call to untyped function "PSQLHandler" in typed context [no-untyped-call]
- tests/test_psql.py:98: error: Cannot assign to a method [method-assign]
- tests/test_pool.py:7: error: Function is missing a type annotation [no-untyped-def]
- tests/test_pool.py:15: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_pool.py:15: note: Use "-> None" if function does not return a value
- tests/test_pool.py:18: error: Call to untyped function "NonDaemonicPool" in typed context [no-untyped-call]
- tests/test_pool.py:22: error: "NonDaemonicPool" has no attribute "_ctx" [attr-defined]
- tests/test_logger.py:21: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_logger.py:21: note: Use "-> None" if function does not return a value
- tests/test_logger.py:26: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_logger.py:26: note: Use "-> None" if function does not return a value
- tests/test_logger.py:43: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_logger.py:43: note: Use "-> None" if function does not return a value
- tests/test_logger.py:49: error: "type[TestLoggerPatched]" has no attribute "mock_stderr" [attr-defined]
- tests/test_logger.py:51: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_logger.py:51: note: Use "-> None" if function does not return a value
- tests/test_logger.py:54: error: Call to untyped function "reset_logger" of "TestLoggerPatched" in typed context [no-untyped-call]
- tests/test_logger.py:56: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_logger.py:56: note: Use "-> None" if function does not return a value
- tests/test_logger.py:60: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_logger.py:60: note: Use "-> None" if function does not return a value
- tests/test_logger.py:74: error: "TestLoggerPatched" has no attribute "mock_stderr" [attr-defined]
- tests/test_logger.py:75: error: "TestLoggerPatched" has no attribute "mock_stderr" [attr-defined]
- tests/test_logger.py:77: error: "TestLoggerPatched" has no attribute "mock_stderr" [attr-defined]
- tests/test_logger.py:78: error: "TestLoggerPatched" has no attribute "mock_stderr" [attr-defined]
- tests/test_logger.py:82: error: "TestLoggerPatched" has no attribute "mock_stderr" [attr-defined]
- tests/test_logger.py:83: error: "TestLoggerPatched" has no attribute "mock_stderr" [attr-defined]
- tests/test_logger.py:88: error: "TestLoggerPatched" has no attribute "mock_stderr" [attr-defined]
- tests/test_logger.py:90: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_logger.py:90: note: Use "-> None" if function does not return a value
- tests/test_logger.py:96: error: "TestLoggerPatched" has no attribute "mock_stderr" [attr-defined]
- tests/test_logger.py:99: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_logger.py:99: note: Use "-> None" if function does not return a value
- tests/test_logger.py:105: error: "TestLoggerPatched" has no attribute "mock_stderr" [attr-defined]
- tests/test_logger.py:106: error: "TestLoggerPatched" has no attribute "mock_stderr" [attr-defined]
- tests/test_logger.py:108: error: "TestLoggerPatched" has no attribute "mock_stderr" [attr-defined]
- tests/test_logger.py:111: error: Call to untyped function "reset_logger" of "TestLoggerPatched" in typed context [no-untyped-call]
- tests/test_logger.py:116: error: "TestLoggerPatched" has no attribute "mock_stderr" [attr-defined]
- tests/test_logger.py:119: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_logger.py:119: note: Use "-> None" if function does not return a value
- tests/test_logger.py:129: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_logger.py:129: note: Use "-> None" if function does not return a value
- tests/test_logger.py:159: error: "TestLoggerPatched" has no attribute "mock_stderr" [attr-defined]
- tests/test_logger.py:168: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_logger.py:168: note: Use "-> None" if function does not return a value
- tests/test_logger.py:189: error: "TestLoggerPatched" has no attribute "mock_stderr" [attr-defined]
- tests/test_logger.py:194: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_logger.py:194: note: Use "-> None" if function does not return a value
- tests/test_logger.py:215: error: "TestLoggerPatched" has no attribute "mock_stderr" [attr-defined]
- tests/test_logger.py:234: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_logger.py:234: note: Use "-> None" if function does not return a value
- cki_lib/misc.py:42: error: Function is missing a type annotation [no-untyped-def]
- cki_lib/misc.py:123: error: Function is missing a type annotation [no-untyped-def]
- cki_lib/misc.py:139: error: Function is missing a type annotation [no-untyped-def]
- cki_lib/misc.py:223: error: Function is missing a type annotation [no-untyped-def]
- cki_lib/misc.py:240: error: Function is missing a type annotation [no-untyped-def]
- cki_lib/misc.py:255: error: Function is missing a type annotation [no-untyped-def]
- cki_lib/misc.py:280: error: Function is missing a type annotation [no-untyped-def]
- cki_lib/misc.py:294: error: Call to untyped function "retrying_on_exception" in typed context [no-untyped-call]
- cki_lib/misc.py:295: error: Function is missing a type annotation [no-untyped-def]
- cki_lib/misc.py:318: error: Call to untyped function "safe_popen" in typed context [no-untyped-call]
- cki_lib/misc.py:337: error: Function is missing a type annotation [no-untyped-def]
- cki_lib/misc.py:348: error: Function is missing a type annotation [no-untyped-def]
- cki_lib/misc.py:371: error: Function is missing a return type annotation [no-untyped-def]
- cki_lib/misc.py:371: note: Use "-> None" if function does not return a value
- cki_lib/misc.py:406: error: Function is missing a return type annotation [no-untyped-def]
- cki_lib/misc.py:411: error: Function is missing a type annotation [no-untyped-def]
- cki_lib/config_tree.py:30: error: Need type annotation for "extend" [var-annotated]
- cki_lib/yaml.py:91: error: Need type annotation for "include" [var-annotated]
- cki_lib/yaml.py:152: error: Incompatible default for argument "validation_error" (default has type "None", argument has type "ValidationError") [assignment]
- cki_lib/yaml.py:152: note: PEP 484 prohibits implicit Optional. Accordingly, mypy has changed its default to no_implicit_optional=True
- cki_lib/yaml.py:152: note: Use https://github.com/hauntsaninja/no_implicit_optional to automatically upgrade your codebase
- cki_lib/yaml.py:174: error: "ValidationError" has no attribute "_type_checker" [attr-defined]
- cki_lib/yaml.py:180: error: Missing type parameters for generic type "typing.Dict" [type-arg]
- cki_lib/yaml.py:180: error: Missing type parameters for generic type "typing.List" [type-arg]
- cki_lib/yaml.py:300: error: Call to untyped function "sentry_init" in typed context [no-untyped-call]
- cki_lib/kcidb/validate.py:32: error: Argument "contents" to "load" has incompatible type "bytes | None"; expected "str | None" [arg-type]
- cki_lib/kcidb/validate.py:57: error: Function is missing a type annotation for one or more arguments [no-untyped-def]
- cki_lib/kcidb/validate.py:86: error: Function is missing a type annotation [no-untyped-def]
- cki_lib/kcidb/validate.py:95: error: Function is missing a type annotation [no-untyped-def]
- cki_lib/kcidb/validate.py:122: error: Function is missing a type annotation [no-untyped-def]
- cki_lib/kcidb/validate.py:131: error: Call to untyped function "_validate_kcidb" in typed context [no-untyped-call]
- cki_lib/kcidb/validate.py:132: error: Call to untyped function "_validate_origins" in typed context [no-untyped-call]
- cki_lib/kcidb/validate.py:135: error: Function is missing a type annotation [no-untyped-def]
- cki_lib/kcidb/validate.py:145: error: Function is missing a type annotation [no-untyped-def]
- cki_lib/kcidb/validate.py:149: error: Call to untyped function "_validate_kcidb" in typed context [no-untyped-call]
- cki_lib/kcidb/validate.py:150: error: Call to untyped function "_validate_origins" in typed context [no-untyped-call]
- cki_lib/kcidb/validate.py:152: error: Call to untyped function "_validate_cki_schema" in typed context [no-untyped-call]
- cki_lib/kcidb/validate.py:161: error: Function is missing a type annotation [no-untyped-def]
- cki_lib/kcidb/validate.py:171: error: Call to untyped function "validate_extended_kcidb_schema" in typed context [no-untyped-call]
- cki_lib/kcidb/validate.py:174: error: Function is missing a type annotation [no-untyped-def]
- cki_lib/kcidb/validate.py:181: error: Call to untyped function "validate_extended_kcidb_schema" in typed context [no-untyped-call]
- cki_lib/kcidb/validate.py:185: error: Call to untyped function "main" in typed context [no-untyped-call]
- tests/test_yaml.py:51: error: Argument "file_path" to "load" has incompatible type "Traversable"; expected "Path | str | None" [arg-type]
- tests/test_yaml.py:62: error: "object" has no attribute "__enter__" [attr-defined]
- tests/test_yaml.py:62: error: "object" has no attribute "__exit__" [attr-defined]
- tests/test_yaml.py:63: error: Argument "file_path" to "load" has incompatible type "Traversable"; expected "Path | str | None" [arg-type]
- tests/test_yaml.py:64: error: Argument "schema_path" to "load" has incompatible type "Traversable"; expected "Path | str | None" [arg-type]
- tests/test_yaml.py:74: error: "object" has no attribute "__enter__" [attr-defined]
- tests/test_yaml.py:74: error: "object" has no attribute "__exit__" [attr-defined]
- tests/test_yaml.py:75: error: Argument "file_path" to "load" has incompatible type "Traversable"; expected "Path | str | None" [arg-type]
- tests/test_yaml.py:76: error: Argument "schema_path" to "load" has incompatible type "Traversable"; expected "Path | str | None" [arg-type]
- tests/test_yaml.py:116: error: Untyped decorator makes function "test_include_url" untyped [misc]
- tests/test_yaml.py:150: error: Argument 1 to "validate" has incompatible type "str | int"; expected "dict[Any, Any] | list[Any] | str" [arg-type]
- tests/test_yaml.py:167: error: Need type annotation for "cases" [var-annotated]
- tests/test_yaml.py:187: error: Argument 1 to "redirect_stdin" of "TestYaml" has incompatible type "str | None"; expected "str" [arg-type]
- tests/test_yaml.py:191: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_yaml.py:191: note: Use "-> None" if function does not return a value
- tests/test_misc.py:20: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_misc.py:20: note: Use "-> None" if function does not return a value
- tests/test_misc.py:27: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_misc.py:27: note: Use "-> None" if function does not return a value
- tests/test_misc.py:31: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_misc.py:31: note: Use "-> None" if function does not return a value
- tests/test_misc.py:35: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_misc.py:35: note: Use "-> None" if function does not return a value
- tests/test_misc.py:37: error: Need type annotation for "cases" [var-annotated]
- tests/test_misc.py:51: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_misc.py:51: note: Use "-> None" if function does not return a value
- tests/test_misc.py:72: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_misc.py:72: note: Use "-> None" if function does not return a value
- tests/test_misc.py:87: error: Argument 1 to "set_nested_key" has incompatible type "object"; expected "dict[str, Any] | list[Any]" [arg-type]
- tests/test_misc.py:89: error: Argument 1 to "set_nested_key" has incompatible type "object"; expected "dict[str, Any] | list[Any]" [arg-type]
- tests/test_misc.py:92: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_misc.py:92: note: Use "-> None" if function does not return a value
- tests/test_misc.py:114: error: Call to untyped function "append_to_nested_list" in typed context [no-untyped-call]
- tests/test_misc.py:115: error: Argument 2 to "assertDictEqual" of "TestCase" has incompatible type "object"; expected "Mapping[Any, object]" [arg-type]
- tests/test_misc.py:117: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_misc.py:117: note: Use "-> None" if function does not return a value
- tests/test_misc.py:141: error: Call to untyped function "append_to_nested_list" in typed context [no-untyped-call]
- tests/test_misc.py:142: error: Argument 1 to "assertDictEqual" of "TestCase" has incompatible type "object"; expected "Mapping[Any, object]" [arg-type]
- tests/test_misc.py:142: error: Argument 2 to "assertDictEqual" of "TestCase" has incompatible type "object"; expected "Mapping[Any, object]" [arg-type]
- tests/test_misc.py:144: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_misc.py:144: note: Use "-> None" if function does not return a value
- tests/test_misc.py:148: error: Call to untyped function "append_to_nested_list" in typed context [no-untyped-call]
- tests/test_misc.py:150: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_misc.py:150: note: Use "-> None" if function does not return a value
- tests/test_misc.py:153: error: Call to untyped function "get_env_var_or_raise" in typed context [no-untyped-call]
- tests/test_misc.py:162: error: Invalid index type "str | None" for "_Environ[str]"; expected type "str" [index]
- tests/test_misc.py:162: error: Call to untyped function "get_env_var_or_raise" in typed context [no-untyped-call]
- tests/test_misc.py:164: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_misc.py:164: note: Use "-> None" if function does not return a value
- tests/test_misc.py:173: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_misc.py:173: note: Use "-> None" if function does not return a value
- tests/test_misc.py:181: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_misc.py:184: error: Function is missing a type annotation [no-untyped-def]
- tests/test_misc.py:186: error: "Callable[[VarArg(Any), KwArg(Any)], Any]" has no attribute "communicate" [attr-defined]
- tests/test_misc.py:188: error: "Callable[[VarArg(Any), KwArg(Any)], Any]" has no attribute "returncode" [attr-defined]
- tests/test_misc.py:189: error: "Callable[[VarArg(Any), KwArg(Any)], Any]" has no attribute "called" [attr-defined]
- tests/test_misc.py:193: error: Call to untyped function "safe_popen" in typed context [no-untyped-call]
- tests/test_misc.py:202: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_misc.py:205: error: Function is missing a type annotation [no-untyped-def]
- tests/test_misc.py:220: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_misc.py:220: note: Use "-> None" if function does not return a value
- tests/test_misc.py:226: error: Call to untyped function "read_stream" in typed context [no-untyped-call]
- tests/test_misc.py:231: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_misc.py:231: note: Use "-> None" if function does not return a value
- tests/test_misc.py:233: error: Call to untyped function "utc_now_iso" in typed context [no-untyped-call]
- tests/test_misc.py:235: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_misc.py:235: note: Use "-> None" if function does not return a value
- tests/test_misc.py:246: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_misc.py:246: note: Use "-> None" if function does not return a value
- tests/test_misc.py:262: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_misc.py:262: note: Use "-> None" if function does not return a value
- tests/test_misc.py:273: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_misc.py:273: note: Use "-> None" if function does not return a value
- tests/test_misc.py:282: error: Call to untyped function "key_value_list_to_dict" in typed context [no-untyped-call]
- tests/test_misc.py:318: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_misc.py:318: note: Use "-> None" if function does not return a value
- tests/test_misc.py:321: error: Argument 1 to "booltostr" has incompatible type "None"; expected "bool" [arg-type]
- tests/test_misc.py:322: error: Argument 1 to "booltostr" has incompatible type "str"; expected "bool" [arg-type]
- tests/test_misc.py:323: error: Argument 1 to "booltostr" has incompatible type "list[Never]"; expected "bool" [arg-type]
- tests/test_misc.py:325: error: Argument 1 to "booltostr" has incompatible type "str"; expected "bool" [arg-type]
- tests/test_misc.py:326: error: Argument 1 to "booltostr" has incompatible type "list[str]"; expected "bool" [arg-type]
- tests/test_misc.py:328: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_misc.py:328: note: Use "-> None" if function does not return a value
- tests/test_misc.py:342: error: Function is missing a type annotation [no-untyped-def]
- tests/test_misc.py:346: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_misc.py:346: note: Use "-> None" if function does not return a value
- tests/test_misc.py:348: error: Call to untyped function "_test" of "TestBoolEnv" in typed context [no-untyped-call]
- tests/test_misc.py:351: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_misc.py:351: note: Use "-> None" if function does not return a value
- tests/test_misc.py:353: error: Call to untyped function "_test" of "TestBoolEnv" in typed context [no-untyped-call]
- tests/test_misc.py:356: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_misc.py:356: note: Use "-> None" if function does not return a value
- tests/test_misc.py:358: error: Call to untyped function "_test" of "TestBoolEnv" in typed context [no-untyped-call]
- tests/test_misc.py:361: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_misc.py:361: note: Use "-> None" if function does not return a value
- tests/test_misc.py:363: error: Call to untyped function "_test" of "TestBoolEnv" in typed context [no-untyped-call]
- tests/test_misc.py:366: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_misc.py:366: note: Use "-> None" if function does not return a value
- tests/test_misc.py:368: error: Call to untyped function "_test" of "TestBoolEnv" in typed context [no-untyped-call]
- tests/test_misc.py:371: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_misc.py:371: note: Use "-> None" if function does not return a value
- tests/test_misc.py:373: error: Call to untyped function "_test" of "TestBoolEnv" in typed context [no-untyped-call]
- tests/test_misc.py:376: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_misc.py:379: error: Call to untyped function "_test" of "TestBoolEnv" in typed context [no-untyped-call]
- tests/test_misc.py:385: error: Function is missing a type annotation [no-untyped-def]
- tests/test_misc.py:389: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_misc.py:389: note: Use "-> None" if function does not return a value
- tests/test_misc.py:391: error: Call to untyped function "_test" of "TestIntEnv" in typed context [no-untyped-call]
- tests/test_misc.py:393: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_misc.py:393: note: Use "-> None" if function does not return a value
- tests/test_misc.py:395: e
... (truncated 3211 lines) ...
Diff from mypy_primer, showing the effect of this PR on open source code:
cloud-init (https://github.com/canonical/cloud-init)
- tests/hypothesis_jsonschema.py:8: error: Unused "type: ignore" comment [unused-ignore]
- cloudinit/sources/helpers/cloudsigma.py:70: error: Unexpected keyword argument "writeTimeout" for "Serial"; did you mean "write_timeout"? [call-arg]
- cloudinit/net/netops/__init__.py:8: error: Missing return statement [empty-body]
- cloudinit/net/netops/__init__.py:12: error: Missing return statement [empty-body]
- cloudinit/net/netops/__init__.py:44: error: Missing return statement [empty-body]
- cloudinit/safeyaml.py:165: error: Signature of "construct_mapping" incompatible with supertype "SafeConstructor" [override]
- cloudinit/safeyaml.py:165: note: Superclass:
- cloudinit/safeyaml.py:165: note: def construct_mapping(self, node: MappingNode, deep: bool = ...) -> dict[Hashable, Any]
- cloudinit/safeyaml.py:165: note: Subclass:
- cloudinit/safeyaml.py:165: note: def construct_mapping(self, node: Any) -> Any
- cloudinit/safeyaml.py:165: error: Signature of "construct_mapping" incompatible with supertype "BaseConstructor" [override]
- cloudinit/safeyaml.py:165: note: Superclass:
- cloudinit/safeyaml.py:165: note: def construct_mapping(self, node: MappingNode, deep: bool = ...) -> dict[Hashable, Any]
- cloudinit/safeyaml.py:165: note: Subclass:
- cloudinit/safeyaml.py:165: note: def construct_mapping(self, node: Any) -> Any
- tests/hypothesis.py:10: error: Unused "type: ignore" comment [unused-ignore]
- cloudinit/url_helper.py:283: error: Unused "type: ignore" comment [unused-ignore]
- cloudinit/net/sysconfig.py:999: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
- cloudinit/net/openbsd.py:13: error: Signature of "write_config" incompatible with supertype "BSDRenderer" [override]
- cloudinit/net/openbsd.py:13: note: Superclass:
- cloudinit/net/openbsd.py:13: note: def write_config(self, target: Any = ...) -> Any
- cloudinit/net/openbsd.py:13: note: Subclass:
- cloudinit/net/openbsd.py:13: note: def write_config(self) -> Any
- cloudinit/distros/__init__.py:168: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
- cloudinit/distros/__init__.py:172: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
- cloudinit/distros/aosc.py:110: error: Signature of "update_package_sources" incompatible with supertype "Distro" [override]
- cloudinit/distros/aosc.py:110: note: Superclass:
- cloudinit/distros/aosc.py:110: note: def update_package_sources(self, *, force: Any = ...) -> Any
- cloudinit/distros/aosc.py:110: note: Subclass:
- cloudinit/distros/aosc.py:110: note: def update_package_sources(self) -> Any
- cloudinit/distros/alpine.py:278: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
- cloudinit/sources/DataSourceOracle.py:143: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
- cloudinit/sources/DataSourceAzure.py:334: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
- cloudinit/sources/DataSourceAzure.py:1835: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
- cloudinit/config/cc_ubuntu_pro.py:229: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
- cloudinit/config/cc_ubuntu_pro.py:237: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
- cloudinit/config/cc_growpart.py:298: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
- cloudinit/config/cc_apt_configure.py:615: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
- cloudinit/config/cc_apt_configure.py:616: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
- tests/unittests/test_templating.py:268: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
- tests/unittests/test_net.py:3559: error: Statement is unreachable [unreachable]
- tests/unittests/config/test_cc_write_files.py:152: error: Argument 1 to "load_binary_file" has incompatible type "str | Any | bytes"; expected "str | PathLike[Any]" [arg-type]
- tests/unittests/config/test_cc_ubuntu_drivers.py:84: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
- cloudinit/cmd/devel/hotplug_hook.py:83: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
schemathesis (https://github.com/schemathesis/schemathesis)
- src/schemathesis/failures.py: note: In member "from_exception" of class "ValidationErrorContext":
- src/schemathesis/failures.py:68: error: Argument "schema" to "ValidationErrorContext" has incompatible type "Union[Mapping[str, Any], bool, Unset]"; expected "Union[Dict[str, Any], bool]" [arg-type]
- src/schemathesis/failures.py:70: error: Argument "instance" to "ValidationErrorContext" has incompatible type "Union[Any, Unset]"; expected "Union[bool, float, str, List[Any], Dict[str, Any], None]" [arg-type]
- src/schemathesis/_compat.py: note: In function "_load_infer_type":
- src/schemathesis/_compat.py:30: error: Module "hypothesis.utils.conventions" has no attribute "InferType" [attr-defined]
- src/schemathesis/_compat.py: note: In function "_load_get_interesting_origin":
- src/schemathesis/_compat.py:39: error: Module "hypothesis.internal.escalation" has no attribute "get_interesting_origin"; maybe "InterestingOrigin"? [attr-defined]
- src/schemathesis/_compat.py: note: At top level:
- src/schemathesis/_compat.py:52: error: Unused "type: ignore" comment [unused-ignore]
- src/schemathesis/cli/constants.py: note: In member "filter_from_all" of class "Phase":
- src/schemathesis/cli/constants.py:35: error: Argument 1 to "set" has incompatible type "List[schemathesis.cli.constants.Phase]"; expected "Iterable[Optional[hypothesis._settings.Phase]]" [arg-type]
- src/schemathesis/specs/openapi/negative/mutations.py:125: error: Unused "type: ignore" comment [unused-ignore]
- src/schemathesis/specs/openapi/negative/__init__.py:108: error: Unused "type: ignore" comment [unused-ignore]
- src/schemathesis/hooks.py: note: In function "register":
- src/schemathesis/hooks.py:86: error: Redundant cast to "str" [redundant-cast]
- src/schemathesis/hooks.py: note: In function "before_generate_path_parameters":
- src/schemathesis/hooks.py:267: error: Missing return statement [empty-body]
- src/schemathesis/hooks.py: note: In function "before_generate_headers":
- src/schemathesis/hooks.py:272: error: Missing return statement [empty-body]
- src/schemathesis/hooks.py: note: In function "before_generate_cookies":
- src/schemathesis/hooks.py:277: error: Missing return statement [empty-body]
- src/schemathesis/hooks.py: note: In function "before_generate_query":
- src/schemathesis/hooks.py:282: error: Missing return statement [empty-body]
- src/schemathesis/hooks.py: note: In function "before_generate_body":
- src/schemathesis/hooks.py:287: error: Missing return statement [empty-body]
- src/schemathesis/hooks.py: note: In function "before_generate_case":
- src/schemathesis/hooks.py:292: error: Missing return statement [empty-body]
- src/schemathesis/cli/options.py: note: In member "fail_on_invalid_options" of class "BaseCsvChoice":
- src/schemathesis/cli/options.py:29: error: Implicit return in function which does not return [misc]
- src/schemathesis/cli/options.py: note: At top level:
- src/schemathesis/cli/options.py:41: error: Unused "type: ignore" comment [unused-ignore]
- src/schemathesis/loaders.py:102: error: Unused "type: ignore" comment [unused-ignore]
- src/schemathesis/service/client.py:51: error: Unused "type: ignore" comment [unused-ignore]
- src/schemathesis/fixups/__init__.py:20: error: Unused "type: ignore" comment [unused-ignore]
- src/schemathesis/fixups/__init__.py:32: error: Unused "type: ignore" comment [unused-ignore]
- src/schemathesis/specs/openapi/references.py: note: In member "resolve" of class "InliningResolver":
- src/schemathesis/specs/openapi/references.py:72: error: Call to untyped function "resolve" in typed context [no-untyped-call]
- src/schemathesis/specs/openapi/references.py:74: error: "RefResolutionError" has no attribute "__notes__" [attr-defined]
- src/schemathesis/targets.py:76: error: Unused "type: ignore" comment [unused-ignore]
- src/schemathesis/transports/__init__.py:166: error: Unused "type: ignore" comment [unused-ignore]
- src/schemathesis/specs/openapi/loaders.py:245: error: Unused "type: ignore" comment [unused-ignore]
- src/schemathesis/specs/graphql/scalars.py: note: In function "get_extra_scalar_strategies":
- src/schemathesis/specs/graphql/scalars.py:41: error: Argument 1 to "map" of "SearchStrategy" has incompatible type "Optional[Any]"; expected "Callable[[str], Any]" [arg-type]
- src/schemathesis/specs/graphql/scalars.py:42: error: Argument 1 to "map" of "SearchStrategy" has incompatible type "Optional[Any]"; expected "Callable[[str], Any]" [arg-type]
- src/schemathesis/specs/graphql/scalars.py:43: error: Argument 1 to "map" of "SearchStrategy" has incompatible type "Optional[Any]"; expected "Callable[[str], Any]" [arg-type]
- src/schemathesis/specs/graphql/scalars.py:44: error: Argument 1 to "map" of "SearchStrategy" has incompatible type "Optional[Any]"; expected "Callable[[str], Any]" [arg-type]
- src/schemathesis/specs/graphql/scalars.py:45: error: Argument 1 to "map" of "SearchStrategy" has incompatible type "Optional[Any]"; expected "Callable[[str], Any]" [arg-type]
- src/schemathesis/specs/graphql/scalars.py:46: error: Argument 1 to "map" of "SearchStrategy" has incompatible type "Optional[Any]"; expected "Callable[[str], Any]" [arg-type]
- src/schemathesis/specs/graphql/scalars.py:47: error: Argument 1 to "map" of "SearchStrategy" has incompatible type "Optional[Any]"; expected "Callable[[int], Any]" [arg-type]
- src/schemathesis/specs/graphql/scalars.py:48: error: Argument 1 to "map" of "SearchStrategy" has incompatible type "Optional[Any]"; expected "Callable[[int], Any]" [arg-type]
- src/schemathesis/specs/graphql/scalars.py:49: error: Argument 1 to "map" of "SearchStrategy" has incompatible type "Optional[Any]"; expected "Callable[[str], Any]" [arg-type]
- src/schemathesis/specs/graphql/loaders.py:267: error: Unused "type: ignore" comment [unused-ignore]
- src/schemathesis/models.py:92: error: Unused "type: ignore" comment [unused-ignore]
- src/schemathesis/models.py:99: error: Unused "type: ignore" comment [unused-ignore]
- src/schemathesis/models.py:503: error: Unused "type: ignore" comment [unused-ignore]
- src/schemathesis/models.py:869: error: Unused "type: ignore" comment [unused-ignore]
- src/schemathesis/checks.py:76: error: Unused "type: ignore" comment [unused-ignore]
- src/schemathesis/stateful/context.py: note: In function "_failure_cache_key":
- src/schemathesis/stateful/context.py:28: error: Call to untyped function "get_trimmed_traceback" in typed context [no-untyped-call]
- src/schemathesis/_hypothesis.py:70: error: Unused "type: ignore" comment [unused-ignore]
- src/schemathesis/_hypothesis.py: note: In function "create_test":
- src/schemathesis/_hypothesis.py:90: error: "Callable[..., None]" has no attribute "_hypothesis_internal_use_settings" [attr-defined]
- src/schemathesis/_hypothesis.py:91: error: "Callable[..., None]" has no attribute "_hypothesis_internal_use_settings" [attr-defined]
- src/schemathesis/_hypothesis.py: note: At top level:
- src/schemathesis/_hypothesis.py:260: error: Unused "type: ignore" comment [unused-ignore]
- src/schemathesis/_hypothesis.py:261: error: Unused "type: ignore" comment [unused-ignore]
- src/schemathesis/service/extensions.py: note: In function "_strategy_from_definition":
- src/schemathesis/service/extensions.py:185: error: "SearchStrategy[Any]" not callable [operator]
- src/schemathesis/specs/openapi/security.py: note: In member "get_security_definitions" of class "OpenAPISecurityProcessor":
- src/schemathesis/specs/openapi/security.py:131: error: "RefResolver" has no attribute "_scopes_stack" [attr-defined]
- src/schemathesis/specs/openapi/security.py:139: error: Call to untyped function (unknown) in typed context [no-untyped-call]
- src/schemathesis/specs/openapi/security.py:141: error: Call to untyped function (unknown) in typed context [no-untyped-call]
- src/schemathesis/specs/openapi/security.py:145: error: "RefResolver" has no attribute "_scopes_stack" [attr-defined]
- src/schemathesis/specs/openapi/_hypothesis.py:111: error: Unused "type: ignore" comment [unused-ignore]
- src/schemathesis/specs/openapi/_hypothesis.py: note: In function "get_parameters_strategy":
- src/schemathesis/specs/openapi/_hypothesis.py:412: error: Argument 1 to "filter" of "SearchStrategy" has incompatible type "Callable[[Dict[str, Any]], bool]"; expected "Callable[[None], Any]" [arg-type]
- src/schemathesis/runner/__init__.py:94: error: Unused "type: ignore" comment [unused-ignore]
- src/schemathesis/runner/__init__.py: note: In function "prepare_hypothesis_settings":
- src/schemathesis/runner/__init__.py:572: error: Incompatible types in assignment (expression has type "None", target has type "Union[int, List[Phase], List[HealthCheck]]") [assignment]
- src/schemathesis/runner/__init__.py:577: error: Incompatible types in assignment (expression has type "None", target has type "Union[int, List[Phase], List[HealthCheck]]") [assignment]
- src/schemathesis/runner/__init__.py:579: error: Call to untyped function "InMemoryExampleDatabase" in typed context [no-untyped-call]
- src/schemathesis/runner/__init__.py:579: error: Incompatible types in assignment (expression has type "InMemoryExampleDatabase", target has type "Union[int, List[Phase], List[HealthCheck]]") [assignment]
- src/schemathesis/runner/__init__.py:581: error: Incompatible types in assignment (expression has type "DirectoryBasedExampleDatabase", target has type "Union[int, List[Phase], List[HealthCheck]]") [assignment]
- src/schemathesis/runner/__init__.py:581: error: Argument 1 to "DirectoryBasedExampleDatabase" has incompatible type "str"; expected "PathLike[Any]" [arg-type]
- src/schemathesis/runner/__init__.py:583: error: Argument 2 to "settings" has incompatible type "**Dict[str, Union[int, List[Phase], List[HealthCheck]]]"; expected "Optional[settings]" [arg-type]
- src/schemathesis/runner/__init__.py:583: error: Argument 2 to "settings" has incompatible type "**Dict[str, Union[int, List[Phase], List[HealthCheck]]]"; expected "int" [arg-type]
- src/schemathesis/runner/__init__.py:583: error: Argument 2 to "settings" has incompatible type "**Dict[str, Union[int, List[Phase], List[HealthCheck]]]"; expected "bool" [arg-type]
- src/schemathesis/runner/__init__.py:583: error: Argument 2 to "settings" has incompatible type "**Dict[str, Union[int, List[Phase], List[HealthCheck]]]"; expected "Optional[ExampleDatabase]" [arg-type]
- src/schemathesis/runner/__init__.py:583: error: Argument 2 to "settings" has incompatible type "**Dict[str, Union[int, List[Phase], List[HealthCheck]]]"; expected "Verbosity" [arg-type]
- src/schemathesis/runner/__init__.py:583: error: Argument 2 to "settings" has incompatible type "**Dict[str, Union[int, List[Phase], List[HealthCheck]]]"; expected "Collection[Phase]" [arg-type]
- src/schemathesis/runner/__init__.py:583: error: Argument 2 to "settings" has incompatible type "**Dict[str, Union[int, List[Phase], List[HealthCheck]]]"; expected "Collection[HealthCheck]" [arg-type]
- src/schemathesis/runner/__init__.py:583: error: Argument 2 to "settings" has incompatible type "**Dict[str, Union[int, List[Phase], List[HealthCheck]]]"; expected "Union[int, float, timedelta, None]" [arg-type]
- src/schemathesis/runner/__init__.py:583: error: Argument 2 to "settings" has incompatible type "**Dict[str, Union[int, List[Phase], List[HealthCheck]]]"; expected "str" [arg-type]
- src/schemathesis/stateful/state_machine.py:58: error: Unused "type: ignore" comment [unused-ignore]
- src/schemathesis/stateful/state_machine.py: note: In member "_to_test_case" of class "APIStateMachine":
- src/schemathesis/stateful/state_machine.py:70: error: Variable "hypothesis.stateful.RuleBasedStateMachine.TestCase" is not valid as a type [valid-type]
- src/schemathesis/stateful/state_machine.py:70: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases
- src/schemathesis/stateful/state_machine.py: note: In function "_to_test_case":
- src/schemathesis/stateful/state_machine.py:70: error: Invalid base class "RuleBasedStateMachine.TestCase" [misc]
- src/schemathesis/stateful/state_machine.py: note: In member "_add_result_to_targets" of class "APIStateMachine":
- src/schemathesis/stateful/state_machine.py:103: error: Call to untyped function "_add_result_to_targets" in typed context [no-untyped-call]
- src/schemathesis/stateful/__init__.py: note: In function "run_state_machine_as_test":
- src/schemathesis/stateful/__init__.py:143: error: Call to untyped function "run_state_machine_as_test" in typed context [no-untyped-call]
- src/schemathesis/schemas.py:411: error: Unused "type: ignore" comment [unused-ignore]
- src/schemathesis/schemas.py:413: error: Unused "type: ignore" comment [unused-ignore]
- src/schemathesis/schemas.py:422: error: Unused "type: ignore" comment [unused-ignore]
- src/schemathesis/specs/openapi/links.py: note: In function "add_link":
- src/schemathesis/specs/openapi/links.py:350: error: Call to untyped function "resolve" in typed context [no-untyped-call]
- src/schemathesis/cli/callbacks.py:14: error: Unused "type: ignore" comment [unused-ignore]
- src/schemathesis/cli/callbacks.py:128: error: Unused "type: ignore" comment [unused-ignore]
- src/schemathesis/lazy.py: note: In function "run_subtest":
- src/schemathesis/lazy.py:381: error: Call to untyped function "get_trimmed_traceback" in typed context [no-untyped-call]
- src/schemathesis/lazy.py:382: error: Call to untyped function "format_exception" in typed context [no-untyped-call]
- src/schemathesis/lazy.py:389: error: Item "None" of "Optional[TracebackType]" has no attribute "tb_next" [union-attr]
- src/schemathesis/lazy.py:391: error: Item "None" of "Union[TracebackType, Any, None]" has no attribute "tb_next" [union-attr]
- src/schemathesis/specs/openapi/stateful/__init__.py: note: In function "transition":
- src/schemathesis/specs/openapi/stateful/__init__.py:156: error: No overload variant of "rule" matches argument type "Dict[str, SearchStrategy[Any]]" [call-overload]
- src/schemathesis/specs/openapi/stateful/__init__.py:156: note: Possible overload variants:
- src/schemathesis/specs/openapi/stateful/__init__.py:156: note: def [Ex] rule(*, targets: Sequence[Bundle[Ex]], target: None = ..., **kwargs: SearchStrategy[Any]) -> Callable[[Callable[..., Union[MultipleResults[Ex], Ex]]], Callable[..., Union[MultipleResults[Ex], Ex]]]
- src/schemathesis/specs/openapi/stateful/__init__.py:156: note: def [Ex] rule(*, target: Bundle[Ex], targets: _OmittedArgument = ..., **kwargs: SearchStrategy[Any]) -> Callable[[Callable[..., Union[MultipleResults[Ex], Ex]]], Callable[..., Union[MultipleResults[Ex], Ex]]]
- src/schemathesis/specs/openapi/stateful/__init__.py:156: note: def rule(*, target: None = ..., targets: _OmittedArgument = ..., **kwargs: SearchStrategy[Any]) -> Callable[[Callable[..., None]], Callable[..., None]]
- src/schemathesis/specs/graphql/schemas.py:344: error: Unused "type: ignore" comment [unused-ignore]
- src/schemathesis/specs/graphql/schemas.py:368: error: Unused "type: ignore" comment [unused-ignore]
- src/schemathesis/specs/graphql/schemas.py:390: error: Unused "type: ignore" comment [unused-ignore]
- src/schemathesis/cli/output/default.py: note: In function "handle_initialized":
- src/schemathesis/cli/output/default.py:764: error: Call to untyped function "show_changed" in typed context [no-untyped-call]
- src/schemathesis/cli/__init__.py:550: error: Unused "type: ignore" comment [unused-ignore]
- src/schemathesis/cli/__init__.py: note: In function "run":
- src/schemathesis/cli/__init__.py:1116: error: Redundant cast to "str" [redundant-cast]
- src/schemathesis/specs/openapi/schemas.py: note: In member "validate_response" of class "BaseOpenAPISchema":
- src/schemathesis/specs/openapi/schemas.py:676: error: Argument "cls" to "validate" has incompatible type "Type[Validator]"; expected "Optional[Type[_Validator]]" [arg-type]
- src/schemathesis/specs/openapi/schemas.py: note: In member "_rewrite_references" of class "BaseOpenAPISchema":
- src/schemathesis/specs/openapi/schemas.py:764: error: "InliningResolver" has no attribute "_scopes_stack" [attr-defined]
- src/schemathesis/extra/pytest_plugin.py:65: error: Unused "type: ignore" comment [unused-ignore]
- src/schemathesis/extra/pytest_plugin.py:172: error: Unused "type: ignore" comment [unused-ignore]
- src/schemathesis/extra/pytest_plugin.py: note: In function "hypothesis_reporter":
- src/schemathesis/extra/pytest_plugin.py:245: error: Call to untyped function "default" in typed context [no-untyped-call]
- src/schemathesis/extra/pytest_plugin.py: note: At top level:
+ src/schemathesis/extra/pytest_plugin.py:15: note: ... from here:
- src/schemathesis/extra/pytest_plugin.py:303: error: Unused "type: ignore" comment [unused-ignore]
paasta (https://github.com/yelp/paasta)
- paasta_tools/cli/cli.py:177: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
- paasta_tools/utils.py:3425: error: Unexpected keyword argument "assert_hostname" for "kwargs_from_env" [call-arg]
- paasta_tools/utils.py:4097: error: Unused "type: ignore" comment [unused-ignore]
- paasta_tools/utils.py:4125: error: A function returning TypeVar should receive at least one argument containing the same TypeVar [type-var]
- paasta_tools/utils.py:4132: error: A function returning TypeVar should receive at least one argument containing the same TypeVar [type-var]
- paasta_tools/metrics/metrics_lib.py:188: error: Cannot instantiate abstract class "Counter" with abstract attribute "set" [abstract]
- paasta_tools/mesos/slave.py:112: error: Unused "type: ignore" comment [unused-ignore]
- paasta_tools/frameworks/task_store.py:127: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
- paasta_tools/mesos/master.py:303: error: Unused "type: ignore" comment [unused-ignore]
- paasta_tools/kubernetes_tools.py:1224: error: Unused "type: ignore" comment [unused-ignore]
- paasta_tools/kubernetes_tools.py:3912: error: Unused "type: ignore" comment [unused-ignore]
- paasta_tools/frameworks/native_scheduler.py:116: error: Unused "type: ignore" comment [unused-ignore]
- paasta_tools/api/settings.py:30: error: Unused "type: ignore" comment [unused-ignore]
- paasta_tools/metrics/metastatus_lib.py:617: error: Argument "key" to "sorted" has incompatible type "Callable[[Any], Sequence[Tuple[str, str]]]"; expected "Callable[[_SlaveT], Union[SupportsDunderLT[Any], SupportsDunderGT[Any]]]" [arg-type]
- paasta_tools/metrics/metastatus_lib.py:617: error: Argument "key" to "sorted" has incompatible type "Callable[[Any], Sequence[Tuple[str, str]]]"; expected "Callable[[Any], Union[SupportsDunderLT[Any], SupportsDunderGT[Any]]]" [arg-type]
- paasta_tools/cleanup_kubernetes_jobs.py:207: error: Unused "type: ignore" comment [unused-ignore]
- paasta_tools/secret_providers/vault.py:180: error: Item "Response" of "Union[Dict[str, Any], Response]" has no attribute "get" [union-attr]
- paasta_tools/secret_providers/vault.py:208: error: Module has no attribute "exceptions" [attr-defined]
- paasta_tools/cli/utils.py:399: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
- paasta_tools/cli/utils.py:1070: error: Unused "type: ignore" comment [unused-ignore]
- paasta_tools/instance/kubernetes.py:632: error: Unused "type: ignore" comment [unused-ignore]
- paasta_tools/instance/kubernetes.py:639: error: Argument 1 to "append" of "list" has incompatible type "Task[KubernetesAutoscalingStatusDict]"; expected "Future[Dict[str, Any]]" [arg-type]
- paasta_tools/instance/kubernetes.py:651: error: Argument 1 to "append" of "list" has incompatible type "Task[Sequence[Any]]"; expected "Future[Dict[str, Any]]" [arg-type]
- paasta_tools/instance/kubernetes.py:672: error: Argument 1 to "get_backends_from_mesh_status" has incompatible type "Task[Mapping[str, Any]]"; expected "Future[Dict[str, Any]]" [arg-type]
- paasta_tools/instance/kubernetes.py:674: error: List item 0 has incompatible type "Task[Mapping[str, Any]]"; expected "Future[Dict[str, Any]]" [list-item]
- paasta_tools/instance/kubernetes.py:674: error: List item 1 has incompatible type "Task[Set[str]]"; expected "Future[Dict[str, Any]]" [list-item]
- paasta_tools/instance/kubernetes.py:683: error: Argument 2 to "get_pod_status_tasks_by_sha_and_readiness" has incompatible type "Optional[Task[Set[str]]]"; expected "Future[Dict[str, Any]]" [arg-type]
- paasta_tools/instance/kubernetes.py:694: error: Argument "pod_status_by_sha_and_readiness_task" to "get_versions_for_controller_revisions" has incompatible type "Task[defaultdict[Tuple[str, str], defaultdict[bool, List[Future[Dict[str, Any]]]]]]"; expected "Future[Mapping[Tuple[str, str], Mapping[bool, Sequence[Future[Mapping[str, Any]]]]]]" [arg-type]
- paasta_tools/instance/kubernetes.py:697: error: List item 0 has incompatible type "Task[defaultdict[Tuple[str, str], defaultdict[bool, List[Future[Dict[str, Any]]]]]]"; expected "Future[Dict[str, Any]]" [list-item]
- paasta_tools/instance/kubernetes.py:697: error: List item 1 has incompatible type "Task[List[KubernetesVersionDict]]"; expected "Future[Dict[str, Any]]" [list-item]
- paasta_tools/instance/kubernetes.py:702: error: Argument 2 to "get_pod_status_tasks_by_replicaset" has incompatible type "Optional[Task[Set[str]]]"; expected "Future[Dict[str, Any]]" [arg-type]
- paasta_tools/instance/kubernetes.py:713: error: Argument "pod_status_by_replicaset_task" to "get_versions_for_replicasets" has incompatible type "Task[Dict[str, List[Future[Dict[str, Any]]]]]"; expected "Future[Mapping[str, Sequence[Future[Dict[str, Any]]]]]" [arg-type]
- paasta_tools/instance/kubernetes.py:716: error: List item 1 has incompatible type "Task[List[KubernetesVersionDict]]"; expected "Future[Dict[str, Any]]" [list-item]
- paasta_tools/instance/kubernetes.py:1154: error: Need type annotation for "pods_task" [var-annotated]
- paasta_tools/instance/kubernetes.py:1155: error: Argument 1 to "create_task" has incompatible type "Awaitable[Sequence[Any]]"; expected "Union[Generator[Any, None, Never], Coroutine[Any, Any, Never]]" [arg-type]
- paasta_tools/instance/kubernetes.py:1198: error: Unused "type: ignore" comment [unused-ignore]
- paasta_tools/instance/kubernetes.py:1330: error: Need type annotation for "pods_task" [var-annotated]
- paasta_tools/instance/kubernetes.py:1331: error: Argument 1 to "create_task" has incompatible type "Awaitable[Sequence[Any]]"; expected "Union[Generator[Any, None, Never], Coroutine[Any, Any, Never]]" [arg-type]
- paasta_tools/cli/cmds/status.py:911: error: Unused "type: ignore" comment [unused-ignore]
- paasta_tools/cli/cmds/get_image_version.py:57: error: Unused "type: ignore" comment [unused-ignore]
- paasta_tools/cli/cmds/mark_for_deployment.py:153: error: Unused "type: ignore" comment [unused-ignore]
- paasta_tools/cli/cmds/mark_for_deployment.py:161: error: Unused "type: ignore" comment [unused-ignore]
- paasta_tools/api/views/instance.py:146: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
- paasta_tools/api/views/instance.py:351: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
- paasta_tools/cli/cmds/spark_run.py:785: error: Unused "type: ignore" comment [unused-ignore]
- paasta_tools/cli/cmds/spark_run.py:795: error: Unused "type: ignore" comment [unused-ignore]
- paasta_tools/cli/cmds/rollback.py:79: error: Unused "type: ignore" comment [unused-ignore]
- paasta_tools/cli/cmds/rollback.py:89: error: Unused "type: ignore" comment [unused-ignore]
- paasta_tools/cli/cmds/rollback.py:100: error: Unused "type: ignore" comment [unused-ignore]
- paasta_tools/cli/cmds/rollback.py:112: error: Unused "type: ignore" comment [unused-ignore]
- paasta_tools/cli/cmds/local_run.py:856: error: Unused "type: ignore" comment [unused-ignore]
- paasta_tools/cli/cmds/local_run.py:964: error: Argument 1 to "write" of "TextIOBase" has incompatible type "Union[str, bytes]"; expected "str" [arg-type]
- paasta_tools/cli/cmds/local_run.py:969: error: Argument 1 to "write" of "BufferedWriter" has incompatible type "Union[str, bytes]"; expected "Buffer" [arg-type]
cki-lib (https://gitlab.com/cki-project/cki-lib)
- cki_lib/metrics/server.py:8: error: Function is missing a type annotation for one or more arguments [no-untyped-def]
- cki_lib/metrics/server.py:22: error: No return value expected [return-value]
- cki_lib/timer.py:13: error: Function is missing a type annotation [no-untyped-def]
- cki_lib/timer.py:29: error: Function is missing a return type annotation [no-untyped-def]
- cki_lib/timer.py:29: note: Use "-> None" if function does not return a value
- cki_lib/timer.py:33: error: Function is missing a return type annotation [no-untyped-def]
- cki_lib/timer.py:33: note: Use "-> None" if function does not return a value
- cki_lib/timer.py:39: error: Call to untyped function "cancel" in typed context [no-untyped-call]
- cki_lib/timer.py:44: error: Function is missing a return type annotation [no-untyped-def]
- cki_lib/timer.py:44: note: Use "-> None" if function does not return a value
- cki_lib/s3bucket.py:18: error: Function is missing a type annotation for one or more arguments [no-untyped-def]
- cki_lib/s3bucket.py:36: error: Function is missing a type annotation [no-untyped-def]
- cki_lib/s3bucket.py:57: error: Item "None" of "Any | None" has no attribute "get_credentials" [union-attr]
- cki_lib/s3bucket.py:76: error: Incompatible types in assignment (expression has type "ParseResult", variable has type "str") [assignment]
- cki_lib/s3bucket.py:77: error: "str" has no attribute "scheme" [attr-defined]
- cki_lib/s3bucket.py:77: error: "str" has no attribute "netloc" [attr-defined]
- cki_lib/s3bucket.py:78: error: "str" has no attribute "path" [attr-defined]
- cki_lib/s3bucket.py:83: error: Function is missing a return type annotation [no-untyped-def]
- cki_lib/retrying.py:7: error: Function is missing a type annotation [no-untyped-def]
- cki_lib/retrying.py:21: error: Function is missing a type annotation [no-untyped-def]
- cki_lib/retrying.py:22: error: Function is missing a type annotation [no-untyped-def]
- cki_lib/retrying.py:23: error: "Callable[[VarArg(Any), KwArg(Any)], Any]" has no attribute "failed_count" [attr-defined]
- cki_lib/retrying.py:24: error: "Callable[[VarArg(Any), KwArg(Any)], Any]" has no attribute "retries" [attr-defined]
- cki_lib/retrying.py:33: error: "Callable[[VarArg(Any), KwArg(Any)], Any]" has no attribute "failed_count" [attr-defined]
- cki_lib/retrying.py:35: error: "Callable[[VarArg(Any), KwArg(Any)], Any]" has no attribute "failed_count" [attr-defined]
- tests/cki_pipeline/mocks.py:12: error: Function is missing a type annotation [no-untyped-def]
- tests/cki_pipeline/mocks.py:35: error: Function is missing a type annotation [no-untyped-def]
- tests/cki_pipeline/mocks.py:47: error: Function is missing a type annotation [no-untyped-def]
- tests/cki_pipeline/mocks.py:62: error: Function is missing a type annotation [no-untyped-def]
- tests/cki_pipeline/mocks.py:76: error: Function is missing a type annotation [no-untyped-def]
- cki_lib/timeout.py:10: error: Function is missing a type annotation [no-untyped-def]
- cki_lib/timeout.py:13: error: Function is missing a type annotation [no-untyped-def]
- cki_lib/timeout.py:17: error: Function is missing a type annotation [no-untyped-def]
- cki_lib/timeout.py:32: error: Function is missing a type annotation [no-untyped-def]
- cki_lib/timeout.py:34: error: Call to untyped function "timeout" in typed context [no-untyped-call]
- cki_lib/psql.py:14: error: Function is missing a type annotation [no-untyped-def]
- cki_lib/psql.py:43: error: Function is missing a return type annotation [no-untyped-def]
- cki_lib/psql.py:59: error: Function is missing a type annotation [no-untyped-def]
- cki_lib/psql.py:64: error: Function is missing a type annotation [no-untyped-def]
- cki_lib/psql.py:67: error: Call to untyped function "_execute" in typed context [no-untyped-call]
- cki_lib/psql.py:71: error: Call to untyped function "_execute" in typed context [no-untyped-call]
- cki_lib/pool.py:10: error: Function is missing a return type annotation [no-untyped-def]
- cki_lib/pool.py:15: error: Function is missing a type annotation [no-untyped-def]
- cki_lib/pool.py:19: error: Unsupported dynamic base class "type" [misc]
- cki_lib/pool.py:30: error: Function is missing a type annotation [no-untyped-def]
- cki_lib/logger.py:118: error: Incompatible types in assignment (expression has type "StreamHandler[TextIO | Any]", variable has type "WatchedFileHandler") [assignment]
- tests/test_timer.py:12: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_timer.py:12: note: Use "-> None" if function does not return a value
- tests/test_timer.py:15: error: Call to untyped function "ScheduledTask" in typed context [no-untyped-call]
- tests/test_timer.py:16: error: Call to untyped function "start" in typed context [no-untyped-call]
- tests/test_timer.py:20: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_timer.py:20: note: Use "-> None" if function does not return a value
- tests/test_timer.py:28: error: Call to untyped function "ScheduledTask" in typed context [no-untyped-call]
- tests/test_timer.py:31: error: Call to untyped function "start" in typed context [no-untyped-call]
- tests/test_timer.py:35: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_timer.py:35: note: Use "-> None" if function does not return a value
- tests/test_timer.py:38: error: Call to untyped function "ScheduledTask" in typed context [no-untyped-call]
- tests/test_timer.py:39: error: Call to untyped function "start" in typed context [no-untyped-call]
- tests/test_timer.py:43: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_timer.py:43: note: Use "-> None" if function does not return a value
- tests/test_timer.py:46: error: Call to untyped function "ScheduledTask" in typed context [no-untyped-call]
- tests/test_timer.py:47: error: Call to untyped function "start" in typed context [no-untyped-call]
- tests/test_timer.py:48: error: Call to untyped function "cancel" in typed context [no-untyped-call]
- tests/test_timeout.py:13: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_timeout.py:13: note: Use "-> None" if function does not return a value
- tests/test_timeout.py:15: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_timeout.py:15: note: Use "-> None" if function does not return a value
- tests/test_timeout.py:19: error: Call to untyped function "func_timeout" in typed context [no-untyped-call]
- tests/test_timeout.py:21: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_timeout.py:21: note: Use "-> None" if function does not return a value
- tests/test_timeout.py:24: error: Call to untyped function "timeout" in typed context [no-untyped-call]
- tests/test_timeout.py:25: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_timeout.py:25: note: Use "-> None" if function does not return a value
- tests/test_session.py:20: error: Function is missing a type annotation [no-untyped-def]
- tests/test_session.py:28: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_session.py:28: note: Use "-> None" if function does not return a value
- tests/test_session.py:34: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_session.py:34: note: Use "-> None" if function does not return a value
- tests/test_session.py:41: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_session.py:41: note: Use "-> None" if function does not return a value
- tests/test_session.py:48: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_session.py:48: note: Use "-> None" if function does not return a value
- tests/test_session.py:55: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_session.py:55: note: Use "-> None" if function does not return a value
- tests/test_session.py:62: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_session.py:62: note: Use "-> None" if function does not return a value
- tests/test_session.py:69: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_session.py:69: note: Use "-> None" if function does not return a value
- tests/test_session.py:76: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_session.py:76: note: Use "-> None" if function does not return a value
- tests/test_session.py:84: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_session.py:84: note: Use "-> None" if function does not return a value
- tests/test_session.py:93: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_session.py:93: note: Use "-> None" if function does not return a value
- tests/test_session.py:101: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_session.py:101: note: Use "-> None" if function does not return a value
- tests/test_session.py:109: error: Function is missing a type annotation [no-untyped-def]
- tests/test_session.py:124: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_session.py:124: note: Use "-> None" if function does not return a value
- tests/test_session.py:136: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_session.py:136: note: Use "-> None" if function does not return a value
- tests/test_session.py:138: error: Need type annotation for "cases" [var-annotated]
- tests/test_session.py:148: error: "PreparedRequest" has no attribute "req_kwargs" [attr-defined]
- tests/test_session.py:152: error: Function is missing a type annotation [no-untyped-def]
- tests/test_session.py:168: error: Function is missing a type annotation [no-untyped-def]
- tests/test_session.py:182: error: Untyped decorator makes function "test_headers" untyped [misc]
- tests/test_session.py:185: error: Need type annotation for "cases" [var-annotated]
- tests/test_s3bucket.py:14: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_s3bucket.py:14: note: Use "-> None" if function does not return a value
- tests/test_s3bucket.py:24: error: Function is missing a type annotation [no-untyped-def]
- tests/test_s3bucket.py:32: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_s3bucket.py:32: note: Use "-> None" if function does not return a value
- tests/test_s3bucket.py:37: error: Function is missing a type annotation [no-untyped-def]
- tests/test_s3bucket.py:45: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_s3bucket.py:45: note: Use "-> None" if function does not return a value
- tests/test_s3bucket.py:53: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_s3bucket.py:53: note: Use "-> None" if function does not return a value
- tests/test_s3bucket.py:61: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_s3bucket.py:61: note: Use "-> None" if function does not return a value
- tests/test_s3bucket.py:67: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_s3bucket.py:67: note: Use "-> None" if function does not return a value
- tests/test_s3bucket.py:75: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_s3bucket.py:75: note: Use "-> None" if function does not return a value
- tests/test_s3bucket.py:84: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_s3bucket.py:84: note: Use "-> None" if function does not return a value
- tests/test_s3bucket.py:93: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_s3bucket.py:93: note: Use "-> None" if function does not return a value
- tests/test_s3bucket.py:107: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_s3bucket.py:107: note: Use "-> None" if function does not return a value
- tests/test_s3bucket.py:118: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_s3bucket.py:118: note: Use "-> None" if function does not return a value
- tests/test_s3bucket.py:129: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_s3bucket.py:129: note: Use "-> None" if function does not return a value
- tests/test_retrying.py:8: error: Function is missing a type annotation [no-untyped-def]
- tests/test_retrying.py:16: error: Function is missing a type annotation [no-untyped-def]
- tests/test_retrying.py:25: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_retrying.py:25: note: Use "-> None" if function does not return a value
- tests/test_retrying.py:28: error: Call to untyped function "retrying_on_exception" in typed context [no-untyped-call]
- tests/test_retrying.py:34: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_retrying.py:34: note: Use "-> None" if function does not return a value
- tests/test_retrying.py:37: error: Call to untyped function "retrying_on_exception" in typed context [no-untyped-call]
- tests/test_psql.py:18: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_psql.py:18: note: Use "-> None" if function does not return a value
- tests/test_psql.py:29: error: Call to untyped function "PSQLHandler" in typed context [no-untyped-call]
- tests/test_psql.py:35: error: Function is missing a type annotation [no-untyped-def]
- tests/test_psql.py:38: error: Call to untyped function "PSQLHandler" in typed context [no-untyped-call]
- tests/test_psql.py:45: error: Function is missing a type annotation [no-untyped-def]
- tests/test_psql.py:48: error: Call to untyped function "PSQLHandler" in typed context [no-untyped-call]
- tests/test_psql.py:55: error: Function is missing a type annotation [no-untyped-def]
- tests/test_psql.py:60: error: Call to untyped function "PSQLHandler" in typed context [no-untyped-call]
- tests/test_psql.py:66: error: Function is missing a type annotation [no-untyped-def]
- tests/test_psql.py:71: error: Call to untyped function "PSQLHandler" in typed context [no-untyped-call]
- tests/test_psql.py:79: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_psql.py:79: note: Use "-> None" if function does not return a value
- tests/test_psql.py:81: error: Call to untyped function "PSQLHandler" in typed context [no-untyped-call]
- tests/test_psql.py:85: error: Call to untyped function "execute" in typed context [no-untyped-call]
- tests/test_psql.py:95: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_psql.py:95: note: Use "-> None" if function does not return a value
- tests/test_psql.py:97: error: Call to untyped function "PSQLHandler" in typed context [no-untyped-call]
- tests/test_psql.py:98: error: Cannot assign to a method [method-assign]
- tests/test_pool.py:7: error: Function is missing a type annotation [no-untyped-def]
- tests/test_pool.py:15: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_pool.py:15: note: Use "-> None" if function does not return a value
- tests/test_pool.py:18: error: Call to untyped function "NonDaemonicPool" in typed context [no-untyped-call]
- tests/test_pool.py:22: error: "NonDaemonicPool" has no attribute "_ctx" [attr-defined]
- tests/test_logger.py:21: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_logger.py:21: note: Use "-> None" if function does not return a value
- tests/test_logger.py:26: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_logger.py:26: note: Use "-> None" if function does not return a value
- tests/test_logger.py:43: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_logger.py:43: note: Use "-> None" if function does not return a value
- tests/test_logger.py:49: error: "type[TestLoggerPatched]" has no attribute "mock_stderr" [attr-defined]
- tests/test_logger.py:51: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_logger.py:51: note: Use "-> None" if function does not return a value
- tests/test_logger.py:54: error: Call to untyped function "reset_logger" of "TestLoggerPatched" in typed context [no-untyped-call]
- tests/test_logger.py:56: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_logger.py:56: note: Use "-> None" if function does not return a value
- tests/test_logger.py:60: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_logger.py:60: note: Use "-> None" if function does not return a value
- tests/test_logger.py:74: error: "TestLoggerPatched" has no attribute "mock_stderr" [attr-defined]
- tests/test_logger.py:75: error: "TestLoggerPatched" has no attribute "mock_stderr" [attr-defined]
- tests/test_logger.py:77: error: "TestLoggerPatched" has no attribute "mock_stderr" [attr-defined]
- tests/test_logger.py:78: error: "TestLoggerPatched" has no attribute "mock_stderr" [attr-defined]
- tests/test_logger.py:82: error: "TestLoggerPatched" has no attribute "mock_stderr" [attr-defined]
- tests/test_logger.py:83: error: "TestLoggerPatched" has no attribute "mock_stderr" [attr-defined]
- tests/test_logger.py:88: error: "TestLoggerPatched" has no attribute "mock_stderr" [attr-defined]
- tests/test_logger.py:90: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_logger.py:90: note: Use "-> None" if function does not return a value
- tests/test_logger.py:96: error: "TestLoggerPatched" has no attribute "mock_stderr" [attr-defined]
- tests/test_logger.py:99: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_logger.py:99: note: Use "-> None" if function does not return a value
- tests/test_logger.py:105: error: "TestLoggerPatched" has no attribute "mock_stderr" [attr-defined]
- tests/test_logger.py:106: error: "TestLoggerPatched" has no attribute "mock_stderr" [attr-defined]
- tests/test_logger.py:108: error: "TestLoggerPatched" has no attribute "mock_stderr" [attr-defined]
- tests/test_logger.py:111: error: Call to untyped function "reset_logger" of "TestLoggerPatched" in typed context [no-untyped-call]
- tests/test_logger.py:116: error: "TestLoggerPatched" has no attribute "mock_stderr" [attr-defined]
- tests/test_logger.py:119: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_logger.py:119: note: Use "-> None" if function does not return a value
- tests/test_logger.py:129: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_logger.py:129: note: Use "-> None" if function does not return a value
- tests/test_logger.py:159: error: "TestLoggerPatched" has no attribute "mock_stderr" [attr-defined]
- tests/test_logger.py:168: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_logger.py:168: note: Use "-> None" if function does not return a value
- tests/test_logger.py:189: error: "TestLoggerPatched" has no attribute "mock_stderr" [attr-defined]
- tests/test_logger.py:194: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_logger.py:194: note: Use "-> None" if function does not return a value
- tests/test_logger.py:215: error: "TestLoggerPatched" has no attribute "mock_stderr" [attr-defined]
- tests/test_logger.py:234: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_logger.py:234: note: Use "-> None" if function does not return a value
- cki_lib/misc.py:42: error: Function is missing a type annotation [no-untyped-def]
- cki_lib/misc.py:123: error: Function is missing a type annotation [no-untyped-def]
- cki_lib/misc.py:139: error: Function is missing a type annotation [no-untyped-def]
- cki_lib/misc.py:223: error: Function is missing a type annotation [no-untyped-def]
- cki_lib/misc.py:240: error: Function is missing a type annotation [no-untyped-def]
- cki_lib/misc.py:255: error: Function is missing a type annotation [no-untyped-def]
- cki_lib/misc.py:280: error: Function is missing a type annotation [no-untyped-def]
- cki_lib/misc.py:294: error: Call to untyped function "retrying_on_exception" in typed context [no-untyped-call]
- cki_lib/misc.py:295: error: Function is missing a type annotation [no-untyped-def]
- cki_lib/misc.py:318: error: Call to untyped function "safe_popen" in typed context [no-untyped-call]
- cki_lib/misc.py:337: error: Function is missing a type annotation [no-untyped-def]
- cki_lib/misc.py:348: error: Function is missing a type annotation [no-untyped-def]
- cki_lib/misc.py:371: error: Function is missing a return type annotation [no-untyped-def]
- cki_lib/misc.py:371: note: Use "-> None" if function does not return a value
- cki_lib/misc.py:406: error: Function is missing a return type annotation [no-untyped-def]
- cki_lib/misc.py:411: error: Function is missing a type annotation [no-untyped-def]
- cki_lib/config_tree.py:30: error: Need type annotation for "extend" [var-annotated]
- cki_lib/yaml.py:91: error: Need type annotation for "include" [var-annotated]
- cki_lib/yaml.py:152: error: Incompatible default for argument "validation_error" (default has type "None", argument has type "ValidationError") [assignment]
- cki_lib/yaml.py:152: note: PEP 484 prohibits implicit Optional. Accordingly, mypy has changed its default to no_implicit_optional=True
- cki_lib/yaml.py:152: note: Use https://github.com/hauntsaninja/no_implicit_optional to automatically upgrade your codebase
- cki_lib/yaml.py:174: error: "ValidationError" has no attribute "_type_checker" [attr-defined]
- cki_lib/yaml.py:180: error: Missing type parameters for generic type "typing.Dict" [type-arg]
- cki_lib/yaml.py:180: error: Missing type parameters for generic type "typing.List" [type-arg]
- cki_lib/yaml.py:300: error: Call to untyped function "sentry_init" in typed context [no-untyped-call]
- cki_lib/kcidb/validate.py:35: error: Argument "contents" to "load" has incompatible type "bytes | None"; expected "str | None" [arg-type]
- cki_lib/kcidb/validate.py:63: error: Function is missing a type annotation for one or more arguments [no-untyped-def]
- cki_lib/kcidb/validate.py:92: error: Function is missing a type annotation [no-untyped-def]
- cki_lib/kcidb/validate.py:101: error: Function is missing a type annotation [no-untyped-def]
- cki_lib/kcidb/validate.py:128: error: Function is missing a type annotation [no-untyped-def]
- cki_lib/kcidb/validate.py:137: error: Call to untyped function "_validate_kcidb" in typed context [no-untyped-call]
- cki_lib/kcidb/validate.py:138: error: Call to untyped function "_validate_origins" in typed context [no-untyped-call]
- cki_lib/kcidb/validate.py:141: error: Function is missing a type annotation [no-untyped-def]
- cki_lib/kcidb/validate.py:151: error: Function is missing a type annotation [no-untyped-def]
- cki_lib/kcidb/validate.py:155: error: Call to untyped function "_validate_kcidb" in typed context [no-untyped-call]
- cki_lib/kcidb/validate.py:156: error: Call to untyped function "_validate_origins" in typed context [no-untyped-call]
- cki_lib/kcidb/validate.py:158: error: Call to untyped function "_validate_cki_schema" in typed context [no-untyped-call]
- cki_lib/kcidb/validate.py:167: error: Function is missing a type annotation [no-untyped-def]
- cki_lib/kcidb/validate.py:177: error: Call to untyped function "validate_extended_kcidb_schema" in typed context [no-untyped-call]
- cki_lib/kcidb/validate.py:180: error: Function is missing a type annotation [no-untyped-def]
- cki_lib/kcidb/validate.py:187: error: Call to untyped function "validate_extended_kcidb_schema" in typed context [no-untyped-call]
- cki_lib/kcidb/validate.py:191: error: Call to untyped function "main" in typed context [no-untyped-call]
- tests/test_yaml.py:51: error: Argument "file_path" to "load" has incompatible type "Traversable"; expected "Path | str | None" [arg-type]
- tests/test_yaml.py:62: error: "object" has no attribute "__enter__" [attr-defined]
- tests/test_yaml.py:62: error: "object" has no attribute "__exit__" [attr-defined]
- tests/test_yaml.py:63: error: Argument "file_path" to "load" has incompatible type "Traversable"; expected "Path | str | None" [arg-type]
- tests/test_yaml.py:64: error: Argument "schema_path" to "load" has incompatible type "Traversable"; expected "Path | str | None" [arg-type]
- tests/test_yaml.py:74: error: "object" has no attribute "__enter__" [attr-defined]
- tests/test_yaml.py:74: error: "object" has no attribute "__exit__" [attr-defined]
- tests/test_yaml.py:75: error: Argument "file_path" to "load" has incompatible type "Traversable"; expected "Path | str | None" [arg-type]
- tests/test_yaml.py:76: error: Argument "schema_path" to "load" has incompatible type "Traversable"; expected "Path | str | None" [arg-type]
- tests/test_yaml.py:116: error: Untyped decorator makes function "test_include_url" untyped [misc]
- tests/test_yaml.py:150: error: Argument 1 to "validate" has incompatible type "str | int"; expected "dict[Any, Any] | list[Any] | str" [arg-type]
- tests/test_yaml.py:167: error: Need type annotation for "cases" [var-annotated]
- tests/test_yaml.py:187: error: Argument 1 to "redirect_stdin" of "TestYaml" has incompatible type "str | None"; expected "str" [arg-type]
- tests/test_yaml.py:191: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_yaml.py:191: note: Use "-> None" if function does not return a value
- tests/test_misc.py:20: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_misc.py:20: note: Use "-> None" if function does not return a value
- tests/test_misc.py:27: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_misc.py:27: note: Use "-> None" if function does not return a value
- tests/test_misc.py:31: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_misc.py:31: note: Use "-> None" if function does not return a value
- tests/test_misc.py:35: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_misc.py:35: note: Use "-> None" if function does not return a value
- tests/test_misc.py:37: error: Need type annotation for "cases" [var-annotated]
- tests/test_misc.py:51: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_misc.py:51: note: Use "-> None" if function does not return a value
- tests/test_misc.py:72: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_misc.py:72: note: Use "-> None" if function does not return a value
- tests/test_misc.py:87: error: Argument 1 to "set_nested_key" has incompatible type "object"; expected "dict[str, Any] | list[Any]" [arg-type]
- tests/test_misc.py:89: error: Argument 1 to "set_nested_key" has incompatible type "object"; expected "dict[str, Any] | list[Any]" [arg-type]
- tests/test_misc.py:92: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_misc.py:92: note: Use "-> None" if function does not return a value
- tests/test_misc.py:114: error: Call to untyped function "append_to_nested_list" in typed context [no-untyped-call]
- tests/test_misc.py:115: error: Argument 2 to "assertDictEqual" of "TestCase" has incompatible type "object"; expected "Mapping[Any, object]" [arg-type]
- tests/test_misc.py:117: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_misc.py:117: note: Use "-> None" if function does not return a value
- tests/test_misc.py:141: error: Call to untyped function "append_to_nested_list" in typed context [no-untyped-call]
- tests/test_misc.py:142: error: Argument 1 to "assertDictEqual" of "TestCase" has incompatible type "object"; expected "Mapping[Any, object]" [arg-type]
- tests/test_misc.py:142: error: Argument 2 to "assertDictEqual" of "TestCase" has incompatible type "object"; expected "Mapping[Any, object]" [arg-type]
- tests/test_misc.py:144: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_misc.py:144: note: Use "-> None" if function does not return a value
- tests/test_misc.py:148: error: Call to untyped function "append_to_nested_list" in typed context [no-untyped-call]
- tests/test_misc.py:150: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_misc.py:150: note: Use "-> None" if function does not return a value
- tests/test_misc.py:153: error: Call to untyped function "get_env_var_or_raise" in typed context [no-untyped-call]
- tests/test_misc.py:162: error: Invalid index type "str | None" for "_Environ[str]"; expected type "str" [index]
- tests/test_misc.py:162: error: Call to untyped function "get_env_var_or_raise" in typed context [no-untyped-call]
- tests/test_misc.py:164: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_misc.py:164: note: Use "-> None" if function does not return a value
- tests/test_misc.py:173: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_misc.py:173: note: Use "-> None" if function does not return a value
- tests/test_misc.py:181: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_misc.py:184: error: Function is missing a type annotation [no-untyped-def]
- tests/test_misc.py:186: error: "Callable[[VarArg(Any), KwArg(Any)], Any]" has no attribute "communicate" [attr-defined]
- tests/test_misc.py:188: error: "Callable[[VarArg(Any), KwArg(Any)], Any]" has no attribute "returncode" [attr-defined]
- tests/test_misc.py:189: error: "Callable[[VarArg(Any), KwArg(Any)], Any]" has no attribute "called" [attr-defined]
- tests/test_misc.py:193: error: Call to untyped function "safe_popen" in typed context [no-untyped-call]
- tests/test_misc.py:202: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_misc.py:205: error: Function is missing a type annotation [no-untyped-def]
- tests/test_misc.py:220: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_misc.py:220: note: Use "-> None" if function does not return a value
- tests/test_misc.py:226: error: Call to untyped function "read_stream" in typed context [no-untyped-call]
- tests/test_misc.py:231: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_misc.py:231: note: Use "-> None" if function does not return a value
- tests/test_misc.py:233: error: Call to untyped function "utc_now_iso" in typed context [no-untyped-call]
- tests/test_misc.py:235: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_misc.py:235: note: Use "-> None" if function does not return a value
- tests/test_misc.py:246: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_misc.py:246: note: Use "-> None" if function does not return a value
- tests/test_misc.py:262: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_misc.py:262: note: Use "-> None" if function does not return a value
- tests/test_misc.py:273: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_misc.py:273: note: Use "-> None" if function does not return a value
- tests/test_misc.py:282: error: Call to untyped function "key_value_list_to_dict" in typed context [no-untyped-call]
- tests/test_misc.py:318: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_misc.py:318: note: Use "-> None" if function does not return a value
- tests/test_misc.py:321: error: Argument 1 to "booltostr" has incompatible type "None"; expected "bool" [arg-type]
- tests/test_misc.py:322: error: Argument 1 to "booltostr" has incompatible type "str"; expected "bool" [arg-type]
- tests/test_misc.py:323: error: Argument 1 to "booltostr" has incompatible type "list[Never]"; expected "bool" [arg-type]
- tests/test_misc.py:325: error: Argument 1 to "booltostr" has incompatible type "str"; expected "bool" [arg-type]
- tests/test_misc.py:326: error: Argument 1 to "booltostr" has incompatible type "list[str]"; expected "bool" [arg-type]
- tests/test_misc.py:328: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_misc.py:328: note: Use "-> None" if function does not return a value
- tests/test_misc.py:342: error: Function is missing a type annotation [no-untyped-def]
- tests/test_misc.py:346: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_misc.py:346: note: Use "-> None" if function does not return a value
- tests/test_misc.py:348: error: Call to untyped function "_test" of "TestBoolEnv" in typed context [no-untyped-call]
- tests/test_misc.py:351: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_misc.py:351: note: Use "-> None" if function does not return a value
- tests/test_misc.py:353: error: Call to untyped function "_test" of "TestBoolEnv" in typed context [no-untyped-call]
- tests/test_misc.py:356: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_misc.py:356: note: Use "-> None" if function does not return a value
- tests/test_misc.py:358: error: Call to untyped function "_test" of "TestBoolEnv" in typed context [no-untyped-call]
- tests/test_misc.py:361: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_misc.py:361: note: Use "-> None" if function does not return a value
- tests/test_misc.py:363: error: Call to untyped function "_test" of "TestBoolEnv" in typed context [no-untyped-call]
- tests/test_misc.py:366: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_misc.py:366: note: Use "-> None" if function does not return a value
- tests/test_misc.py:368: error: Call to untyped function "_test" of "TestBoolEnv" in typed context [no-untyped-call]
- tests/test_misc.py:371: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_misc.py:371: note: Use "-> None" if function does not return a value
- tests/test_misc.py:373: error: Call to untyped function "_test" of "TestBoolEnv" in typed context [no-untyped-call]
- tests/test_misc.py:376: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_misc.py:379: error: Call to untyped function "_test" of "TestBoolEnv" in typed context [no-untyped-call]
- tests/test_misc.py:385: error: Function is missing a type annotation [no-untyped-def]
- tests/test_misc.py:389: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_misc.py:389: note: Use "-> None" if function does not return a value
- tests/test_misc.py:391: error: Call to untyped function "_test" of "TestIntEnv" in typed context [no-untyped-call]
- tests/test_misc.py:393: error: Function is missing a return type annotation [no-untyped-def]
- tests/test_misc.py:393: note: Use "-> None" if function does not return a value
- tests/test_misc.py:395:
... (truncated 3235 lines) ...
Diff from mypy_primer, showing the effect of this PR on open source code:
schemathesis (https://github.com/schemathesis/schemathesis)
+ src/schemathesis/specs/openapi/schemas.py: note: In member "validator_cls" of class "BaseOpenAPISchema":
+ src/schemathesis/specs/openapi/schemas.py:628: error: Incompatible return value type (got "Type[Draft202012Validator]", expected "Type[Validator]") [return-value]
+ src/schemathesis/specs/openapi/schemas.py:629: error: Incompatible return value type (got "Type[Draft4Validator]", expected "Type[Validator]") [return-value]
Diff from mypy_primer, showing the effect of this PR on open source code:
schemathesis (https://github.com/schemathesis/schemathesis)
+ src/schemathesis/specs/openapi/schemas.py: note: In member "validator_cls" of class "BaseOpenAPISchema":
+ src/schemathesis/specs/openapi/schemas.py:628: error: Incompatible return value type (got "Type[Draft202012Validator]", expected "Type[Validator]") [return-value]
+ src/schemathesis/specs/openapi/schemas.py:629: error: Incompatible return value type (got "Type[Draft4Validator]", expected "Type[Validator]") [return-value]
Diff from mypy_primer, showing the effect of this PR on open source code:
schemathesis (https://github.com/schemathesis/schemathesis)
+ src/schemathesis/specs/openapi/schemas.py: note: In member "validator_cls" of class "BaseOpenAPISchema":
+ src/schemathesis/specs/openapi/schemas.py:647: error: Incompatible return value type (got "Type[Draft202012Validator]", expected "Type[Validator]") [return-value]
+ src/schemathesis/specs/openapi/schemas.py:648: error: Incompatible return value type (got "Type[Draft4Validator]", expected "Type[Validator]") [return-value]
Diff from mypy_primer, showing the effect of this PR on open source code:
schemathesis (https://github.com/schemathesis/schemathesis) + src/schemathesis/specs/openapi/schemas.py: note: In member "validator_cls" of class "BaseOpenAPISchema": + src/schemathesis/specs/openapi/schemas.py:647: error: Incompatible return value type (got "Type[Draft202012Validator]", expected "Type[Validator]") [return-value] + src/schemathesis/specs/openapi/schemas.py:648: error: Incompatible return value type (got "Type[Draft4Validator]", expected "Type[Validator]") [return-value]
I've started looking into this but truly, typing jsonschema seems more and more like a can of worms that I don't have the time to dig into. I'm afraid to go forward with this PR if it risks creating more problems for others users.
For now, I'll just live with my mypy ignore comment and hope for progress in https://github.com/python-jsonschema/jsonschema/pull/1027