Conversation
for more information, see https://pre-commit.ci
|
Diff from mypy_primer, showing the effect of this PR on open source code: core (https://github.com/home-assistant/core)
- Warning: unused section(s) in mypy.ini: [mypy-tests.*]
+ .../projects/_core_venv/lib/python3.14/site-packages/pydantic/root_model.py:32: error: INTERNAL ERROR -- Please try using mypy master on GitHub:
+ https://mypy.readthedocs.io/en/stable/common_issues.html#using-a-development-mypy-build
+ Please report a bug at https://github.com/python/mypy/issues
+ version: 1.20.0+dev.2e129d11eb992bcddd3dcd4dc2953d4e86585bce
+ .../projects/_core_venv/lib/python3.14/site-packages/pydantic/root_model.py:32: note: use --pdb to drop into pdb
+ Traceback (most recent call last):
+ File "", line 7, in <module>
+ sys.exit(console_entry())
+ File "/__main__.py", line 15, in console_entry
+ main()
+ File "/main.py", line 135, in main
+ res, messages, blockers = run_build(sources, options, fscache, t0, stdout, stderr)
+ File "/main.py", line 219, in run_build
+ res = build.build(sources, options, None, flush_errors, fscache, stdout, stderr)
+ File "/build.py", line 371, in build
+ result = build_inner(
+ File "/build.py", line 468, in build_inner
+ graph = dispatch(sources, manager, stdout)
+ File "/build.py", line 3454, in dispatch
+ process_graph(graph, manager)
+ File "/build.py", line 3875, in process_graph
+ done, still_working, results = manager.wait_for_done(graph)
+ File "/build.py", line 1179, in wait_for_done
+ process_stale_scc(graph, next_scc, self)
+ File "/build.py", line 4032, in process_stale_scc
+ mypy.semanal_main.semantic_analysis_for_scc(graph, scc, manager.errors)
+ File "/semanal_main.py", line 94, in semantic_analysis_for_scc
+ process_top_levels(graph, scc, patches)
+ File "/semanal_main.py", line 232, in process_top_levels
+ deferred, incomplete, progress = semantic_analyze_target(
+ File "/semanal_main.py", line 409, in semantic_analyze_target
+ analyzer.refresh_partial(
+ File "/semanal.py", line 699, in refresh_partial
+ self.refresh_top_level(node)
+ File "/semanal.py", line 717, in refresh_top_level
+ self.accept(d)
+ File "/semanal.py", line 7614, in accept
+ node.accept(self)
+ ~~~~~~~~~~~^^^^^^
+ File "/nodes.py", line 1487, in accept
+ return visitor.visit_class_def(self)
+ ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
+ File "/semanal.py", line 1824, in visit_class_def
+ self.analyze_class(defn)
+ ~~~~~~~~~~~~~~~~~~^^^^^^
+ File "/semanal.py", line 2041, in analyze_class
+ self.analyze_class_body_common(defn)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
+ File "/semanal.py", line 2088, in analyze_class_body_common
+ self.apply_class_plugin_hooks(defn)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
+ File "/semanal.py", line 2173, in apply_class_plugin_hooks
+ hook(ClassDefContext(defn, base_expr, self))
+ ~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ File ".py", line 162, in _pydantic_model_class_maker_callback
+ transformer.transform()
+ ~~~~~~~~~~~~~~~~~~~~~^^
+ File ".py", line 466, in transform
+ fields, class_vars = self.collect_fields_and_class_vars(config, is_a_root_model)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
+ File ".py", line 641, in collect_fields_and_class_vars
+ for stmt in self._get_assignment_statements_from_block(cls.defs):
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^
+ File ".py", line 672, in _get_assignment_statements_from_block
+ yield from self._get_assignment_statements_from_if_statement(stmt)
+ File ".py", line 661, in _get_assignment_statements_from_if_statement
+ for body in stmt.body:
+ ^^^^^^^^^
+ TypeError: 'Block' object is not iterable
- homeassistant/components/recorder/table_managers/__init__.py:36: error: Returning Any from function declared to return "int | None" [no-any-return]
- homeassistant/util/yaml/loader.py:65: error: Returning Any from function declared to return "dict[Any, Any]" [no-any-return]
- homeassistant/util/package.py:117: error: Returning Any from function declared to return "bool" [no-any-return]
- homeassistant/helpers/json.py:143: error: Returning Any from function declared to return "str" [no-any-return]
- homeassistant/helpers/json.py:156: error: Returning Any from function declared to return "bytes" [no-any-return]
- homeassistant/auth/jwt_wrapper.py:29: error: Class cannot subclass "PyJWS" (has type "Any") [misc]
- homeassistant/auth/jwt_wrapper.py:38: error: Returning Any from function declared to return "tuple[bytes, bytes, dict[Any, Any], bytes]" [no-any-return]
- homeassistant/auth/jwt_wrapper.py:56: error: Class cannot subclass "PyJWT" (has type "Any") [misc]
- homeassistant/core.py:1261: error: Variable "homeassistant.helpers.json.json_fragment" is not valid as a type [valid-type]
- homeassistant/core.py:1261: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases
- homeassistant/core.py:1263: error: Returning Any from function declared to return json_fragment? [no-any-return]
- homeassistant/core.py:1362: error: Variable "homeassistant.helpers.json.json_fragment" is not valid as a type [valid-type]
- homeassistant/core.py:1362: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases
- homeassistant/core.py:1364: error: Returning Any from function declared to return json_fragment? [no-any-return]
- homeassistant/core.py:1909: error: Variable "homeassistant.helpers.json.json_fragment" is not valid as a type [valid-type]
- homeassistant/core.py:1909: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases
- homeassistant/core.py:1911: error: Returning Any from function declared to return json_fragment? [no-any-return]
- homeassistant/loader.py:787: error: Variable "homeassistant.helpers.json.json_fragment" is not valid as a type [valid-type]
- homeassistant/loader.py:787: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases
- homeassistant/loader.py:789: error: Returning Any from function declared to return json_fragment? [no-any-return]
- homeassistant/helpers/network.py:342: error: Returning Any from function declared to return "bool" [no-any-return]
- homeassistant/components/http/cors.py:42: error: Unused "type: ignore" comment [unused-ignore]
- homeassistant/components/http/cors.py:72: error: Unused "type: ignore" comment [unused-ignore]
- homeassistant/components/http/cors.py:78: error: Unused "type: ignore" comment [unused-ignore]
- homeassistant/helpers/httpx_client.py:72: error: Class cannot subclass "AsyncClient" (has type "Any") [misc]
- homeassistant/helpers/httpx_client.py:130: error: Unused "type: ignore" comment [unused-ignore]
- homeassistant/components/zeroconf/usage.py:33: error: Unused "type: ignore" comment [unused-ignore]
- homeassistant/components/zeroconf/usage.py:34: error: Unused "type: ignore" comment [unused-ignore]
- homeassistant/helpers/device_registry.py:410: error: Variable "homeassistant.helpers.json.json_fragment" is not valid as a type [valid-type]
- homeassistant/helpers/device_registry.py:410: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases
- homeassistant/helpers/device_registry.py:412: error: Returning Any from function declared to return json_fragment? [no-any-return]
- homeassistant/helpers/device_registry.py:509: error: Variable "homeassistant.helpers.json.json_fragment" is not valid as a type [valid-type]
- homeassistant/helpers/device_registry.py:509: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases
- homeassistant/helpers/device_registry.py:511: error: Returning Any from function declared to return json_fragment? [no-any-return]
- homeassistant/helpers/entity_registry.py:347: error: Variable "homeassistant.helpers.json.json_fragment" is not valid as a type [valid-type]
- homeassistant/helpers/entity_registry.py:347: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases
- homeassistant/helpers/entity_registry.py:349: error: Returning Any from function declared to return json_fragment? [no-any-return]
- homeassistant/helpers/entity_registry.py:495: error: Variable "homeassistant.helpers.json.json_fragment" is not valid as a type [valid-type]
- homeassistant/helpers/entity_registry.py:495: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases
- homeassistant/helpers/entity_registry.py:497: error: Returning Any from function declared to return json_fragment? [no-any-return]
- homeassistant/helpers/area_registry.py:90: error: Variable "homeassistant.helpers.json.json_fragment" is not valid as a type [valid-type]
- homeassistant/helpers/area_registry.py:90: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases
- homeassistant/helpers/area_registry.py:92: error: Returning Any from function declared to return json_fragment? [no-any-return]
- homeassistant/helpers/template/__init__.py:151: error: Returning Any from function declared to return "TemplateState" [no-any-return]
- homeassistant/helpers/template/__init__.py:160: error: Returning Any from function declared to return "TemplateState" [no-any-return]
- homeassistant/helpers/template/__init__.py:1679: error: Returning Any from function declared to return "str" [no-any-return]
- homeassistant/helpers/template/__init__.py:1753: error: Returning Any from function declared to return "type[Any]" [no-any-return]
- homeassistant/helpers/template/__init__.py:1768: error: Class cannot subclass "Undefined" (has type "Any") [misc]
- homeassistant/helpers/template/__init__.py:1784: error: Returning Any from function declared to return "str" [no-any-return]
- homeassistant/helpers/template/__init__.py:1794: error: Returning Any from function declared to return "bool" [no-any-return]
- homeassistant/helpers/template/__init__.py:1825: error: Class cannot subclass "BaseLoader" (has type "Any") [misc]
- homeassistant/helpers/template/__init__.py:1853: error: Class cannot subclass "ImmutableSandboxedEnvironment" (has type "Any") [misc]
- homeassistant/helpers/template/__init__.py:2103: error: Unused "type: ignore[call-overload]" comment [unused-ignore]
- homeassistant/helpers/template/__init__.py:2113: error: Returning Any from function declared to return "CodeType | str" [no-any-return]
- homeassistant/helpers/config_validation.py:705: error: Returning Any from function declared to return "str" [no-any-return]
- homeassistant/auth/__init__.py:609: error: Returning Any from function declared to return "str" [no-any-return]
- homeassistant/helpers/service.py:609: error: Unused "type: ignore" comment [unused-ignore]
- homeassistant/components/matter/entity.py:274: error: Returning Any from function declared to return "str" [no-any-return]
- homeassistant/components/blueprint/models.py:120: error: Returning Any from function declared to return "str" [no-any-return]
- homeassistant/config_entries.py:626: error: Variable "homeassistant.helpers.json.json_fragment" is not valid as a type [valid-type]
- homeassistant/config_entries.py:626: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases
- homeassistant/config_entries.py:649: error: Returning Any from function declared to return json_fragment? [no-any-return]
- homeassistant/config_entries.py:656: error: Variable "homeassistant.helpers.json.json_fragment" is not valid as a type [valid-type]
- homeassistant/config_entries.py:656: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases
- homeassistant/config_entries.py:658: error: Returning Any from function declared to return json_fragment? [no-any-return]
- homeassistant/config_entries.py:2725: error: Unused "type: ignore" comment [unused-ignore]
- homeassistant/components/websocket_api/commands.py:667: error: Variable "homeassistant.helpers.json.json_fragment" is not valid as a type [valid-type]
- homeassistant/components/websocket_api/commands.py:667: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases
- homeassistant/components/zeroconf/websocket_api.py:120: error: Redundant cast to "list[Any]" [redundant-cast]
- homeassistant/components/update/__init__.py:189: error: Returning Any from function declared to return "bool" [no-any-return]
- homeassistant/helpers/aiohttp_client.py:67: error: Class cannot subclass "AsyncDualMDNSResolver" (has type "Any") [misc]
- homeassistant/components/stream/recorder.py:111: error: Unused "type: ignore" comment [unused-ignore]
- homeassistant/components/stream/recorder.py:134: error: Unused "type: ignore" comment [unused-ignore]
- homeassistant/components/stream/recorder.py:139: error: Unused "type: ignore" comment [unused-ignore]
- homeassistant/components/stream/recorder.py:146: error: Unused "type: ignore" comment [unused-ignore]
- homeassistant/components/stream/recorder.py:147: error: Unused "type: ignore" comment [unused-ignore]
- homeassistant/components/recorder/db_schema.py:195: error: Unused "type: ignore" comment [unused-ignore]
- homeassistant/components/recorder/db_schema.py:209: error: Unused "type: ignore" comment [unused-ignore]
- homeassistant/components/recorder/db_schema.py:214: error: Unused "type: ignore" comment [unused-ignore]
- homeassistant/components/recorder/db_schema.py:379: error: Returning Any from function declared to return "int" [no-any-return]
- homeassistant/components/recorder/db_schema.py:595: error: Returning Any from function declared to return "int" [no-any-return]
- homeassistant/helpers/config_entry_oauth2_flow.py:742: error: Returning Any from function declared to return "str" [no-any-return]
- homeassistant/components/recorder/util.py:378: error: Returning Any from function declared to return "datetime | None" [no-any-return]
- homeassistant/components/recorder/util.py:450: error: Unused "type: ignore" comment [unused-ignore]
- homeassistant/components/recorder/util.py:451: error: Unused "type: ignore" comment [unused-ignore]
- homeassistant/components/recorder/util.py:453: error: Unused "type: ignore" comment [unused-ignore]
- homeassistant/components/stream/worker.py:180: error: Unused "type: ignore" comment [unused-ignore]
- homeassistant/components/stream/worker.py:597: error: Unused "type: ignore" comment [unused-ignore]
- homeassistant/components/stream/worker.py:598: error: Unused "type: ignore" comment [unused-ignore]
- homeassistant/components/intent/timers.py:310: error: Returning Any from function declared to return "str" [no-any-return]
- homeassistant/components/cloud/account_link.py:139: error: Returning Any from function declared to return "str" [no-any-return]
- homeassistant/components/recorder/migration.py:2485: error: Returning Any from function declared to return "bytes | None" [no-any-return]
- homeassistant/components/recorder/migration.py:2492: error: Returning Any from function declared to return "bytes" [no-any-return]
- homeassistant/components/frontend/__init__.py:412: error: Returning Any from function declared to return "Path" [no-any-return]
- homeassistant/components/frontend/__init__.py:721: error: Returning Any from function declared to return "str" [no-any-return]
- homeassistant/components/tts/__init__.py:1163: error: Unused "type: ignore" comment [unused-ignore]
- homeassistant/components/tts/__init__.py:1167: error: Unused "type: ignore" comment [unused-ignore]
- homeassistant/components/tts/__init__.py:1171: error: Unused "type: ignore" comment [unused-ignore]
- homeassistant/components/cloud/google_config.py:329: error: Returning Any from function declared to return "str" [no-any-return]
- homeassistant/components/cloud/google_config.py:383: error: Returning Any from function declared to return "HTTPStatus | int" [no-any-return]
- homeassistant/components/assist_pipeline/pipeline.py:1921: error: Returning Any from function declared to return "str" [no-any-return]
- homeassistant/components/cloud/client.py:51: error: Class cannot subclass "Interface" (has type "Any") [misc]
- homeassistant/components/cloud/backup.py:203: error: Returning Any from function declared to return "list[Any]" [no-any-return]
- homeassistant/components/cloud/http_api.py:88: error: Class cannot subclass "CloudError" (has type "Any") [misc]
... (truncated 1127 lines) ...
pyodide (https://github.com/pyodide/pyodide)
- Warning: unused section(s) in pyproject.toml: module = ['PIL.*', 'docutils.parsers.rst', 'loky', 'matplotlib.*', 'pytest_pyodide', 'pytest_pyodide.runner', 'pytest_pyodide.utils', 'termcolor', 'test', 'tomli']
+ .../projects/_pyodide_venv/lib/python3.14/site-packages/pydantic/root_model.py:32: error: INTERNAL ERROR -- Please try using mypy master on GitHub:
+ https://mypy.readthedocs.io/en/stable/common_issues.html#using-a-development-mypy-build
+ Please report a bug at https://github.com/python/mypy/issues
+ version: 1.20.0+dev.2e129d11eb992bcddd3dcd4dc2953d4e86585bce
+ .../projects/_pyodide_venv/lib/python3.14/site-packages/pydantic/root_model.py:32: note: use --pdb to drop into pdb
- pyodide-build/pyodide_build/vendor/loky.py:113: error: Incompatible types in assignment (expression has type "int", variable has type "str") [assignment]
- pyodide-build/pyodide_build/vendor/loky.py:119: error: Incompatible types in assignment (expression has type "int", variable has type "str") [assignment]
- pyodide-build/pyodide_build/vendor/loky.py:120: error: Incompatible types in assignment (expression has type "int", variable has type "str") [assignment]
- pyodide-build/pyodide_build/vendor/loky.py:121: error: Unsupported operand types for > ("str" and "int") [operator]
- pyodide-build/pyodide_build/vendor/loky.py:122: error: Unsupported left operand type for / ("str") [operator]
- pyodide-build/pyodide_build/vendor/loky.py:167: error: Statement is unreachable [unreachable]
- pyodide-build/pyodide_build/vendor/loky.py:175: error: Incompatible types in assignment (expression has type "list[str]", variable has type "CompletedProcess[str]") [assignment]
- pyodide-build/pyodide_build/vendor/loky.py:176: error: Incompatible types in assignment (expression has type "set[Any]", variable has type "CompletedProcess[str]") [assignment]
- pyodide-build/pyodide_build/vendor/loky.py:176: error: "CompletedProcess[str]" has no attribute "__iter__" (not iterable) [attr-defined]
- pyodide-build/pyodide_build/vendor/loky.py:177: error: Argument 1 to "len" has incompatible type "CompletedProcess[str]"; expected "Sized" [arg-type]
- pyodide-build/pyodide_build/vendor/loky.py:206: error: Incompatible types in assignment (expression has type "str", variable has type "int") [assignment]
- pyodide-build/pyodide_build/common.py:149: error: Incompatible default for argument "version" (default has type "None", argument has type "str") [assignment]
- pyodide-build/pyodide_build/common.py:149: note: PEP 484 prohibits implicit Optional. Accordingly, mypy has changed its default to no_implicit_optional=True
- pyodide-build/pyodide_build/common.py:149: note: Use https://github.com/hauntsaninja/no_implicit_optional to automatically upgrade your codebase
- pyodide-build/pyodide_build/common.py:298: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
- pyodide-build/pyodide_build/common.py:440: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
- pyodide-build/pyodide_build/common.py:446: error: List item 4 has incompatible type "Path"; expected "str" [list-item]
- pyodide-build/pyodide_build/common.py:446: error: List item 6 has incompatible type "Path"; expected "str" [list-item]
- pyodide-build/pyodide_build/common.py:452: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
- pyodide-build/pyodide_build/common.py:456: error: List item 4 has incompatible type "Path"; expected "str" [list-item]
- pyodide-build/pyodide_build/common.py:456: error: List item 6 has incompatible type "Path"; expected "str" [list-item]
- pyodide-build/pyodide_build/common.py:458: error: Argument "err_msg" to "run_command" has incompatible type "tuple[str, Path]"; expected "str | tuple[str, ...] | None" [arg-type]
- pyodide-build/pyodide_build/common.py:463: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
- pyodide-build/pyodide_build/common.py:501: error: List item 4 has incompatible type "Path"; expected "str" [list-item]
- pyodide-build/pyodide_build/common.py:507: error: Argument "err_msg" to "run_command" has incompatible type "tuple[str, Path, str]"; expected "str | tuple[str, ...] | None" [arg-type]
- pyodide-build/pyodide_build/xbuildenv.py:435: error: Item "str" of "Path | Any | str" has no attribute "exists" [union-attr]
- pyodide-build/pyodide_build/xbuildenv.py:451: error: Incompatible return value type (got "Path | Any | str", expected "Path") [return-value]
- pyodide-build/pyodide_build/tests/test_xbuildenv.py:388: error: Unsupported right operand type for in ("str | None") [operator]
- pyodide-build/pyodide_build/tests/test_xbuildenv.py:397: error: Unsupported operand types for <= ("str" and "None") [operator]
- pyodide-build/pyodide_build/tests/test_xbuildenv.py:397: note: Left operand is of type "str | None"
- pyodide-build/pyodide_build/tests/test_xbuildenv.py:400: error: Unsupported operand types for <= ("str" and "None") [operator]
- pyodide-build/pyodide_build/tests/test_xbuildenv.py:400: note: Left operand is of type "str | None"
- pyodide-build/pyodide_build/tests/test_xbuildenv.py:403: error: Untyped decorator makes function "test_url_to_version" untyped [untyped-decorator]
- pyodide-build/pyodide_build/recipe/skeleton.py:136: error: Incompatible types in assignment (expression has type "None", variable has type "str") [assignment]
- pyodide-build/pyodide_build/recipe/skeleton.py:161: error: Statement is unreachable [unreachable]
- pyodide-build/pyodide_build/recipe/skeleton.py:237: error: Function is missing a return type annotation [no-untyped-def]
- pyodide-build/pyodide_build/recipe/skeleton.py:237: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
- pyodide-build/pyodide_build/recipe/skeleton.py:246: error: Function is missing a return type annotation [no-untyped-def]
- pyodide-build/pyodide_build/recipe/skeleton.py:246: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
- pyodide-build/pyodide_build/recipe/skeleton.py:358: error: Incompatible types in assignment (expression has type "str", variable has type "Literal['wheel', 'sdist'] | None") [assignment]
- pyodide-build/pyodide_build/recipe/skeleton.py:359: error: List item 0 has incompatible type "Literal['wheel', 'sdist'] | None"; expected "Literal['wheel', 'sdist']" [list-item]
- pyodide-build/pyodide_build/recipe/skeleton.py:446: error: Function is missing a return type annotation [no-untyped-def]
- pyodide-build/pyodide_build/out_of_tree/venv.py:144: error: Unsupported left operand type for / ("None") [operator]
- pyodide-build/pyodide_build/out_of_tree/venv.py:144: note: Left operand is of type "Path | None"
- pyodide-build/pyodide_build/out_of_tree/venv.py:154: error: Unsupported left operand type for / ("None") [operator]
- pyodide-build/pyodide_build/out_of_tree/venv.py:154: note: Left operand is of type "Path | None"
- pyodide-build/pyodide_build/out_of_tree/venv.py:159: error: Unsupported left operand type for / ("None") [operator]
- pyodide-build/pyodide_build/out_of_tree/venv.py:159: note: Left operand is of type "Path | None"
- pyodide-build/pyodide_build/out_of_tree/venv.py:164: error: Unsupported left operand type for / ("None") [operator]
- pyodide-build/pyodide_build/out_of_tree/venv.py:164: note: Left operand is of type "Path | None"
- pyodide-build/pyodide_build/out_of_tree/venv.py:169: error: Unsupported left operand type for / ("None") [operator]
- pyodide-build/pyodide_build/out_of_tree/venv.py:169: note: Left operand is of type "Path | None"
- pyodide-build/pyodide_build/out_of_tree/venv.py:174: error: Unsupported left operand type for / ("None") [operator]
- pyodide-build/pyodide_build/out_of_tree/venv.py:174: note: Left operand is of type "Path | None"
- pyodide-build/pyodide_build/out_of_tree/venv.py:179: error: Unsupported left operand type for / ("None") [operator]
- pyodide-build/pyodide_build/out_of_tree/venv.py:179: note: Left operand is of type "Path | None"
- pyodide-build/pyodide_build/out_of_tree/venv.py:184: error: Unsupported left operand type for / ("None") [operator]
- pyodide-build/pyodide_build/out_of_tree/venv.py:184: note: Left operand is of type "Path | None"
- pyodide-build/pyodide_build/out_of_tree/venv.py:189: error: Unsupported left operand type for / ("None") [operator]
- pyodide-build/pyodide_build/out_of_tree/venv.py:189: note: Left operand is of type "Path | None"
- pyodide-build/pyodide_build/out_of_tree/venv.py:267: error: List item 0 has incompatible type "Path"; expected "str" [list-item]
- pyodide-build/pyodide_build/out_of_tree/venv.py:291: error: List item 0 has incompatible type "Path"; expected "str" [list-item]
- pyodide-build/pyodide_build/out_of_tree/venv.py:435: error: Item "None" of "Path | None" has no attribute "glob" [union-attr]
- pyodide-build/pyodide_build/out_of_tree/venv.py:555: error: Module has no attribute "_base_executable" [attr-defined]
- pyodide-build/pyodide_build/out_of_tree/venv.py:649: error: Unsupported left operand type for / ("None") [operator]
- pyodide-build/pyodide_build/out_of_tree/venv.py:649: note: Left operand is of type "Path | None"
- pyodide-build/pyodide_build/out_of_tree/venv.py:664: error: Unsupported left operand type for / ("None") [operator]
- pyodide-build/pyodide_build/out_of_tree/venv.py:664: note: Left operand is of type "Path | None"
- pyodide-build/pyodide_build/out_of_tree/venv.py:685: error: Item "None" of "Path | None" has no attribute "glob" [union-attr]
- pyodide-build/pyodide_build/cli/xbuildenv.py:32: error: Untyped decorator makes function "_install" untyped [untyped-decorator]
- pyodide-build/pyodide_build/cli/xbuildenv.py:68: error: Untyped decorator makes function "_version" untyped [untyped-decorator]
- pyodide-build/pyodide_build/cli/xbuildenv.py:87: error: Untyped decorator makes function "_versions" untyped [untyped-decorator]
- pyodide-build/pyodide_build/cli/xbuildenv.py:108: error: Untyped decorator makes function "_uninstall" untyped [untyped-decorator]
- pyodide-build/pyodide_build/cli/xbuildenv.py:126: error: Untyped decorator makes function "_use" untyped [untyped-decorator]
- pyodide-build/pyodide_build/cli/xbuildenv.py:144: error: Untyped decorator makes function "_search" untyped [untyped-decorator]
- pyodide-build/pyodide_build/cli/xbuildenv.py:210: error: Untyped decorator makes function "_install_emscripten" untyped [untyped-decorator]
- pyodide-build/pyodide_build/cli/xbuildenv.py:228: error: Statement is unreachable [unreachable]
- pyodide-build/pyodide_build/cli/config.py:13: error: Untyped decorator makes function "callback" untyped [untyped-decorator]
- pyodide-build/pyodide_build/cli/config.py:38: error: Untyped decorator makes function "get_config" untyped [untyped-decorator]
- pyodide-build/pyodide_build/pypabuild.py:52: error: Incompatible default for argument "isolated_build_env" (default has type "None", argument has type "_DefaultIsolatedEnv") [assignment]
- pyodide-build/pyodide_build/pypabuild.py:52: note: PEP 484 prohibits implicit Optional. Accordingly, mypy has changed its default to no_implicit_optional=True
- pyodide-build/pyodide_build/pypabuild.py:52: note: Use https://github.com/hauntsaninja/no_implicit_optional to automatically upgrade your codebase
- pyodide-build/pyodide_build/pypabuild.py:77: error: "isolated_build_env" has type "_DefaultIsolatedEnv" which does not implement __bool__ or __len__ so it could always be true in boolean context [truthy-bool]
- pyodide-build/pyodide_build/pypabuild.py:289: error: Function is missing a return type annotation [no-untyped-def]
- pyodide-build/pyodide_build/pypabuild.py:331: error: Argument 2 to "_create_symlink_dir" has incompatible type "Path | None"; expected "Path" [arg-type]
- pyodide-build/pyodide_build/tests/recipe/test_unvendor.py:17: error: Item "None" of "Path | None" has no attribute "exists" [union-attr]
- pyodide-build/pyodide_build/tests/recipe/test_unvendor.py:18: error: Item "None" of "Path | None" has no attribute "name" [union-attr]
- pyodide-build/pyodide_build/tests/recipe/test_unvendor.py:21: error: Argument 1 to "unpack_archive" has incompatible type "Path | None"; expected "str | PathLike[str]" [arg-type]
- pyodide-build/pyodide_build/tests/recipe/test_unvendor.py:54: error: Item "None" of "Path | None" has no attribute "exists" [union-attr]
- pyodide-build/pyodide_build/tests/recipe/test_unvendor.py:55: error: Item "None" of "Path | None" has no attribute "name" [union-attr]
- pyodide-build/pyodide_build/tests/recipe/test_unvendor.py:58: error: Argument 1 to "unpack_archive" has incompatible type "Path | None"; expected "str | PathLike[str]" [arg-type]
- pyodide-build/pyodide_build/tests/recipe/test_skeleton.py:89: error: Name "mock_run" already defined on line 60 [no-redef]
- pyodide-build/pyodide_build/cli/skeleton.py:16: error: Untyped decorator makes function "callback" untyped [untyped-decorator]
- pyodide-build/pyodide_build/cli/skeleton.py:34: error: Untyped decorator makes function "enable" untyped [untyped-decorator]
- pyodide-build/pyodide_build/cli/skeleton.py:35: error: Function is missing a return type annotation [no-untyped-def]
- pyodide-build/pyodide_build/cli/skeleton.py:60: error: Untyped decorator makes function "disable" untyped [untyped-decorator]
- pyodide-build/pyodide_build/cli/skeleton.py:86: error: Untyped decorator makes function "pin" untyped [untyped-decorator]
- pyodide-build/pyodide_build/cli/skeleton.py:112: error: Untyped decorator makes function "new_recipe_pypi" untyped [untyped-decorator]
- pyodide-build/pyodide_build/cli/skeleton.py:196: error: Argument "source_fmt" to "make_package" has incompatible type "str"; expected "Literal['wheel', 'sdist'] | None" [arg-type]
- pyodide-build/pyodide_build/cli/skeleton.py:198: error: Unused "type: ignore" comment [unused-ignore]
- pyodide-build/pyodide_build/tests/test_venv.py:117: error: Unsupported right operand type for in ("Any | None") [operator]
- pyodide-build/pyodide_build/tests/test_venv.py:279: error: Unsupported left operand type for / ("None") [operator]
- pyodide-build/pyodide_build/tests/test_venv.py:279: note: Left operand is of type "Path | None"
- pyodide-build/pyodide_build/tests/test_cli_xbuildenv.py:29: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
- pyodide-build/pyodide_build/tests/test_pypabuild.py:27: error: Unused "type: ignore" comment [unused-ignore]
- pyodide-build/pyodide_build/tests/test_pypabuild.py:31: error: Unused "type: ignore" comment [unused-ignore]
- pyodide-build/pyodide_build/recipe/builder.py:73: error: Missing type arguments for generic type "dict" [type-arg]
- pyodide-build/pyodide_build/recipe/builder.py:87: error: Function is missing a return type annotation [no-untyped-def]
- pyodide-build/pyodide_build/recipe/builder.py:218: error: Incompatible types in assignment (expression has type "type[RecipeBuilderStaticLibrary]", variable has type "type[RecipeBuilderPackage]") [assignment]
- pyodide-build/pyodide_build/recipe/builder.py:220: error: Incompatible types in assignment (expression has type "type[RecipeBuilderSharedLibrary]", variable has type "type[RecipeBuilderPackage]") [assignment]
- pyodide-build/pyodide_build/recipe/builder.py:505: error: List item 5 has incompatible type "Path"; expected "str" [list-item]
- pyodide-build/pyodide_build/recipe/builder.py:507: error: Argument "err_msg" to "run_command" has incompatible type "tuple[str, Path]"; expected "str | tuple[str, ...] | None" [arg-type]
- pyodide-build/pyodide_build/recipe/builder.py:781: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
- pyodide-build/pyodide_build/recipe/builder.py:839: error: Argument "version" to "find_matching_wheel" has incompatible type "str | None"; expected "str" [arg-type]
- pyodide-build/pyodide_build/recipe/graph_builder.py:169: error: List item 0 has incompatible type "list[str | None]"; expected "str | bytes | PathLike[str] | PathLike[bytes]" [list-item]
- pyodide-build/pyodide_build/out_of_tree/pypi.py:243: error: Variable "pyodide_build.out_of_tree.pypi.APBase" is not valid as a type [valid-type]
- pyodide-build/pyodide_build/out_of_tree/pypi.py:243: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases
- pyodide-build/pyodide_build/out_of_tree/pypi.py:243: error: Invalid base class "APBase" [misc]
... (truncated 73 lines) ...
artigraph (https://github.com/artigraph/artigraph)
- Warning: unused section(s) in pyproject.toml: module = ['sh']
+ .../projects/_artigraph_venv/lib/python3.14/site-packages/pydantic/root_model.py:32: error: INTERNAL ERROR -- Please try using mypy master on GitHub:
+ https://mypy.readthedocs.io/en/stable/common_issues.html#using-a-development-mypy-build
+ Please report a bug at https://github.com/python/mypy/issues
+ version: 1.20.0+dev.2e129d11eb992bcddd3dcd4dc2953d4e86585bce
+ .../projects/_artigraph_venv/lib/python3.14/site-packages/pydantic/root_model.py:32: note: use --pdb to drop into pdb
- src/arti/internal/mappings.py:61: error: Variable "K" is not valid as a type [valid-type]
- src/arti/internal/mappings.py:61: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases
- src/arti/internal/mappings.py:61: error: Variable "V" is not valid as a type [valid-type]
- src/arti/internal/mappings.py:179: error: Returning Any from function declared to return "V | TypedBox[V]" [no-any-return]
- src/arti/internal/mappings.py:221: error: Function is missing a type annotation [no-untyped-def]
- src/arti/internal/mappings.py:253: error: Name "cls.__target_type__" is not defined [name-defined]
- src/arti/fingerprints/__init__.py:82: error: Returning Any from function declared to return "bool" [no-any-return]
- src/arti/internal/models.py:55: error: Unsupported dynamic base class "type" [misc]
- src/arti/internal/models.py:146: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
- src/arti/internal/models.py:150: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
- src/arti/internal/models.py:203: error: Incompatible default for argument "fallback" (default has type "PydanticUndefinedType", argument has type "T") [assignment]
- src/arti/versions/__init__.py:17: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [metaclass]
- src/arti/versions/__init__.py:17: note: "arti.internal.models.ModelMeta" (metaclass of "arti.internal.models.Model") conflicts with "pydantic._internal._model_construction.ModelMetaclass" (metaclass of "pydantic.main.BaseModel")
- src/arti/statistics/__init__.py:8: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [metaclass]
- src/arti/statistics/__init__.py:8: note: "arti.internal.models.ModelMeta" (metaclass of "arti.internal.models.Model") conflicts with "pydantic._internal._model_construction.ModelMetaclass" (metaclass of "pydantic.main.BaseModel")
- src/arti/annotations/__init__.py:8: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [metaclass]
- src/arti/annotations/__init__.py:8: note: "arti.internal.models.ModelMeta" (metaclass of "arti.internal.models.Model") conflicts with "pydantic._internal._model_construction.ModelMetaclass" (metaclass of "pydantic.main.BaseModel")
- src/arti/types/__init__.py:26: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [metaclass]
- src/arti/types/__init__.py:26: note: "arti.internal.models.ModelMeta" (metaclass of "arti.internal.models.Model") conflicts with "pydantic._internal._model_construction.ModelMetaclass" (metaclass of "pydantic.main.BaseModel")
- src/arti/types/__init__.py:44: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [metaclass]
- src/arti/types/__init__.py:44: note: "arti.internal.models.ModelMeta" (metaclass of "arti.internal.models.Model") conflicts with "pydantic._internal._model_construction.ModelMetaclass" (metaclass of "pydantic.main.BaseModel")
- src/arti/types/__init__.py:48: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [metaclass]
- src/arti/types/__init__.py:48: note: "arti.internal.models.ModelMeta" (metaclass of "arti.internal.models.Model") conflicts with "pydantic._internal._model_construction.ModelMetaclass" (metaclass of "pydantic.main.BaseModel")
- src/arti/types/__init__.py:61: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [metaclass]
- src/arti/types/__init__.py:61: note: "arti.internal.models.ModelMeta" (metaclass of "arti.internal.models.Model") conflicts with "pydantic._internal._model_construction.ModelMetaclass" (metaclass of "pydantic.main.BaseModel")
- src/arti/types/__init__.py:209: error: Incompatible return value type (got "Mapping[str, Type]", expected "frozendict[str, Type]") [return-value]
- src/arti/types/__init__.py:347: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [metaclass]
- src/arti/types/__init__.py:347: note: "arti.internal.models.ModelMeta" (metaclass of "arti.internal.models.Model") conflicts with "pydantic._internal._model_construction.ModelMetaclass" (metaclass of "pydantic.main.BaseModel")
- src/arti/types/python.py:158: error: Argument "items" has incompatible type "tuple[Any, ...]"; expected "frozenset[Any]" [arg-type]
- src/arti/types/python.py:196: error: Unused "type: ignore" comment [unused-ignore]
- src/arti/thresholds/__init__.py:11: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [metaclass]
- src/arti/thresholds/__init__.py:11: note: "arti.internal.models.ModelMeta" (metaclass of "arti.internal.models.Model") conflicts with "pydantic._internal._model_construction.ModelMetaclass" (metaclass of "pydantic.main.BaseModel")
- src/arti/partitions/__init__.py:21: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [metaclass]
- src/arti/partitions/__init__.py:21: note: "arti.internal.models.ModelMeta" (metaclass of "arti.internal.models.Model") conflicts with "pydantic._internal._model_construction.ModelMetaclass" (metaclass of "pydantic.main.BaseModel")
- src/arti/formats/__init__.py:11: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [metaclass]
- src/arti/formats/__init__.py:11: note: "arti.internal.models.ModelMeta" (metaclass of "arti.internal.models.Model") conflicts with "pydantic._internal._model_construction.ModelMetaclass" (metaclass of "pydantic.main.BaseModel")
- src/arti/storage/_internal.py:55: error: Argument "key_types" to "WildcardPlaceholder" has incompatible type "Mapping[str, type[PartitionField]]"; expected "frozendict[str, type[PartitionField]]" [arg-type]
- src/arti/storage/__init__.py:24: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [metaclass]
- src/arti/storage/__init__.py:24: note: "arti.internal.models.ModelMeta" (metaclass of "arti.internal.models.Model") conflicts with "pydantic._internal._model_construction.ModelMetaclass" (metaclass of "pydantic.main.BaseModel")
- src/arti/storage/__init__.py:27: error: Missing type arguments for generic type "Storage" [type-arg]
- src/arti/storage/__init__.py:45: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [metaclass]
- src/arti/storage/__init__.py:45: note: "arti.internal.models.ModelMeta" (metaclass of "arti.internal.models.Model") conflicts with "pydantic._internal._model_construction.ModelMetaclass" (metaclass of "pydantic.main.BaseModel")
- src/arti/storage/__init__.py:58: error: Missing type arguments for generic type "Storage" [type-arg]
- src/arti/storage/__init__.py:65: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [metaclass]
- src/arti/storage/__init__.py:65: note: "arti.internal.models.ModelMeta" (metaclass of "arti.internal.models.Model") conflicts with "pydantic._internal._model_construction.ModelMetaclass" (metaclass of "pydantic.main.BaseModel")
- src/arti/storage/__init__.py:74: error: Unused "type: ignore" comment [unused-ignore]
- src/arti/storage/__init__.py:119: error: Missing type arguments for generic type "Storage" [type-arg]
- src/arti/artifacts/__init__.py:24: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [metaclass]
- src/arti/artifacts/__init__.py:24: note: "arti.internal.models.ModelMeta" (metaclass of "arti.internal.models.Model") conflicts with "pydantic._internal._model_construction.ModelMetaclass" (metaclass of "pydantic.main.BaseModel")
- src/arti/artifacts/__init__.py:39: error: Missing type arguments for generic type "Storage" [type-arg]
- src/arti/artifacts/__init__.py:67: error: Missing type arguments for generic type "Storage" [type-arg]
- src/arti/views/__init__.py:20: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [metaclass]
- src/arti/views/__init__.py:20: note: "arti.internal.models.ModelMeta" (metaclass of "arti.internal.models.Model") conflicts with "pydantic._internal._model_construction.ModelMetaclass" (metaclass of "pydantic.main.BaseModel")
- src/arti/views/__init__.py:98: error: Incompatible types in assignment (expression has type "type[View] | None", variable has type "type[Self]") [assignment]
- src/arti/views/__init__.py:102: error: Incompatible types in assignment (expression has type "type[View] | None", variable has type "type[Self]") [assignment]
- src/arti/backends/__init__.py:133: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [metaclass]
- src/arti/backends/__init__.py:133: note: "arti.internal.models.ModelMeta" (metaclass of "arti.internal.models.Model") conflicts with "pydantic._internal._model_construction.ModelMetaclass" (metaclass of "pydantic.main.BaseModel")
- src/arti/producers/__init__.py:56: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [metaclass]
- src/arti/producers/__init__.py:56: note: "arti.internal.models.ModelMeta" (metaclass of "arti.internal.models.Model") conflicts with "pydantic._internal._model_construction.ModelMetaclass" (metaclass of "pydantic.main.BaseModel")
- src/arti/producers/__init__.py:464: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [metaclass]
- src/arti/producers/__init__.py:464: note: "arti.internal.models.ModelMeta" (metaclass of "arti.internal.models.Model") conflicts with "pydantic._internal._model_construction.ModelMetaclass" (metaclass of "pydantic.main.BaseModel")
- src/arti/graphs/__init__.py:94: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [metaclass]
- src/arti/graphs/__init__.py:94: note: "arti.internal.models.ModelMeta" (metaclass of "arti.internal.models.Model") conflicts with "pydantic._internal._model_construction.ModelMetaclass" (metaclass of "pydantic.main.BaseModel")
- src/arti/graphs/__init__.py:102: error: Missing type arguments for generic type "Backend" [type-arg]
- src/arti/graphs/__init__.py:145: error: Incompatible return value type (got "Mapping[Artifact, str]", expected "frozendict[Artifact, str]") [return-value]
- src/arti/graphs/__init__.py:294: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [metaclass]
- src/arti/graphs/__init__.py:294: note: "arti.internal.models.ModelMeta" (metaclass of "arti.internal.models.Model") conflicts with "pydantic._internal._model_construction.ModelMetaclass" (metaclass of "pydantic.main.BaseModel")
- src/arti/graphs/__init__.py:310: error: Missing type arguments for generic type "Backend" [type-arg]
- src/arti/graphs/__init__.py:358: error: Argument 3 to "write_artifact_and_graph_partitions" of "BackendConnection" has incompatible type "Artifact | TypedBox[Artifact]"; expected "Artifact" [arg-type]
- src/arti/graphs/__init__.py:382: error: Missing type arguments for generic type "Backend" [type-arg]
- src/arti/executors/__init__.py:17: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [metaclass]
- src/arti/executors/__init__.py:17: note: "arti.internal.models.ModelMeta" (metaclass of "arti.internal.models.Model") conflicts with "pydantic._internal._model_construction.ModelMetaclass" (metaclass of "pydantic.main.BaseModel")
- src/arti/backends/memory.py:30: error: Missing type arguments for generic type "Storage" [type-arg]
- tests/arti/dummies.py:95: error: Missing type arguments for generic type "Storage" [type-arg]
- tests/arti/dummies.py:101: error: Missing type arguments for generic type "Storage" [type-arg]
- tests/arti/dummies.py:107: error: Missing type arguments for generic type "Storage" [type-arg]
- tests/arti/dummies.py:113: error: Missing type arguments for generic type "Storage" [type-arg]
- tests/arti/dummies.py:119: error: Missing type arguments for generic type "Storage" [type-arg]
- src/arti/types/pydantic.py:51: error: Returning Any from function declared to return "type[BaseModel]" [no-any-return]
- src/arti/types/pydantic.py:51: error: No overload variant of "create_model" matches argument types "str", "dict[str, tuple[Any, EllipsisType]]" [call-overload]
- src/arti/types/pydantic.py:51: note: Possible overload variants:
- src/arti/types/pydantic.py:51: note: def create_model(str, /, *, __config__: ConfigDict | None = ..., __doc__: str | None = ..., __base__: None = ..., __module__: str = ..., __validators__: dict[str, Callable[..., Any]] | None = ..., __cls_kwargs__: dict[str, Any] | None = ..., __qualname__: str | None = ..., **field_definitions: Any | tuple[str, Any]) -> type[BaseModel]
- src/arti/types/pydantic.py:51: note: def [ModelT: BaseModel] create_model(str, /, *, __config__: ConfigDict | None = ..., __doc__: str | None = ..., __base__: type[ModelT] | tuple[type[ModelT], ...], __module__: str = ..., __validators__: dict[str, Callable[..., Any]] | None = ..., __cls_kwargs__: dict[str, Any] | None = ..., __qualname__: str | None = ..., **field_definitions: Any | tuple[str, Any]) -> type[ModelT]
- src/arti/types/pyarrow.py:241: error: Argument "element" has incompatible type "Type"; expected "Struct" [arg-type]
- src/arti/types/bigquery.py:57: error: Unused "type: ignore" comment [unused-ignore]
- src/arti/types/bigquery.py:181: error: Unused "type: ignore" comment [unused-ignore]
- src/arti/types/bigquery.py:231: error: Argument "element" has incompatible type "Type"; expected "Struct" [arg-type]
- src/arti/storage/google/cloud/storage.py:18: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [metaclass]
- src/arti/storage/google/cloud/storage.py:18: note: "arti.internal.models.ModelMeta" (metaclass of "arti.internal.models.Model") conflicts with "pydantic._internal._model_construction.ModelMetaclass" (metaclass of "pydantic.main.BaseModel")
- docs/examples/spend/demo.py:32: error: Missing type arguments for generic type "Storage" [type-arg]
- docs/examples/spend/demo.py:37: error: Missing type arguments for generic type "dict" [type-arg]
- docs/examples/spend/demo.py:39: error: Returning Any from function declared to return "float" [no-any-return]
- docs/examples/spend/demo.py:48: error: Unexpected keyword argument "transactions" for "Producer" [call-arg]
- tests/arti/views/test_views.py:23: error: Variable "MockView" is not valid as a type [valid-type]
- tests/arti/views/test_views.py:23: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases
- tests/arti/views/test_views.py:23: error: Invalid base class "MockView" [misc]
- tests/arti/views/test_views.py:32: error: Variable "MockView" is not valid as a type [valid-type]
- tests/arti/views/test_views.py:32: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases
- tests/arti/views/test_views.py:32: error: Invalid base class "MockView" [misc]
... (truncated 151 lines) ...
|
|
Yep, the failures look like they all stem from the pydantic mypy plugin here, which would need to adapt to this new |
|
TBH I don't think this is worth it. Performance win will likely be marginal (if visible at all), while this will add extra pain to mypy plugins. Our goal is actually to make mypy plugin development more pleasant, because it was already hard enough. |
|
Moreover, we are currently in the process of switching to a new Rust-based parser. So I think it is actually not a good time to make any backwards incompatible changes. |
|
I initially looked into this because I needed to handle If the new rust-based parser is based on ruff's parser, their parser parses I understand this change can be an annoying churn though, so I'll close it if there's further pushback. |
|
IMO it is 10 times more unpleasant to be forced to support multiple incompatible mypy versions, than supporting one, even if somewhat sub-optimal. We got dozens complains about introducing breaking changes, and very few about mypy internals being non-intuitive. |
According to the current way
IfStmt's children were populated,IfStmt.exprandIfStmt.bodywere lists which only ever had one item each.mypy/mypy/fastparse.py
Lines 1330 to 1334 in b71d355
This PR changes the type of
.exprand.bodyto simply be the sole item instead of a 1-item list, makingIfStmtconceptually simpler and removes the need for iterations and indexing operations when traversing throughIfStmts.This is a follow-up to #16369, and synchronises the mypy AST's
IfStmtto be the same shape as the standard library AST'sast.If.I expect there to be some churn in terms of third-party mypy plugins, but since there's talk about mypy v2.0 (#20726), that might be the time to consider a change like this.