)]}'
{".pre-commit-config.yaml":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"bcd176f4f5c5a2bba7ae31053c3af0ec91dcf38f","unresolved":true,"context_lines":[{"line_number":1,"context_line":"repos:"},{"line_number":2,"context_line":"  - repo: https://github.com/pre-commit/mirrors-mypy"},{"line_number":3,"context_line":"    rev: v1.14.1"},{"line_number":4,"context_line":"    hooks:"},{"line_number":5,"context_line":"      - id: mypy"},{"line_number":6,"context_line":"        exclude: ^(doc|releasenotes)/"},{"line_number":7,"context_line":"        additional_dependencies:"},{"line_number":8,"context_line":"          - types-PyYAML"}],"source_content_type":"text/x-yaml","patch_set":1,"id":"d265a622_40c435a2","line":8,"range":{"start_line":1,"start_character":0,"end_line":8,"end_character":24},"updated":"2026-03-19 10:38:59.000000000","message":"fwiw, I\u0027ve found pre-commit to be a really bad fit for running mypy. It caches dependencies which can result in failures on one machine (due to older cached dependencies) but not others. In addition, you end up needing to duplicate your entire dependency list in here for it to work best. tox is a much better fit for running mypy, IMO.\n\nI\u0027ve proposed https://review.opendev.org/c/openstack/python-ironicclient/+/981228 to change this and ensure we actually run mypy in the gate (otherwise things can drift)","commit_id":"50795baf9eef81293d8da0ca45a7d7c4a2ac5962"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"c64a8799b295c8b9c8fddecfd1e5aa4f0432aa90","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"e98661b7_e6711aef","updated":"2026-03-19 10:40:33.000000000","message":"I have no power here but I think it would be beneficial to align ironicclient to what we are/I am doing in SDK and Oslo projects unless there\u0027s a good reason not to.","commit_id":"50795baf9eef81293d8da0ca45a7d7c4a2ac5962"}],"pyproject.toml":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"bcd176f4f5c5a2bba7ae31053c3af0ec91dcf38f","unresolved":true,"context_lines":[{"line_number":11,"context_line":""},{"line_number":12,"context_line":"[[tool.mypy.overrides]]"},{"line_number":13,"context_line":"module \u003d [\"ironicclient.tests.unit.utils\"]"},{"line_number":14,"context_line":"disable_error_codes \u003d [\"import-untyped\"]"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"[[tool.mypy.overrides]]"},{"line_number":17,"context_line":"module \u003d ["}],"source_content_type":"text/x-toml","patch_set":1,"id":"e157643e_56bcf814","line":14,"updated":"2026-03-19 10:38:59.000000000","message":"Personally I would set this at the top-level","commit_id":"50795baf9eef81293d8da0ca45a7d7c4a2ac5962"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"9029557809cfdb260d7ae5abd3259abd03c94ffe","unresolved":true,"context_lines":[{"line_number":11,"context_line":""},{"line_number":12,"context_line":"[[tool.mypy.overrides]]"},{"line_number":13,"context_line":"module \u003d [\"ironicclient.tests.unit.utils\"]"},{"line_number":14,"context_line":"disable_error_codes \u003d [\"import-untyped\"]"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"[[tool.mypy.overrides]]"},{"line_number":17,"context_line":"module \u003d ["}],"source_content_type":"text/x-toml","patch_set":1,"id":"dd7615ff_82b7c6ef","line":14,"in_reply_to":"e157643e_56bcf814","updated":"2026-03-19 10:44:05.000000000","message":"For more context, `import-untyped` means \"I found the import but it\u0027s untyped\" whereas the `ignore_missing_imports` options handles \"I can\u0027t find the import\". You almost never want the latter case since it indicates that you forgot to install a dependency and, as mentioned elsewhere, you want to install all dependencies to give mypy the best chance to detect potential bugs. The only exception to this rule would probably be platform-specific dependencies, but even then you\u0027d be better off sticking a `type: ignore` comment beside the import...","commit_id":"50795baf9eef81293d8da0ca45a7d7c4a2ac5962"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"bcd176f4f5c5a2bba7ae31053c3af0ec91dcf38f","unresolved":true,"context_lines":[{"line_number":2,"context_line":"requires \u003d [\"pbr\u003e\u003d6.0.0\", \"setuptools\u003e\u003d64.0.0\"]"},{"line_number":3,"context_line":"build-backend \u003d \"pbr.build\""},{"line_number":4,"context_line":""},{"line_number":5,"context_line":"[tool.mypy]"},{"line_number":6,"context_line":"python_version \u003d \"3.10\""},{"line_number":7,"context_line":"warn_return_any \u003d true"},{"line_number":8,"context_line":"warn_unused_configs \u003d true"},{"line_number":9,"context_line":"ignore_missing_imports \u003d true"},{"line_number":10,"context_line":"files \u003d [\"ironicclient\"]"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"[[tool.mypy.overrides]]"},{"line_number":13,"context_line":"module \u003d [\"ironicclient.tests.unit.utils\"]"},{"line_number":14,"context_line":"disable_error_codes \u003d [\"import-untyped\"]"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"[[tool.mypy.overrides]]"},{"line_number":17,"context_line":"module \u003d ["},{"line_number":18,"context_line":"    \"ironicclient.tests.unit.common.apiclient.test_exceptions\","},{"line_number":19,"context_line":"    \"ironicclient.tests.unit.osc.v1.fakes\","},{"line_number":20,"context_line":"    \"ironicclient.tests.unit.v1.test_allocation\","},{"line_number":21,"context_line":"    \"ironicclient.tests.unit.v1.test_chassis\","},{"line_number":22,"context_line":"    \"ironicclient.tests.unit.v1.test_conductor\","},{"line_number":23,"context_line":"    \"ironicclient.tests.unit.v1.test_deploy_template\","},{"line_number":24,"context_line":"    \"ironicclient.tests.unit.v1.test_events\","},{"line_number":25,"context_line":"    \"ironicclient.tests.unit.v1.test_port\","},{"line_number":26,"context_line":"    \"ironicclient.tests.unit.v1.test_portgroup\","},{"line_number":27,"context_line":"    \"ironicclient.tests.unit.v1.test_runbook\","},{"line_number":28,"context_line":"    \"ironicclient.tests.unit.v1.test_volume_connector\","},{"line_number":29,"context_line":"    \"ironicclient.tests.unit.v1.test_volume_target\","},{"line_number":30,"context_line":"]"},{"line_number":31,"context_line":"disable_error_codes \u003d [\"var-annotated\"]"}],"source_content_type":"text/x-toml","patch_set":1,"id":"2aa60d98_650312fc","line":31,"range":{"start_line":5,"start_character":0,"end_line":31,"end_character":39},"updated":"2026-03-19 10:38:59.000000000","message":"This is what I\u0027ve been doing in other projects:\n\n```suggestion\n[tool.mypy]\npython_version \u003d \"3.10\"\nshow_column_numbers \u003d true\nshow_error_context \u003d true\nstrict \u003d true\ndisable_error_codes \u003d [\"import-untyped\"]\nfiles \u003d [\"ironicclient\"]\n\n[[tool.mypy.overrides]]\nmodule \u003d [\"ironicclient.tests.*\"]\ndisallow_untyped_calls \u003d false\ndisallow_untyped_defs \u003d false\ndisallow_subclassing_any \u003d false\n```\n\nThis configures strict mode for the main code base but allows untyped methods in tests. The body of those tests will still be checked though, so you benefit from that.\n\nI suspect triggering this will highlight a lot of errors (though in my experience they\u0027re usually all very similar, and 2 or 3 changes across all tests will address 95% of them). You may need to opt out of more errors in the tests and leave a `FIXME` until such a time as they\u0027re addressed. Alternatively, you can just disable error checking entirely for tests, but then you miss out on the chance to identify legit issues with your hints. For larger projects like Nova [I\u0027m doing both](https://review.opendev.org/c/openstack/nova/+/974222/10/pyproject.toml).","commit_id":"50795baf9eef81293d8da0ca45a7d7c4a2ac5962"}]}
