Skip to content

Remove charmhub config from charmcraft.yaml spec#2499

Draft
Copilot wants to merge 9 commits intomainfrom
copilot/remove-charmhub-config
Draft

Remove charmhub config from charmcraft.yaml spec#2499
Copilot wants to merge 9 commits intomainfrom
copilot/remove-charmhub-config

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Dec 3, 2025

  • Understand the codebase structure and test infrastructure
  • Add a constant for allowed charmhub bases (ubuntu@24.04 and lower, including almalinux@9)
  • Create validator in CharmcraftProject model to check if charmhub is used with valid bases
  • Update the JSON schema to remove charmhub field from the schema
  • Add comprehensive tests for the validator
  • Verify existing tests still pass
  • Run linting and formatting
  • Run broader test suite to ensure no regressions
  • Manual verification of charmhub validation behavior
  • Fix trailing whitespace issues from code review
  • Restore deprecation message for charmhub field
  • Remove unnecessary validation from BasesCharm (only needed for PlatformCharm)
  • Restore _warn_charmhub_deprecated method for proper deprecation warnings
  • Fix linting issues (removed unused import)
Original prompt

This section details on the original issue you should resolve

<issue_title>Remove charmhub config from charmcraft.yaml spec</issue_title>
<issue_description>### What needs to get done

  • Remove the ability to have a charmhub section in charmcraft.yaml
  • Remove the key from the charmcraft.yaml reference.

Why it needs to get done

This is no longer used in Charmcraft 3+, but needs to remain in existing bases in case folks use it.</issue_description>

<agent_instructions>Create a validator for the project model for this that allows a charmhub top-level key if the charm only targets bases ubuntu@24.04 or lower (including almalinux@9), but disallows it for any other bases. Ensure that the key is also removed from the JSON schema.</agent_instructions>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits December 3, 2025 18:40
- Add CHARMHUB_ALLOWED_BASES constant for ubuntu@24.04 and lower (including almalinux@9)
- Add validators to BasesCharm and PlatformCharm to check charmhub field usage
- Update charmhub field to be excluded from JSON schema using SkipJsonSchema
- Regenerate schema to remove charmhub from charmcraft.json
- Add comprehensive tests for allowed and disallowed charmhub usage

Co-authored-by: lengau <4305943+lengau@users.noreply.github.com>
Co-authored-by: lengau <4305943+lengau@users.noreply.github.com>
Copilot AI changed the title [WIP] Remove charmhub config from charmcraft.yaml spec Remove charmhub config from charmcraft.yaml spec Dec 3, 2025
Copilot AI requested a review from lengau December 3, 2025 18:49
Comment thread charmcraft/models/project.py
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Dec 3, 2025

Type checking with ty failed. This is a notification only and does not require action.

Command output
warning[possibly-missing-attribute]: Attribute `bases` may be missing on object of type `PlatformCharm | BasesCharm`
   --> charmcraft/application/commands/lifecycle.py:119:36
    |
118 |         msg = "Bases index '{}' is invalid (must be >= 0 and fit in configured bases)."
119 |         len_configured_bases = len(project.bases)
    |                                    ^^^^^^^^^^^^^
120 |         for bases_index in bases_indices:
121 |             if bases_index < 0:
    |
info: rule `possibly-missing-attribute` is enabled by default

error[unresolved-attribute]: Object of type `AppService | type[AppService]` has no attribute `get_credentials`
   --> charmcraft/application/commands/store.py:210:27
    |
209 |         if parsed_args.export:
210 |             credentials = self._services.store.get_credentials(
    |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
211 |                 packages=packages, **kwargs
212 |             )
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `AppService | type[AppService]` has no attribute `login`
   --> charmcraft/application/commands/store.py:218:13
    |
216 |             )
217 |         else:
218 |             self._services.store.login(packages=packages, **kwargs)
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^
219 |             username = self._services.store.get_account_info()["username"]
220 |             emit.message(f"Logged in as {username!r}.")
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `AppService | type[AppService]` has no attribute `get_account_info`
   --> charmcraft/application/commands/store.py:219:24
    |
217 |         else:
218 |             self._services.store.login(packages=packages, **kwargs)
219 |             username = self._services.store.get_account_info()["username"]
    |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
220 |             emit.message(f"Logged in as {username!r}.")
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `AppService | type[AppService]` has no attribute `logout`
   --> charmcraft/application/commands/store.py:244:13
    |
242 |         """Run the command."""
243 |         try:
244 |             self._services.store.logout()
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
245 |             emit.message("Charmhub token cleared.")
246 |         except CredentialsUnavailable:
    |
info: rule `unresolved-attribute` is enabled by default

error[not-iterable]: Object of type `IO[str] | None` may not be iterable
   --> charmcraft/charm_builder.py:423:17
    |
422 |     # https://github.com/microsoft/pylance-release/issues/2385
423 |     for line in proc.stdout:  # pyright: ignore[reportOptionalIterable]
    |                 ^^^^^^^^^^^
424 |         print(f"   :: {line.rstrip()}")
425 |     retcode = proc.wait()
    |
info: It may not have an `__iter__` method and it doesn't have a `__getitem__` method
info: rule `not-iterable` is enabled by default

warning[possibly-missing-attribute]: Attribute `split` may be missing on object of type `str | None`
   --> charmcraft/linters.py:238:23
    |
236 |                     yield name.name.split(".")
237 |             elif isinstance(node, ast.ImportFrom):
238 |                 yield node.module.split(".")
    |                       ^^^^^^^^^^^^^^^^^
239 |
240 |     def _check_operator(self, basedir: pathlib.Path) -> bool:
    |
info: rule `possibly-missing-attribute` is enabled by default

error[invalid-argument-type]: Argument to function `quote` is incorrect
   --> charmcraft/parts/plugins/_charm.py:289:42
    |
287 |             build_cmd.extend(self._get_legacy_dependencies_parameters())
288 |
289 |         commands = [" ".join(shlex.quote(i) for i in build_cmd)]
    |                                          ^ Expected `str`, found `Unknown | str | None`
290 |
291 |         # hook a callback after the BUILD happened (to collect metrics left by charm builder)
    |
info: Element `None` of this union is not assignable to `str`
info: Function defined here
  --> stdlib/shlex.pyi:34:5
   |
32 |     """Return a shell-escaped string from *split_command*."""
33 |
34 | def quote(s: str) -> str:
   |     ^^^^^ ------ Parameter declared here
35 |     """Return a shell-escaped version of the string *s*."""
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `merge_from` is incorrect
   --> charmcraft/parts/plugins/_charm.py:341:28
    |
339 |     def post_build_callback(self, step_info):
340 |         """Collect metrics left by charm_builder.py."""
341 |         instrum.merge_from(env.get_charm_builder_metrics_path())
    |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str`, found `Path`
342 |
343 |     def _get_os_special_priority_paths(self) -> str | None:
    |
info: Method defined here
  --> charmcraft/instrum.py:77:9
   |
75 |             json.dump(measurements, fh, indent=4)
76 |
77 |     def merge_from(self, filename: str) -> None:
   |         ^^^^^^^^^^       ------------- Parameter declared here
78 |         """Merge measurements from a file to the current ongoing structure."""
79 |         with open(filename) as fh:
   |
info: rule `invalid-argument-type` is enabled by default

warning[possibly-missing-attribute]: Attribute `login` may be missing on object of type `Unknown | Client | AnonymousClient`
   --> charmcraft/store/store.py:227:27
    |
226 |         try:
227 |             credentials = self._client.login(**kwargs)
    |                           ^^^^^^^^^^^^^^^^^^
228 |         except CredentialsAlreadyAvailable as exc:
229 |             raise CraftError(
    |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `logout` may be missing on object of type `Unknown | Client | AnonymousClient`
   --> charmcraft/store/store.py:241:9
    |
239 |         There's no action really in the Store to logout, we just remove local credentials.
240 |         """
241 |         self._client.logout()
    |         ^^^^^^^^^^^^^^^^^^^
242 |
243 |     @_store_client_wrapper(auto_login=False)
    |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `whoami` may be missing on object of type `Unknown | Client | AnonymousClient`
   --> charmcraft/store/store.py:246:20
    |
244 |     def whoami(self):
245 |         """Return authenticated user details."""
246 |         response = self._client.whoami()
    |                    ^^^^^^^^^^^^^^^^^^^
247 |
248 |         acc = response["account"]
    |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `whoami` may be missing on object of type `Unknown | Client | AnonymousClient`
   --> charmcraft/store/store.py:268:9
    |
266 |     def _check_authorized(self) -> None:
267 |         """Check if current credentials authenticated."""
268 |         self._client.whoami()
    |         ^^^^^^^^^^^^^^^^^^^
269 |
270 |     @_store_client_wrapper()
    |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `unregister_name` may be missing on object of type `Unknown | Client | AnonymousClient`
   --> charmcraft/store/store.py:285:9
    |
283 |         :raises: error messages from craft-store
284 |         """
285 |         self._client.unregister_name(name)
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
286 |
287 |     @_store_client_wrapper()
    |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `push_file` may be missing on object of type `Unknown | Client | AnonymousClient`
   --> charmcraft/store/store.py:311:21
    |
309 |         self._check_authorized()
310 |
311 |         upload_id = self._client.push_file(filepath)
    |                     ^^^^^^^^^^^^^^^^^^^^^^
312 |         payload = {"upload-id": upload_id}
313 |         if extra_fields is not None:
    |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `list_resource_revisions` may be missing on object of type `Unknown | Client | AnonymousClient`
   --> charmcraft/store/store.py:506:16
    |
504 |     ) -> list[CharmResourceRevision]:
505 |         """Return revisions for the indicated charm resource."""
506 |         return self._client.list_resource_revisions(charm_name, resource_name)
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
507 |
508 |     @_store_client_wrapper()
    |
info: rule `possibly-missing-attribute` is enabled by default

error[invalid-argument-type]: Argument to function `__new__` is incorrect
   --> docs/conf.py:241:38
    |
239 | # Setup libraries documentation snippets for use in charmcraft docs.
240 | common_docs_path = pathlib.Path(__file__).parent / "common"
241 | craft_parts_docs_path = pathlib.Path(craft_parts_docs.__file__).parent / "craft-parts"
    |                                      ^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str | PathLike[str]`, found `str | None`
242 | (common_docs_path / "craft-parts").unlink(missing_ok=True)
243 | (common_docs_path / "craft-parts").symlink_to(craft_parts_docs_path, target_is_directory=True)
    |
info: Element `None` of this union is not assignable to `str | PathLike[str]`
info: Function defined here
   --> stdlib/pathlib/__init__.pyi:299:13
    |
297 |         def __new__(cls, *args: StrPath, **kwargs: Unused) -> Self: ...  # pyright: ignore[reportInconsistentConstructor]
298 |     else:
299 |         def __new__(cls, *args: StrPath, **kwargs: Unused) -> Self: ...
    |             ^^^^^^^      -------------- Parameter declared here
300 |
301 |     @classmethod
    |
info: rule `invalid-argument-type` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> docs/howto/code/custom-action-clearsession/clearsession_action_charm.py:10:8
   |
 8 | import typing
 9 |
10 | import ops
   |        ^^^
11 |
12 | import paas_charm.django
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `paas_charm.django`
  --> docs/howto/code/custom-action-clearsession/clearsession_action_charm.py:12:8
   |
10 | import ops
11 |
12 | import paas_charm.django
   |        ^^^^^^^^^^^^^^^^^
13 |
14 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `flask`
 --> docs/howto/code/custom-action-updatelogfile/app.py:3:8
  |
1 | # initial hello world Flask app
2 |
3 | import flask
  |        ^^^^^
4 |
5 | app = flask.Flask(__name__)
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> docs/howto/code/custom-action-updatelogfile/updatelogfile_action_charm.py:10:8
   |
 8 | import typing
 9 |
10 | import ops
   |        ^^^
11 |
12 | import paas_charm.flask
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `paas_charm.flask`
  --> docs/howto/code/custom-action-updatelogfile/updatelogfile_action_charm.py:12:8
   |
10 | import ops
11 |
12 | import paas_charm.flask
   |        ^^^^^^^^^^^^^^^^
13 |
14 | import requests
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `flask`
 --> docs/howto/code/flask-async/app.py:3:8
  |
1 | from time import sleep
2 |
3 | import flask
  |        ^^^^^
4 |
5 | app = flask.Flask(__name__)
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `django.contrib`
  --> docs/tutorial/code/django/urls_django_hello_world.py:17:6
   |
15 |     2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
16 | """
17 | from django.contrib import admin
   |      ^^^^^^^^^^^^^^
18 | from django.urls import include, path
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `django.urls`
  --> docs/tutorial/code/django/urls_django_hello_world.py:18:6
   |
16 | """
17 | from django.contrib import admin
18 | from django.urls import include, path
   |      ^^^^^^^^^^^
19 |
20 | urlpatterns = [
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `django.urls`
 --> docs/tutorial/code/django/urls_greeting.py:1:6
  |
1 | from django.urls import path
  |      ^^^^^^^^^^^
2 |
3 | from . import views
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Module `docs.tutorial.code.django` has no member `views`
 --> docs/tutorial/code/django/urls_greeting.py:3:15
  |
1 | from django.urls import path
2 |
3 | from . import views
  |               ^^^^^
4 |
5 | urlpatterns = [
  |
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `django.http`
 --> docs/tutorial/code/django/views_greeting.py:1:6
  |
1 | from django.http import HttpResponse
  |      ^^^^^^^^^^^
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `django.http`
 --> docs/tutorial/code/django/views_greeting_configuration.py:3:6
  |
1 | import os
2 |
3 | from django.http import HttpResponse
  |      ^^^^^^^^^^^
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `fastapi`
 --> docs/tutorial/code/fastapi/app.py:1:6
  |
1 | from fastapi import FastAPI
  |      ^^^^^^^
2 |
3 | app = FastAPI()
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `fastapi`
 --> docs/tutorial/code/fastapi/greeting_app.py:3:6
  |
1 | import os
2 |
3 | from fastapi import FastAPI
  |      ^^^^^^^
4 |
5 | app = FastAPI()
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `fastapi`
 --> docs/tutorial/code/fastapi/visitors_app.py:7:6
  |
5 | from typing import Annotated
6 |
7 | from fastapi import FastAPI, Header
  |      ^^^^^^^
8 | import psycopg2
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `psycopg2`
  --> docs/tutorial/code/fastapi/visitors_app.py:8:8
   |
 7 | from fastapi import FastAPI, Header
 8 | import psycopg2
   |        ^^^^^^^^
 9 |
10 | app = FastAPI()
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `psycopg2`
 --> docs/tutorial/code/fastapi/visitors_migrate.py:5:8
  |
3 | import os
4 |
5 | import psycopg2
  |        ^^^^^^^^
6 |
7 | DATABASE_URI = os.environ["POSTGRESQL_DB_CONNECT_STRING"]
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `flask`
 --> docs/tutorial/code/flask/app.py:3:8
  |
1 | # initial hello world Flask app
2 |
3 | import flask
  |        ^^^^^
4 |
5 | app = flask.Flask(__name__)
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `flask`
 --> docs/tutorial/code/flask/greeting_app.py:3:8
  |
1 | # Flask app with a greeting configuration
2 |
3 | import flask
  |        ^^^^^
4 |
5 | app = flask.Flask(__name__)
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `flask`
 --> docs/tutorial/code/flask/visitors_app.py:6:8
  |
4 | import os
5 |
6 | import flask
  |        ^^^^^
7 | import psycopg2
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `psycopg2`
 --> docs/tutorial/code/flask/visitors_app.py:7:8
  |
6 | import flask
7 | import psycopg2
  |        ^^^^^^^^
8 |
9 | app = flask.Flask(__name__)
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `psycopg2`
 --> docs/tutorial/code/flask/visitors_migrate.py:5:8
  |
3 | import os
4 |
5 | import psycopg2
  |        ^^^^^^^^
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `list[ResponseCharmResourceBase]`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `datetime`, and 2 more union elements, are not assignable to `list[ResponseCharmResourceBase]`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `datetime`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `datetime`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `str`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `str`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `int`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `int`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `str`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `str`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `str`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `str`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `str`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `str`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `str`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `str`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `ByteSize`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 3 more union elements, are not assignable to `ByteSize`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `str`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `str`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `datetime | None`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `datetime | None`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `str | None`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `str | None`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
    --> tests/commands/test_store_api.py:1628:13
     |
1626 |     expected = {
1627 |         (test_lib_id, test_api): Library(
1628 |             api=test_api,
     |             ^^^^^^^^^^^^ Expected `int`, found `Literal["test-api-version"]`
1629 |             content=test_content,
1630 |             content_hash=test_hash,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
    --> tests/commands/test_store_api.py:1634:13
     |
1632 |             lib_name=test_lib_name,
1633 |             charm_name=test_charm_name,
1634 |             patch=test_patch,
     |             ^^^^^^^^^^^^^^^^ Expected `int`, found `Literal["test-patch-version"]`
1635 |         ),
1636 |     }
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
    --> tests/commands/test_store_api.py:1718:13
     |
1716 |     expected = {
1717 |         (test_lib_id_1, test_api_1): Library(
1718 |             api=test_api_1,
     |             ^^^^^^^^^^^^^^ Expected `int`, found `Literal["test-api-version-1"]`
1719 |             content=test_content_1,
1720 |             content_hash=test_hash_1,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
    --> tests/commands/test_store_api.py:1724:13
     |
1722 |             lib_name=test_lib_name_1,
1723 |             charm_name=test_charm_name_1,
1724 |             patch=test_patch_1,
     |             ^^^^^^^^^^^^^^^^^^ Expected `int`, found `Literal["test-patch-version-1"]`
1725 |         ),
1726 |         (test_lib_id_2, test_api_2): Library(
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
    --> tests/commands/test_store_api.py:1727:13
     |
1725 |         ),
1726 |         (test_lib_id_2, test_api_2): Library(
1727 |             api=test_api_2,
     |             ^^^^^^^^^^^^^^ Expected `int`, found `Literal["test-api-version-2"]`
1728 |             content=test_content_2,
1729 |             content_hash=test_hash_2,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
    --> tests/commands/test_store_api.py:1733:13
     |
1731 |             lib_name=test_lib_name_2,
1732 |             charm_name=test_charm_name_2,
1733 |             patch=test_patch_2,
     |             ^^^^^^^^^^^^^^^^^^ Expected `int`, found `Literal["test-patch-version-2"]`
1734 |         ),
1735 |     }
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-method-override]: Invalid override of method `json`
   --> tests/commands/test_store_client.py:77:9
    |
 75 |           return self.status_code == 200
 76 |
 77 |       def json(self):
    |           ^^^^^^^^^^ Definition is incompatible with `Response.json`
 78 |           try:
 79 |               return json.loads(self._content)  # type: ignore
    |
   ::: .venv/lib/python3.12/site-packages/requests-stubs/models.pyi:155:9
    |
153 |       @property
154 |       def text(self) -> str: ...
155 |       def json(
    |  _________-
156 | |         self,
157 | |         *,
158 | |         cls: type[JSONDecoder] | None = ...,
159 | |         object_hook: Callable[[dict[Any, Any]], Any] | None = ...,
160 | |         parse_float: Callable[[str], Any] | None = ...,
161 | |         parse_int: Callable[[str], Any] | None = ...,
162 | |         parse_constant: Callable[[str], Any] | None = ...,
163 | |         object_pairs_hook: Callable[[list[tuple[Any, Any]]], Any] | None = ...,
164 | |         **kwds: Any,
165 | |     ) -> Any: ...
    | |____________- `Response.json` defined here
166 |       @property
167 |       def links(self) -> dict[Incomplete, Incomplete]: ...
    |
info: This violates the Liskov Substitution Principle
info: rule `invalid-method-override` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/conftest.py:226:9
    |
224 |         build_base=craft_platforms.DistroBase("ubuntu", "22.04"),
225 |         build_on=arch,
226 |         build_for="arm64",
    |         ^^^^^^^^^^^^^^^^^ Expected `DebianArchitecture | Literal["all"]`, found `Literal["arm64"]`
227 |         platform="distro-1-test64",
228 |     )
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-method-override]: Invalid override of method `get_supported_bases`
  --> tests/extensions/test_extensions.py:33:9
   |
32 |     @classmethod
33 |     def get_supported_bases(cls) -> list[tuple[str, ...]]:
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Definition is incompatible with `Extension.get_supported_bases`
34 |         """Return a list of tuple of supported bases."""
35 |         return cls.bases
   |
  ::: charmcraft/extensions/extension.py:52:9
   |
50 |     @staticmethod
51 |     @abc.abstractmethod
52 |     def get_supported_bases() -> list[tuple[str, str]]:
   |         ---------------------------------------------- `Extension.get_supported_bases` defined here
53 |         """Return a list of tuple of supported bases."""
   |
info: `FakeExtension.get_supported_bases` is a classmethod but `Extension.get_supported_bases` is a staticmethod
info: This violates the Liskov Substitution Principle
info: rule `invalid-method-override` is enabled by default

error[invalid-method-override]: Invalid override of method `is_experimental`
  --> tests/extensions/test_extensions.py:38:9
   |
37 |     @staticmethod
38 |     def is_experimental(_base: tuple[str, ...] | None) -> bool:
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Definition is incompatible with `Extension.is_experimental`
39 |         """Return whether or not this extension is unstable for given base."""
40 |         return False
   |
  ::: charmcraft/extensions/extension.py:57:9
   |
55 |     @staticmethod
56 |     @abc.abstractmethod
57 |     def is_experimental(base: tuple[str, str] | None) -> bool:
   |         ----------------------------------------------------- `Extension.is_experimental` defined here
58 |         """Return whether or not this extension is unstable for given base."""
   |
info: This violates the Liskov Substitution Principle
info: rule `invalid-method-override` is enabled by default

error[invalid-method-override]: Invalid override of method `is_experimental`
  --> tests/extensions/test_extensions.py:62:9
   |
61 |     @staticmethod
62 |     def is_experimental(_base: str | None) -> bool:
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Definition is incompatible with `FakeExtension.is_experimental`
63 |         return True
   |
  ::: tests/extensions/test_extensions.py:38:9
   |
37 |     @staticmethod
38 |     def is_experimental(_base: tuple[str, ...] | None) -> bool:
   |         ------------------------------------------------------ `FakeExtension.is_experimental` defined here
39 |         """Return whether or not this extension is unstable for given base."""
40 |         return False
   |
info: This violates the Liskov Substitution Principle
info: rule `invalid-method-override` is enabled by default

error[invalid-method-override]: Invalid override of method `is_experimental`
  --> tests/extensions/test_registry.py:34:9
   |
33 |     @staticmethod
34 |     def is_experimental(_base: tuple[str, str] | None) -> bool:
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Definition is incompatible with `Extension.is_experimental`
35 |         return False
   |
  ::: charmcraft/extensions/extension.py:57:9
   |
55 |     @staticmethod
56 |     @abc.abstractmethod
57 |     def is_experimental(base: tuple[str, str] | None) -> bool:
   |         ----------------------------------------------------- `Extension.is_experimental` defined here
58 |         """Return whether or not this extension is unstable for given base."""
   |
info: This violates the Liskov Substitution Principle
info: rule `invalid-method-override` is enabled by default

warning[possibly-missing-attribute]: Submodule `application` may not be available as an attribute on module `charmcraft`
  --> tests/integration/commands/test_init.py:75:17
   |
73 | def init_command():
74 |     return init.InitCommand(
75 |         {"app": charmcraft.application.APP_METADATA, "services": None}
   |                 ^^^^^^^^^^^^^^^^^^^^^^
76 |     )
   |
help: Consider explicitly importing `charmcraft.application`
info: rule `possibly-missing-attribute` is enabled by default

error[unresolved-attribute]: Object of type `RecordingEmitter` has no attribute `assert_json_output`
   --> tests/integration/commands/test_store_commands.py:225:9
    |
223 |             },
224 |         ]
225 |         emitter.assert_json_output(  # pyright: ignore[reportAttributeAccessIssue]
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^
226 |             expected
227 |         )
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Unresolved attribute `client` on type `AppService`.
  --> tests/integration/conftest.py:45:5
   |
43 |     services.register_services()
44 |     factory = craft_application.ServiceFactory(app=application.APP_METADATA)
45 |     factory.get("store").client = mock.Mock(spec_set=craft_store.StoreClient)  # pyright: ignore[reportAttributeAccessIssue]
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
46 |     factory.update_kwargs(
47 |         "charm_libs",
   |
info: rule `unresolved-attribute` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
  --> tests/integration/services/test_image.py:28:9
   |
26 |     service = ImageService(
27 |         app=application.APP_METADATA,
28 |         services=None,  # pyright: ignore[reportArgumentType]
   |         ^^^^^^^^^^^^^ Expected `ServiceFactory`, found `None`
29 |     )
30 |     service.setup()
   |
info: Method defined here
  --> .venv/lib/python3.12/site-packages/craft_application/services/base.py:44:9
   |
42 |     """
43 |
44 |     def __init__(self, app: AppMetadata, services: ServiceFactory) -> None:
   |         ^^^^^^^^                         ------------------------ Parameter declared here
45 |         self._app = app
46 |         self._services = services
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/integration/services/test_lifecycle.py:40:17
   |
38 |                 platform="something",
39 |                 build_on=craft_platforms.DebianArchitecture.from_host(),
40 |                 build_for="invalid",  # pyright: ignore[reportArgumentType]
   |                 ^^^^^^^^^^^^^^^^^^^ Expected `DebianArchitecture | Literal["all"]`, found `Literal["invalid"]`
41 |                 build_base=craft_platforms.DistroBase(distro.id(), distro.version()),
42 |             )
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/integration/services/test_lifecycle.py:88:17
   |
86 |                 platform="something",
87 |                 build_on=host_arch,
88 |                 build_for=f"{foreign_arch}-{host_arch}",  # pyright: ignore[reportArgumentType]
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `DebianArchitecture | Literal["all"]`, found `str`
89 |                 build_base=craft_platforms.DistroBase(distro.id(), distro.version()),
90 |             )
   |
info: rule `invalid-argument-type` is enabled by default

error[unresolved-import]: Cannot resolve imported module `charm`
  --> tests/spread/commands/init-extensions/tests/unit/test_charm.py:9:8
   |
 7 | import pathlib
 8 |
 9 | import charm
   |        ^^^^^
10 | import scenario
11 | import scenario.errors
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `scenario`
  --> tests/spread/commands/init-extensions/tests/unit/test_charm.py:10:8
   |
 9 | import charm
10 | import scenario
   |        ^^^^^^^^
11 | import scenario.errors
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `scenario.errors`
  --> tests/spread/commands/init-extensions/tests/unit/test_charm.py:11:8
   |
 9 | import charm
10 | import scenario
11 | import scenario.errors
   |        ^^^^^^^^^^^^^^^
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/dependencies/setuptools-scm-python/src/charm.py:9:8
   |
 7 | import logging
 8 |
 9 | import ops
   |        ^^^
10 |
11 | # A standalone module for workload-specific logic (no charming concerns):
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `setuptools_scm_python`
  --> tests/spread/dependencies/setuptools-scm-python/src/charm.py:12:8
   |
11 | # A standalone module for workload-specific logic (no charming concerns):
12 | import setuptools_scm_python
   |        ^^^^^^^^^^^^^^^^^^^^^
13 |
14 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/dependencies/strict-dependencies-errors/extra-binary-packages/src/charm.py:17:8
   |
15 | import logging
16 |
17 | import ops
   |        ^^^
18 |
19 | # Log messages can be retrieved using juju debug-log
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/dependencies/strict-dependencies-errors/extra-packages/src/charm.py:17:8
   |
15 | import logging
16 |
17 | import ops
   |        ^^^
18 |
19 | # Log messages can be retrieved using juju debug-log
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/dependencies/strict-dependencies-errors/missing-packages/src/charm.py:17:8
   |
15 | import logging
16 |
17 | import ops
   |        ^^^
18 |
19 | # Log messages can be retrieved using juju debug-log
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/dependencies/strict-dependencies-errors/no-requirements/src/charm.py:17:8
   |
15 | import logging
16 |
17 | import ops
   |        ^^^
18 |
19 | # Log messages can be retrieved using juju debug-log
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/dependencies/strict-dependencies/charm/src/charm.py:17:8
   |
15 | import logging
16 |
17 | import ops
   |        ^^^
18 |
19 | # Log messages can be retrieved using juju debug-log
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `charms.reactive`
 --> tests/spread/smoketests/reactive/reactivecharm/reactive/reactivecharm.py:1:6
  |
1 | from charms.reactive import set_flag, when_not
  |      ^^^^^^^^^^^^^^^
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/ubuntu-20.04/charm/bases/src/charm.py:18:8
   |
16 | from typing import cast
17 |
18 | import ops
   |        ^^^
19 |
20 | # Log messages can be retrieved using juju debug-log
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/ubuntu-20.04/charm/platforms/src/charm.py:9:8
   |
 7 | import logging
 8 |
 9 | import ops
   |        ^^^
10 |
11 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/ubuntu-22.04/charm/bases/src/charm.py:18:8
   |
16 | from typing import cast
17 |
18 | import ops
   |        ^^^
19 |
20 | # Log messages can be retrieved using juju debug-log
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/ubuntu-22.04/charm/platforms/src/charm.py:9:8
   |
 7 | import logging
 8 |
 9 | import ops
   |        ^^^
10 |
11 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/ubuntu-24.04/charm/platforms/src/charm.py:9:8
   |
 7 | import logging
 8 |
 9 | import ops
   |        ^^^
10 |
11 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
 --> tests/spread/ubuntu-24.04/test-cmd/src/charm.py:6:8
  |
4 | import logging
5 |
6 | import ops
  |        ^^^
7 |
8 | # A standalone module for workload-specific logic (no charming concerns):
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `test_cmd`
  --> tests/spread/ubuntu-24.04/test-cmd/src/charm.py:9:8
   |
 8 | # A standalone module for workload-specific logic (no charming concerns):
 9 | import test_cmd
   |        ^^^^^^^^
10 |
11 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `pytest_operator.plugin`
 --> tests/spread/ubuntu-24.04/test-cmd/tests/integration/test_charm.py:7:6
  |
5 | import pytest
6 | import yaml
7 | from pytest_operator.plugin import OpsTest
  |      ^^^^^^^^^^^^^^^^^^^^^^
8 |
9 | logger = logging.getLogger(__name__)
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
 --> tests/spread/ubuntu-24.04/test-cmd/tests/unit/test_charm.py:2:6
  |
1 | import pytest
2 | from ops import testing
  |      ^^^
3 |
4 | from charm import TestCmdCharm
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `charm`
 --> tests/spread/ubuntu-24.04/test-cmd/tests/unit/test_charm.py:4:6
  |
2 | from ops import testing
3 |
4 | from charm import TestCmdCharm
  |      ^^^^^
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/ubuntu-25.10/charm/platforms/src/charm.py:9:8
   |
 7 | import logging
 8 |
 9 | import ops
   |        ^^^
10 |
11 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
 --> tests/spread/ubuntu-25.10/test-cmd/src/charm.py:6:8
  |
4 | import logging
5 |
6 | import ops
  |        ^^^
7 |
8 | # A standalone module for workload-specific logic (no charming concerns):
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `test_cmd`
  --> tests/spread/ubuntu-25.10/test-cmd/src/charm.py:9:8
   |
 8 | # A standalone module for workload-specific logic (no charming concerns):
 9 | import test_cmd
   |        ^^^^^^^^
10 |
11 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `pytest_operator.plugin`
 --> tests/spread/ubuntu-25.10/test-cmd/tests/integration/test_charm.py:7:6
  |
5 | import pytest
6 | import yaml
7 | from pytest_operator.plugin import OpsTest
  |      ^^^^^^^^^^^^^^^^^^^^^^
8 |
9 | logger = logging.getLogger(__name__)
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
 --> tests/spread/ubuntu-25.10/test-cmd/tests/unit/test_charm.py:2:6
  |
1 | import pytest
2 | from ops import testing
  |      ^^^
3 |
4 | from charm import TestCmdCharm
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `charm`
 --> tests/spread/ubuntu-25.10/test-cmd/tests/unit/test_charm.py:4:6
  |
2 | from ops import testing
3 |
4 | from charm import TestCmdCharm
  |      ^^^^^
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/ubuntu-26.04/charm/platforms/src/charm.py:9:8
   |
 7 | import logging
 8 |
 9 | import ops
   |        ^^^
10 |
11 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
 --> tests/spread/ubuntu-26.04/test-cmd/src/charm.py:6:8
  |
4 | import logging
5 |
6 | import ops
  |        ^^^
7 |
8 | # A standalone module for workload-specific logic (no charming concerns):
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `test_cmd`
  --> tests/spread/ubuntu-26.04/test-cmd/src/charm.py:9:8
   |
 8 | # A standalone module for workload-specific logic (no charming concerns):
 9 | import test_cmd
   |        ^^^^^^^^
10 |
11 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `pytest_operator.plugin`
 --> tests/spread/ubuntu-26.04/test-cmd/tests/integration/test_charm.py:7:6
  |
5 | import pytest
6 | import yaml
7 | from pytest_operator.plugin import OpsTest
  |      ^^^^^^^^^^^^^^^^^^^^^^
8 |
9 | logger = logging.getLogger(__name__)
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
 --> tests/spread/ubuntu-26.04/test-cmd/tests/unit/test_charm.py:2:6
  |
1 | import pytest
2 | from ops import testing
  |      ^^^
3 |
4 | from charm import TestCmdCharm
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `charm`
 --> tests/spread/ubuntu-26.04/test-cmd/tests/unit/test_charm.py:4:6
  |
2 | from ops import testing
3 |
4 | from charm import TestCmdCharm
  |      ^^^^^
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
   --> tests/test_instrum.py:256:32
    |
254 |     assert measurements.measurements == {}
255 |
256 |     with Timer("test message", foo=42):
    |                                ^^^^^^ Expected `dict[str, Any]`, found `Literal[42]`
257 |         pass
    |
info: Method defined here
   --> charmcraft/instrum.py:129:9
    |
127 |     """
128 |
129 |     def __init__(self, msg: str, **extra_info: dict[str, Any]):
    |         ^^^^^^^^                 ---------------------------- Parameter declared here
130 |         self.msg = msg
131 |         self.extra_info = extra_info
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
   --> tests/test_instrum.py:274:28
    |
272 |     monkeypatch.setattr(instrum, "_measurements", measurements)
273 |
274 |     @Timer("test message", foo=42)
    |                            ^^^^^^ Expected `dict[str, Any]`, found `Literal[42]`
275 |     def test_function(a, b):
276 |         assert a == 17
    |
info: Method defined here
   --> charmcraft/instrum.py:129:9
    |
127 |     """
128 |
129 |     def __init__(self, msg: str, **extra_info: dict[str, Any]):
    |         ^^^^^^^^                 ---------------------------- Parameter declared here
130 |         self.msg = msg
131 |         self.extra_info = extra_info
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
   --> tests/test_instrum.py:298:32
    |
296 |     assert measurements.measurements == {}
297 |
298 |     with Timer("test message", foo=42) as timer:
    |                                ^^^^^^ Expected `dict[str, Any]`, found `Literal[42]`
299 |         timer.mark("middle 1")
300 |         timer.mark("middle 2")
    |
info: Method defined here
   --> charmcraft/instrum.py:129:9
    |
127 |     """
128 |
129 |     def __init__(self, msg: str, **extra_info: dict[str, Any]):
    |         ^^^^^^^^                 ---------------------------- Parameter declared here
130 |         self.msg = msg
131 |         self.extra_info = extra_info
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-assignment]: Implicit shadowing of function `write`
  --> tests/unit/commands/test_lifecycle.py:91:5
   |
90 |     libs_service = cast("CharmLibsService", service_factory.get("charm_libs"))
91 |     libs_service.write = mock.Mock(wraps=libs_service.write)
   |     ^^^^^^^^^^^^^^^^^^
92 |
93 |     pack._update_charm_libs()
   |
info: Annotate to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[unresolved-attribute]: Object of type `bound method CharmLibsService.write(library: Library) -> None` has no attribute `assert_called_once_with`
  --> tests/unit/commands/test_lifecycle.py:95:5
   |
93 |     pack._update_charm_libs()
94 |
95 |     libs_service.write.assert_called_once_with(store_lib)
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
96 |
97 |     with check():
   |
info: rule `unresolved-attribute` is enabled by default

error[non-subscriptable]: Cannot subscript object of type `None` with no `__getitem__` method
  --> tests/unit/models/test_config.py:75:23
   |
73 |     config = JujuConfig(options={"my-opt": option})
74 |
75 |     assert isinstance(config.options["my-opt"], type_)
   |                       ^^^^^^^^^^^^^^^^^^^^^^^^
   |
info: rule `non-subscriptable` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/unit/models/test_project.py:813:13
    |
811 |             description="",
812 |             base=base,
813 |             platforms={"amd64": None},
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `PlatformsDict`, found `dict[Unknown | str, Unknown | None]`
814 |             parts={"charm": {"plugin": "charm"}},
815 |         )
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `__new__` is incorrect
  --> tests/unit/parts/plugins/test_charm.py:97:22
   |
96 |     pip_constraint_file = (
97 |         pathlib.Path(parts.plugins.__file__).parent / "charm-constraints.txt"
   |                      ^^^^^^^^^^^^^^^^^^^^^^ Expected `str | PathLike[str]`, found `str | None`
98 |     )
   |
info: Element `None` of this union is not assignable to `str | PathLike[str]`
info: Function defined here
   --> stdlib/pathlib/__init__.pyi:299:13
    |
297 |         def __new__(cls, *args: StrPath, **kwargs: Unused) -> Self: ...  # pyright: ignore[reportInconsistentConstructor]
298 |     else:
299 |         def __new__(cls, *args: StrPath, **kwargs: Unused) -> Self: ...
    |             ^^^^^^^      -------------- Parameter declared here
300 |
301 |     @classmethod
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-assignment]: Implicit shadowing of function `_get_pip`
  --> tests/unit/parts/plugins/test_poetry.py:40:5
   |
39 | def test_get_pip_install_commands(poetry_plugin: plugins.PoetryPlugin):
40 |     poetry_plugin._get_pip = lambda: "/python -m pip"
   |     ^^^^^^^^^^^^^^^^^^^^^^
41 |
42 |     assert poetry_plugin._get_pip_install_commands(
   |
info: Annotate to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Implicit shadowing of function `_get_pip`
  --> tests/unit/parts/plugins/test_python.py:62:5
   |
60 |     }
61 |     python_plugin._options = plugins.PythonPluginProperties.unmarshal(spec)
62 |     python_plugin._get_pip = lambda: "/python -m pip"
   |     ^^^^^^^^^^^^^^^^^^^^^^
63 |     copy_src_cmd = (
64 |         f"cp --archive --recursive --reflink=auto {build_path}/src {install_path}"
   |
info: Annotate to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
   --> tests/unit/services/test_analysis.py:112:67
    |
110 | @pytest.fixture
111 | def analysis_service():
112 |     return analysis.AnalysisService(app=application.APP_METADATA, services=None)
    |                                                                   ^^^^^^^^^^^^^ Expected `ServiceFactory`, found `None`
    |
info: Method defined here
  --> charmcraft/services/analysis.py:37:9
   |
35 |     _project: models.CharmcraftProject  # type: ignore[assignment]
36 |
37 |     def __init__(  # (too many arguments)
   |         ^^^^^^^^
38 |         self,
39 |         app: craft_application.AppMetadata,
40 |         services: craft_application.ServiceFactory,
   |         ------------------------------------------ Parameter declared here
41 |     ) -> None:
42 |         super().__init__(app, services)
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/unit/services/test_lifecycle.py:55:17
   |
53 |                 platform="something",
54 |                 build_on=HOST_ARCH,
55 |                 build_for=plan_build_for,  # pyright: ignore[reportArgumentType]
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^ Expected `DebianArchitecture | Literal["all"]`, found `str`
56 |             )
57 |         ]
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/unit/services/test_lifecycle.py:94:17
   |
92 |                 platform="something",
93 |                 build_on=HOST_ARCH,
94 |                 build_for=f"{HOST_ARCH}-foreign",  # pyright: ignore[reportArgumentType]
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `DebianArchitecture | Literal["all"]`, found `str`
95 |             )
96 |         ]
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
  --> tests/unit/services/test_project.py:34:45
   |
32 | @pytest.fixture
33 | def service(project_path):
34 |     return ProjectService(app=APP_METADATA, services=None, project_dir=project_path)
   |                                             ^^^^^^^^^^^^^ Expected `ServiceFactory`, found `None`
   |
info: Method defined here
  --> .venv/lib/python3.12/site-packages/craft_application/services/project.py:57:9
   |
55 |     _project_model: models.Project | None
56 |
57 |     def __init__(
   |         ^^^^^^^^
58 |         self, app: AppMetadata, services: ServiceFactory, *, project_dir: pathlib.Path
   |                                 ------------------------ Parameter declared here
59 |     ) -> None:
60 |         super().__init__(app, services)
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
   --> tests/unit/services/test_provider.py:123:9
    |
121 |     provider_service = ProviderService(
122 |         app=APP_METADATA,
123 |         services=None,  # pyright: ignore[reportArgumentType]
    |         ^^^^^^^^^^^^^ Expected `ServiceFactory`, found `None`
124 |         work_dir=tmp_path,
125 |     )
    |
info: Method defined here
  --> charmcraft/services/provider.py:43:9
   |
41 |     """Business logic for getting providers."""
42 |
43 |     def __init__(
   |         ^^^^^^^^
44 |         self,
45 |         app: craft_application.AppMetadata,
46 |         services: craft_application.ServiceFactory,
   |         ------------------------------------------ Parameter declared here
47 |         *,
48 |         work_dir: pathlib.Path,
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
  --> tests/unit/services/test_store.py:50:56
   |
48 | @pytest.fixture(scope="module")
49 | def reusable_store():
50 |     store = StoreService(app=application.APP_METADATA, services=None)
   |                                                        ^^^^^^^^^^^^^ Expected `ServiceFactory`, found `None`
51 |     store.client = mock.Mock(spec_set=craft_store.StoreClient)
52 |     store._publisher = mock.Mock(spec_set=craft_store.PublisherGateway)
   |
info: Method defined here
  --> .venv/lib/python3.12/site-packages/craft_application/services/base.py:44:9
   |
42 |     """
43 |
44 |     def __init__(self, app: AppMetadata, services: ServiceFactory) -> None:
   |         ^^^^^^^^                         ------------------------ Parameter declared here
45 |         self._app = app
46 |         self._services = services
   |
info: rule `invalid-argument-type` is enabled by default

warning[possibly-missing-attribute]: Attribute `group` may be missing on object of type `Match[str] | None`
  --> tests/unit/test_linters.py:43:12
   |
41 | )
42 | def test_fuzz_python_name_regex(name, next_char, further_garbage):
43 |     assert linters.PYTHON_NAME_REGEX.match(name).group(0) == name
   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
44 |     assert linters.PYTHON_NAME_REGEX.match(f"{name}{next_char}").group(0) == name
45 |     assert (
   |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `group` may be missing on object of type `Match[str] | None`
  --> tests/unit/test_linters.py:44:12
   |
42 | def test_fuzz_python_name_regex(name, next_char, further_garbage):
43 |     assert linters.PYTHON_NAME_REGEX.match(name).group(0) == name
44 |     assert linters.PYTHON_NAME_REGEX.match(f"{name}{next_char}").group(0) == name
   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
45 |     assert (
46 |         linters.PYTHON_NAME_REGEX.match(f"{name}{next_char}{further_garbage}").group(0)
   |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `group` may be missing on object of type `Match[str] | None`
  --> tests/unit/test_linters.py:46:9
   |
44 |     assert linters.PYTHON_NAME_REGEX.match(f"{name}{next_char}").group(0) == name
45 |     assert (
46 |         linters.PYTHON_NAME_REGEX.match(f"{name}{next_char}{further_garbage}").group(0)
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
47 |         == name
48 |     )
   |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `group` may be missing on object of type `Match[str] | None`
  --> tests/unit/test_linters.py:62:12
   |
60 | )
61 | def test_min_version_regex_matches(string, expected):
62 |     assert linters.MIN_VERSION_REGEX.search(string).group(1) == expected
   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `group` may be missing on object of type `Match[str] | None`
  --> tests/unit/test_linters.py:76:24
   |
74 | )
75 | def test_approx_version_regex_matches(string, expected):
76 |     assert expected in linters.APPROX_VERSION_REGEX.search(string).group(1, 2)
   |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `group` may be missing on object of type `Match[str] | None`
  --> tests/unit/test_linters.py:84:12
   |
82 | )
83 | def test_exact_version_regex_matches(string, expected):
84 |     assert linters.EXACT_VERSION_REGEX.search(string).group(1) == expected
   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
info: rule `possibly-missing-attribute` is enabled by default

error[no-matching-overload]: No overload of function `format_content` matches arguments
   --> tests/unit/utils/test_cli.py:285:9
    |
283 | def test_format_content_invalid(fmt):
284 |     with pytest.raises(ValueError, match="^Unknown output format "):
285 |         format_content(None, fmt)
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^
    |
info: First overload defined here
   --> charmcraft/utils/cli.py:185:5
    |
184 |   @overload
185 |   def format_content(
    |  _____^
186 | |     content: dict[str, Any] | list[dict[str, Any]], fmt: OutputFormat | str | None
187 | | ) -> str: ...
    | |________^
    |
info: Possible overloads for function `format_content`:
info:   (content: dict[str, Any] | list[dict[str, Any]], fmt: OutputFormat | str | None) -> str
info:   (content: str | Real | list[Unknown] | dict[Unknown, Unknown], fmt: OutputFormat | str | None) -> str
info: Overload implementation defined here
   --> charmcraft/utils/cli.py:196:5
    |
196 | def format_content(content, fmt=None):
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
197 |     """Format command output."""
198 |     if not isinstance(fmt, OutputFormat):
    |
info: rule `no-matching-overload` is enabled by default

Found 125 diagnostics

1 similar comment
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Dec 3, 2025

Type checking with ty failed. This is a notification only and does not require action.

Command output
warning[possibly-missing-attribute]: Attribute `bases` may be missing on object of type `PlatformCharm | BasesCharm`
   --> charmcraft/application/commands/lifecycle.py:119:36
    |
118 |         msg = "Bases index '{}' is invalid (must be >= 0 and fit in configured bases)."
119 |         len_configured_bases = len(project.bases)
    |                                    ^^^^^^^^^^^^^
120 |         for bases_index in bases_indices:
121 |             if bases_index < 0:
    |
info: rule `possibly-missing-attribute` is enabled by default

error[unresolved-attribute]: Object of type `AppService | type[AppService]` has no attribute `get_credentials`
   --> charmcraft/application/commands/store.py:210:27
    |
209 |         if parsed_args.export:
210 |             credentials = self._services.store.get_credentials(
    |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
211 |                 packages=packages, **kwargs
212 |             )
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `AppService | type[AppService]` has no attribute `login`
   --> charmcraft/application/commands/store.py:218:13
    |
216 |             )
217 |         else:
218 |             self._services.store.login(packages=packages, **kwargs)
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^
219 |             username = self._services.store.get_account_info()["username"]
220 |             emit.message(f"Logged in as {username!r}.")
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `AppService | type[AppService]` has no attribute `get_account_info`
   --> charmcraft/application/commands/store.py:219:24
    |
217 |         else:
218 |             self._services.store.login(packages=packages, **kwargs)
219 |             username = self._services.store.get_account_info()["username"]
    |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
220 |             emit.message(f"Logged in as {username!r}.")
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `AppService | type[AppService]` has no attribute `logout`
   --> charmcraft/application/commands/store.py:244:13
    |
242 |         """Run the command."""
243 |         try:
244 |             self._services.store.logout()
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
245 |             emit.message("Charmhub token cleared.")
246 |         except CredentialsUnavailable:
    |
info: rule `unresolved-attribute` is enabled by default

error[not-iterable]: Object of type `IO[str] | None` may not be iterable
   --> charmcraft/charm_builder.py:423:17
    |
422 |     # https://github.com/microsoft/pylance-release/issues/2385
423 |     for line in proc.stdout:  # pyright: ignore[reportOptionalIterable]
    |                 ^^^^^^^^^^^
424 |         print(f"   :: {line.rstrip()}")
425 |     retcode = proc.wait()
    |
info: It may not have an `__iter__` method and it doesn't have a `__getitem__` method
info: rule `not-iterable` is enabled by default

warning[possibly-missing-attribute]: Attribute `split` may be missing on object of type `str | None`
   --> charmcraft/linters.py:238:23
    |
236 |                     yield name.name.split(".")
237 |             elif isinstance(node, ast.ImportFrom):
238 |                 yield node.module.split(".")
    |                       ^^^^^^^^^^^^^^^^^
239 |
240 |     def _check_operator(self, basedir: pathlib.Path) -> bool:
    |
info: rule `possibly-missing-attribute` is enabled by default

error[invalid-argument-type]: Argument to function `quote` is incorrect
   --> charmcraft/parts/plugins/_charm.py:289:42
    |
287 |             build_cmd.extend(self._get_legacy_dependencies_parameters())
288 |
289 |         commands = [" ".join(shlex.quote(i) for i in build_cmd)]
    |                                          ^ Expected `str`, found `Unknown | str | None`
290 |
291 |         # hook a callback after the BUILD happened (to collect metrics left by charm builder)
    |
info: Element `None` of this union is not assignable to `str`
info: Function defined here
  --> stdlib/shlex.pyi:34:5
   |
32 |     """Return a shell-escaped string from *split_command*."""
33 |
34 | def quote(s: str) -> str:
   |     ^^^^^ ------ Parameter declared here
35 |     """Return a shell-escaped version of the string *s*."""
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `merge_from` is incorrect
   --> charmcraft/parts/plugins/_charm.py:341:28
    |
339 |     def post_build_callback(self, step_info):
340 |         """Collect metrics left by charm_builder.py."""
341 |         instrum.merge_from(env.get_charm_builder_metrics_path())
    |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str`, found `Path`
342 |
343 |     def _get_os_special_priority_paths(self) -> str | None:
    |
info: Method defined here
  --> charmcraft/instrum.py:77:9
   |
75 |             json.dump(measurements, fh, indent=4)
76 |
77 |     def merge_from(self, filename: str) -> None:
   |         ^^^^^^^^^^       ------------- Parameter declared here
78 |         """Merge measurements from a file to the current ongoing structure."""
79 |         with open(filename) as fh:
   |
info: rule `invalid-argument-type` is enabled by default

warning[possibly-missing-attribute]: Attribute `login` may be missing on object of type `Unknown | Client | AnonymousClient`
   --> charmcraft/store/store.py:227:27
    |
226 |         try:
227 |             credentials = self._client.login(**kwargs)
    |                           ^^^^^^^^^^^^^^^^^^
228 |         except CredentialsAlreadyAvailable as exc:
229 |             raise CraftError(
    |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `logout` may be missing on object of type `Unknown | Client | AnonymousClient`
   --> charmcraft/store/store.py:241:9
    |
239 |         There's no action really in the Store to logout, we just remove local credentials.
240 |         """
241 |         self._client.logout()
    |         ^^^^^^^^^^^^^^^^^^^
242 |
243 |     @_store_client_wrapper(auto_login=False)
    |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `whoami` may be missing on object of type `Unknown | Client | AnonymousClient`
   --> charmcraft/store/store.py:246:20
    |
244 |     def whoami(self):
245 |         """Return authenticated user details."""
246 |         response = self._client.whoami()
    |                    ^^^^^^^^^^^^^^^^^^^
247 |
248 |         acc = response["account"]
    |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `whoami` may be missing on object of type `Unknown | Client | AnonymousClient`
   --> charmcraft/store/store.py:268:9
    |
266 |     def _check_authorized(self) -> None:
267 |         """Check if current credentials authenticated."""
268 |         self._client.whoami()
    |         ^^^^^^^^^^^^^^^^^^^
269 |
270 |     @_store_client_wrapper()
    |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `unregister_name` may be missing on object of type `Unknown | Client | AnonymousClient`
   --> charmcraft/store/store.py:285:9
    |
283 |         :raises: error messages from craft-store
284 |         """
285 |         self._client.unregister_name(name)
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
286 |
287 |     @_store_client_wrapper()
    |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `push_file` may be missing on object of type `Unknown | Client | AnonymousClient`
   --> charmcraft/store/store.py:311:21
    |
309 |         self._check_authorized()
310 |
311 |         upload_id = self._client.push_file(filepath)
    |                     ^^^^^^^^^^^^^^^^^^^^^^
312 |         payload = {"upload-id": upload_id}
313 |         if extra_fields is not None:
    |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `list_resource_revisions` may be missing on object of type `Unknown | Client | AnonymousClient`
   --> charmcraft/store/store.py:506:16
    |
504 |     ) -> list[CharmResourceRevision]:
505 |         """Return revisions for the indicated charm resource."""
506 |         return self._client.list_resource_revisions(charm_name, resource_name)
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
507 |
508 |     @_store_client_wrapper()
    |
info: rule `possibly-missing-attribute` is enabled by default

error[invalid-argument-type]: Argument to function `__new__` is incorrect
   --> docs/conf.py:241:38
    |
239 | # Setup libraries documentation snippets for use in charmcraft docs.
240 | common_docs_path = pathlib.Path(__file__).parent / "common"
241 | craft_parts_docs_path = pathlib.Path(craft_parts_docs.__file__).parent / "craft-parts"
    |                                      ^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str | PathLike[str]`, found `str | None`
242 | (common_docs_path / "craft-parts").unlink(missing_ok=True)
243 | (common_docs_path / "craft-parts").symlink_to(craft_parts_docs_path, target_is_directory=True)
    |
info: Element `None` of this union is not assignable to `str | PathLike[str]`
info: Function defined here
   --> stdlib/pathlib/__init__.pyi:299:13
    |
297 |         def __new__(cls, *args: StrPath, **kwargs: Unused) -> Self: ...  # pyright: ignore[reportInconsistentConstructor]
298 |     else:
299 |         def __new__(cls, *args: StrPath, **kwargs: Unused) -> Self: ...
    |             ^^^^^^^      -------------- Parameter declared here
300 |
301 |     @classmethod
    |
info: rule `invalid-argument-type` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> docs/howto/code/custom-action-clearsession/clearsession_action_charm.py:10:8
   |
 8 | import typing
 9 |
10 | import ops
   |        ^^^
11 |
12 | import paas_charm.django
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `paas_charm.django`
  --> docs/howto/code/custom-action-clearsession/clearsession_action_charm.py:12:8
   |
10 | import ops
11 |
12 | import paas_charm.django
   |        ^^^^^^^^^^^^^^^^^
13 |
14 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `flask`
 --> docs/howto/code/custom-action-updatelogfile/app.py:3:8
  |
1 | # initial hello world Flask app
2 |
3 | import flask
  |        ^^^^^
4 |
5 | app = flask.Flask(__name__)
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> docs/howto/code/custom-action-updatelogfile/updatelogfile_action_charm.py:10:8
   |
 8 | import typing
 9 |
10 | import ops
   |        ^^^
11 |
12 | import paas_charm.flask
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `paas_charm.flask`
  --> docs/howto/code/custom-action-updatelogfile/updatelogfile_action_charm.py:12:8
   |
10 | import ops
11 |
12 | import paas_charm.flask
   |        ^^^^^^^^^^^^^^^^
13 |
14 | import requests
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `flask`
 --> docs/howto/code/flask-async/app.py:3:8
  |
1 | from time import sleep
2 |
3 | import flask
  |        ^^^^^
4 |
5 | app = flask.Flask(__name__)
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `django.contrib`
  --> docs/tutorial/code/django/urls_django_hello_world.py:17:6
   |
15 |     2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
16 | """
17 | from django.contrib import admin
   |      ^^^^^^^^^^^^^^
18 | from django.urls import include, path
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `django.urls`
  --> docs/tutorial/code/django/urls_django_hello_world.py:18:6
   |
16 | """
17 | from django.contrib import admin
18 | from django.urls import include, path
   |      ^^^^^^^^^^^
19 |
20 | urlpatterns = [
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `django.urls`
 --> docs/tutorial/code/django/urls_greeting.py:1:6
  |
1 | from django.urls import path
  |      ^^^^^^^^^^^
2 |
3 | from . import views
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Module `docs.tutorial.code.django` has no member `views`
 --> docs/tutorial/code/django/urls_greeting.py:3:15
  |
1 | from django.urls import path
2 |
3 | from . import views
  |               ^^^^^
4 |
5 | urlpatterns = [
  |
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `django.http`
 --> docs/tutorial/code/django/views_greeting.py:1:6
  |
1 | from django.http import HttpResponse
  |      ^^^^^^^^^^^
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `django.http`
 --> docs/tutorial/code/django/views_greeting_configuration.py:3:6
  |
1 | import os
2 |
3 | from django.http import HttpResponse
  |      ^^^^^^^^^^^
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `fastapi`
 --> docs/tutorial/code/fastapi/app.py:1:6
  |
1 | from fastapi import FastAPI
  |      ^^^^^^^
2 |
3 | app = FastAPI()
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `fastapi`
 --> docs/tutorial/code/fastapi/greeting_app.py:3:6
  |
1 | import os
2 |
3 | from fastapi import FastAPI
  |      ^^^^^^^
4 |
5 | app = FastAPI()
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `fastapi`
 --> docs/tutorial/code/fastapi/visitors_app.py:7:6
  |
5 | from typing import Annotated
6 |
7 | from fastapi import FastAPI, Header
  |      ^^^^^^^
8 | import psycopg2
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `psycopg2`
  --> docs/tutorial/code/fastapi/visitors_app.py:8:8
   |
 7 | from fastapi import FastAPI, Header
 8 | import psycopg2
   |        ^^^^^^^^
 9 |
10 | app = FastAPI()
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `psycopg2`
 --> docs/tutorial/code/fastapi/visitors_migrate.py:5:8
  |
3 | import os
4 |
5 | import psycopg2
  |        ^^^^^^^^
6 |
7 | DATABASE_URI = os.environ["POSTGRESQL_DB_CONNECT_STRING"]
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `flask`
 --> docs/tutorial/code/flask/app.py:3:8
  |
1 | # initial hello world Flask app
2 |
3 | import flask
  |        ^^^^^
4 |
5 | app = flask.Flask(__name__)
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `flask`
 --> docs/tutorial/code/flask/greeting_app.py:3:8
  |
1 | # Flask app with a greeting configuration
2 |
3 | import flask
  |        ^^^^^
4 |
5 | app = flask.Flask(__name__)
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `flask`
 --> docs/tutorial/code/flask/visitors_app.py:6:8
  |
4 | import os
5 |
6 | import flask
  |        ^^^^^
7 | import psycopg2
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `psycopg2`
 --> docs/tutorial/code/flask/visitors_app.py:7:8
  |
6 | import flask
7 | import psycopg2
  |        ^^^^^^^^
8 |
9 | app = flask.Flask(__name__)
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `psycopg2`
 --> docs/tutorial/code/flask/visitors_migrate.py:5:8
  |
3 | import os
4 |
5 | import psycopg2
  |        ^^^^^^^^
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `list[ResponseCharmResourceBase]`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `datetime`, and 2 more union elements, are not assignable to `list[ResponseCharmResourceBase]`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `datetime`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `datetime`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `str`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `str`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `int`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `int`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `str`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `str`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `str`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `str`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `str`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `str`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `str`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `str`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `ByteSize`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 3 more union elements, are not assignable to `ByteSize`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `str`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `str`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `datetime | None`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `datetime | None`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `str | None`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `str | None`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
    --> tests/commands/test_store_api.py:1628:13
     |
1626 |     expected = {
1627 |         (test_lib_id, test_api): Library(
1628 |             api=test_api,
     |             ^^^^^^^^^^^^ Expected `int`, found `Literal["test-api-version"]`
1629 |             content=test_content,
1630 |             content_hash=test_hash,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
    --> tests/commands/test_store_api.py:1634:13
     |
1632 |             lib_name=test_lib_name,
1633 |             charm_name=test_charm_name,
1634 |             patch=test_patch,
     |             ^^^^^^^^^^^^^^^^ Expected `int`, found `Literal["test-patch-version"]`
1635 |         ),
1636 |     }
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
    --> tests/commands/test_store_api.py:1718:13
     |
1716 |     expected = {
1717 |         (test_lib_id_1, test_api_1): Library(
1718 |             api=test_api_1,
     |             ^^^^^^^^^^^^^^ Expected `int`, found `Literal["test-api-version-1"]`
1719 |             content=test_content_1,
1720 |             content_hash=test_hash_1,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
    --> tests/commands/test_store_api.py:1724:13
     |
1722 |             lib_name=test_lib_name_1,
1723 |             charm_name=test_charm_name_1,
1724 |             patch=test_patch_1,
     |             ^^^^^^^^^^^^^^^^^^ Expected `int`, found `Literal["test-patch-version-1"]`
1725 |         ),
1726 |         (test_lib_id_2, test_api_2): Library(
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
    --> tests/commands/test_store_api.py:1727:13
     |
1725 |         ),
1726 |         (test_lib_id_2, test_api_2): Library(
1727 |             api=test_api_2,
     |             ^^^^^^^^^^^^^^ Expected `int`, found `Literal["test-api-version-2"]`
1728 |             content=test_content_2,
1729 |             content_hash=test_hash_2,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
    --> tests/commands/test_store_api.py:1733:13
     |
1731 |             lib_name=test_lib_name_2,
1732 |             charm_name=test_charm_name_2,
1733 |             patch=test_patch_2,
     |             ^^^^^^^^^^^^^^^^^^ Expected `int`, found `Literal["test-patch-version-2"]`
1734 |         ),
1735 |     }
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-method-override]: Invalid override of method `json`
   --> tests/commands/test_store_client.py:77:9
    |
 75 |           return self.status_code == 200
 76 |
 77 |       def json(self):
    |           ^^^^^^^^^^ Definition is incompatible with `Response.json`
 78 |           try:
 79 |               return json.loads(self._content)  # type: ignore
    |
   ::: .venv/lib/python3.12/site-packages/requests-stubs/models.pyi:155:9
    |
153 |       @property
154 |       def text(self) -> str: ...
155 |       def json(
    |  _________-
156 | |         self,
157 | |         *,
158 | |         cls: type[JSONDecoder] | None = ...,
159 | |         object_hook: Callable[[dict[Any, Any]], Any] | None = ...,
160 | |         parse_float: Callable[[str], Any] | None = ...,
161 | |         parse_int: Callable[[str], Any] | None = ...,
162 | |         parse_constant: Callable[[str], Any] | None = ...,
163 | |         object_pairs_hook: Callable[[list[tuple[Any, Any]]], Any] | None = ...,
164 | |         **kwds: Any,
165 | |     ) -> Any: ...
    | |____________- `Response.json` defined here
166 |       @property
167 |       def links(self) -> dict[Incomplete, Incomplete]: ...
    |
info: This violates the Liskov Substitution Principle
info: rule `invalid-method-override` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/conftest.py:226:9
    |
224 |         build_base=craft_platforms.DistroBase("ubuntu", "22.04"),
225 |         build_on=arch,
226 |         build_for="arm64",
    |         ^^^^^^^^^^^^^^^^^ Expected `DebianArchitecture | Literal["all"]`, found `Literal["arm64"]`
227 |         platform="distro-1-test64",
228 |     )
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-method-override]: Invalid override of method `get_supported_bases`
  --> tests/extensions/test_extensions.py:33:9
   |
32 |     @classmethod
33 |     def get_supported_bases(cls) -> list[tuple[str, ...]]:
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Definition is incompatible with `Extension.get_supported_bases`
34 |         """Return a list of tuple of supported bases."""
35 |         return cls.bases
   |
  ::: charmcraft/extensions/extension.py:52:9
   |
50 |     @staticmethod
51 |     @abc.abstractmethod
52 |     def get_supported_bases() -> list[tuple[str, str]]:
   |         ---------------------------------------------- `Extension.get_supported_bases` defined here
53 |         """Return a list of tuple of supported bases."""
   |
info: `FakeExtension.get_supported_bases` is a classmethod but `Extension.get_supported_bases` is a staticmethod
info: This violates the Liskov Substitution Principle
info: rule `invalid-method-override` is enabled by default

error[invalid-method-override]: Invalid override of method `is_experimental`
  --> tests/extensions/test_extensions.py:38:9
   |
37 |     @staticmethod
38 |     def is_experimental(_base: tuple[str, ...] | None) -> bool:
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Definition is incompatible with `Extension.is_experimental`
39 |         """Return whether or not this extension is unstable for given base."""
40 |         return False
   |
  ::: charmcraft/extensions/extension.py:57:9
   |
55 |     @staticmethod
56 |     @abc.abstractmethod
57 |     def is_experimental(base: tuple[str, str] | None) -> bool:
   |         ----------------------------------------------------- `Extension.is_experimental` defined here
58 |         """Return whether or not this extension is unstable for given base."""
   |
info: This violates the Liskov Substitution Principle
info: rule `invalid-method-override` is enabled by default

error[invalid-method-override]: Invalid override of method `is_experimental`
  --> tests/extensions/test_extensions.py:62:9
   |
61 |     @staticmethod
62 |     def is_experimental(_base: str | None) -> bool:
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Definition is incompatible with `FakeExtension.is_experimental`
63 |         return True
   |
  ::: tests/extensions/test_extensions.py:38:9
   |
37 |     @staticmethod
38 |     def is_experimental(_base: tuple[str, ...] | None) -> bool:
   |         ------------------------------------------------------ `FakeExtension.is_experimental` defined here
39 |         """Return whether or not this extension is unstable for given base."""
40 |         return False
   |
info: This violates the Liskov Substitution Principle
info: rule `invalid-method-override` is enabled by default

error[invalid-method-override]: Invalid override of method `is_experimental`
  --> tests/extensions/test_registry.py:34:9
   |
33 |     @staticmethod
34 |     def is_experimental(_base: tuple[str, str] | None) -> bool:
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Definition is incompatible with `Extension.is_experimental`
35 |         return False
   |
  ::: charmcraft/extensions/extension.py:57:9
   |
55 |     @staticmethod
56 |     @abc.abstractmethod
57 |     def is_experimental(base: tuple[str, str] | None) -> bool:
   |         ----------------------------------------------------- `Extension.is_experimental` defined here
58 |         """Return whether or not this extension is unstable for given base."""
   |
info: This violates the Liskov Substitution Principle
info: rule `invalid-method-override` is enabled by default

warning[possibly-missing-attribute]: Submodule `application` may not be available as an attribute on module `charmcraft`
  --> tests/integration/commands/test_init.py:75:17
   |
73 | def init_command():
74 |     return init.InitCommand(
75 |         {"app": charmcraft.application.APP_METADATA, "services": None}
   |                 ^^^^^^^^^^^^^^^^^^^^^^
76 |     )
   |
help: Consider explicitly importing `charmcraft.application`
info: rule `possibly-missing-attribute` is enabled by default

error[unresolved-attribute]: Object of type `RecordingEmitter` has no attribute `assert_json_output`
   --> tests/integration/commands/test_store_commands.py:225:9
    |
223 |             },
224 |         ]
225 |         emitter.assert_json_output(  # pyright: ignore[reportAttributeAccessIssue]
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^
226 |             expected
227 |         )
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Unresolved attribute `client` on type `AppService`.
  --> tests/integration/conftest.py:45:5
   |
43 |     services.register_services()
44 |     factory = craft_application.ServiceFactory(app=application.APP_METADATA)
45 |     factory.get("store").client = mock.Mock(spec_set=craft_store.StoreClient)  # pyright: ignore[reportAttributeAccessIssue]
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
46 |     factory.update_kwargs(
47 |         "charm_libs",
   |
info: rule `unresolved-attribute` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
  --> tests/integration/services/test_image.py:28:9
   |
26 |     service = ImageService(
27 |         app=application.APP_METADATA,
28 |         services=None,  # pyright: ignore[reportArgumentType]
   |         ^^^^^^^^^^^^^ Expected `ServiceFactory`, found `None`
29 |     )
30 |     service.setup()
   |
info: Method defined here
  --> .venv/lib/python3.12/site-packages/craft_application/services/base.py:44:9
   |
42 |     """
43 |
44 |     def __init__(self, app: AppMetadata, services: ServiceFactory) -> None:
   |         ^^^^^^^^                         ------------------------ Parameter declared here
45 |         self._app = app
46 |         self._services = services
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/integration/services/test_lifecycle.py:40:17
   |
38 |                 platform="something",
39 |                 build_on=craft_platforms.DebianArchitecture.from_host(),
40 |                 build_for="invalid",  # pyright: ignore[reportArgumentType]
   |                 ^^^^^^^^^^^^^^^^^^^ Expected `DebianArchitecture | Literal["all"]`, found `Literal["invalid"]`
41 |                 build_base=craft_platforms.DistroBase(distro.id(), distro.version()),
42 |             )
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/integration/services/test_lifecycle.py:88:17
   |
86 |                 platform="something",
87 |                 build_on=host_arch,
88 |                 build_for=f"{foreign_arch}-{host_arch}",  # pyright: ignore[reportArgumentType]
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `DebianArchitecture | Literal["all"]`, found `str`
89 |                 build_base=craft_platforms.DistroBase(distro.id(), distro.version()),
90 |             )
   |
info: rule `invalid-argument-type` is enabled by default

error[unresolved-import]: Cannot resolve imported module `charm`
  --> tests/spread/commands/init-extensions/tests/unit/test_charm.py:9:8
   |
 7 | import pathlib
 8 |
 9 | import charm
   |        ^^^^^
10 | import scenario
11 | import scenario.errors
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `scenario`
  --> tests/spread/commands/init-extensions/tests/unit/test_charm.py:10:8
   |
 9 | import charm
10 | import scenario
   |        ^^^^^^^^
11 | import scenario.errors
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `scenario.errors`
  --> tests/spread/commands/init-extensions/tests/unit/test_charm.py:11:8
   |
 9 | import charm
10 | import scenario
11 | import scenario.errors
   |        ^^^^^^^^^^^^^^^
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/dependencies/setuptools-scm-python/src/charm.py:9:8
   |
 7 | import logging
 8 |
 9 | import ops
   |        ^^^
10 |
11 | # A standalone module for workload-specific logic (no charming concerns):
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `setuptools_scm_python`
  --> tests/spread/dependencies/setuptools-scm-python/src/charm.py:12:8
   |
11 | # A standalone module for workload-specific logic (no charming concerns):
12 | import setuptools_scm_python
   |        ^^^^^^^^^^^^^^^^^^^^^
13 |
14 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/dependencies/strict-dependencies-errors/extra-binary-packages/src/charm.py:17:8
   |
15 | import logging
16 |
17 | import ops
   |        ^^^
18 |
19 | # Log messages can be retrieved using juju debug-log
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/dependencies/strict-dependencies-errors/extra-packages/src/charm.py:17:8
   |
15 | import logging
16 |
17 | import ops
   |        ^^^
18 |
19 | # Log messages can be retrieved using juju debug-log
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/dependencies/strict-dependencies-errors/missing-packages/src/charm.py:17:8
   |
15 | import logging
16 |
17 | import ops
   |        ^^^
18 |
19 | # Log messages can be retrieved using juju debug-log
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/dependencies/strict-dependencies-errors/no-requirements/src/charm.py:17:8
   |
15 | import logging
16 |
17 | import ops
   |        ^^^
18 |
19 | # Log messages can be retrieved using juju debug-log
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/dependencies/strict-dependencies/charm/src/charm.py:17:8
   |
15 | import logging
16 |
17 | import ops
   |        ^^^
18 |
19 | # Log messages can be retrieved using juju debug-log
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `charms.reactive`
 --> tests/spread/smoketests/reactive/reactivecharm/reactive/reactivecharm.py:1:6
  |
1 | from charms.reactive import set_flag, when_not
  |      ^^^^^^^^^^^^^^^
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/ubuntu-20.04/charm/bases/src/charm.py:18:8
   |
16 | from typing import cast
17 |
18 | import ops
   |        ^^^
19 |
20 | # Log messages can be retrieved using juju debug-log
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/ubuntu-20.04/charm/platforms/src/charm.py:9:8
   |
 7 | import logging
 8 |
 9 | import ops
   |        ^^^
10 |
11 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/ubuntu-22.04/charm/bases/src/charm.py:18:8
   |
16 | from typing import cast
17 |
18 | import ops
   |        ^^^
19 |
20 | # Log messages can be retrieved using juju debug-log
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/ubuntu-22.04/charm/platforms/src/charm.py:9:8
   |
 7 | import logging
 8 |
 9 | import ops
   |        ^^^
10 |
11 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/ubuntu-24.04/charm/platforms/src/charm.py:9:8
   |
 7 | import logging
 8 |
 9 | import ops
   |        ^^^
10 |
11 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
 --> tests/spread/ubuntu-24.04/test-cmd/src/charm.py:6:8
  |
4 | import logging
5 |
6 | import ops
  |        ^^^
7 |
8 | # A standalone module for workload-specific logic (no charming concerns):
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `test_cmd`
  --> tests/spread/ubuntu-24.04/test-cmd/src/charm.py:9:8
   |
 8 | # A standalone module for workload-specific logic (no charming concerns):
 9 | import test_cmd
   |        ^^^^^^^^
10 |
11 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `pytest_operator.plugin`
 --> tests/spread/ubuntu-24.04/test-cmd/tests/integration/test_charm.py:7:6
  |
5 | import pytest
6 | import yaml
7 | from pytest_operator.plugin import OpsTest
  |      ^^^^^^^^^^^^^^^^^^^^^^
8 |
9 | logger = logging.getLogger(__name__)
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
 --> tests/spread/ubuntu-24.04/test-cmd/tests/unit/test_charm.py:2:6
  |
1 | import pytest
2 | from ops import testing
  |      ^^^
3 |
4 | from charm import TestCmdCharm
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `charm`
 --> tests/spread/ubuntu-24.04/test-cmd/tests/unit/test_charm.py:4:6
  |
2 | from ops import testing
3 |
4 | from charm import TestCmdCharm
  |      ^^^^^
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/ubuntu-25.10/charm/platforms/src/charm.py:9:8
   |
 7 | import logging
 8 |
 9 | import ops
   |        ^^^
10 |
11 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
 --> tests/spread/ubuntu-25.10/test-cmd/src/charm.py:6:8
  |
4 | import logging
5 |
6 | import ops
  |        ^^^
7 |
8 | # A standalone module for workload-specific logic (no charming concerns):
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `test_cmd`
  --> tests/spread/ubuntu-25.10/test-cmd/src/charm.py:9:8
   |
 8 | # A standalone module for workload-specific logic (no charming concerns):
 9 | import test_cmd
   |        ^^^^^^^^
10 |
11 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `pytest_operator.plugin`
 --> tests/spread/ubuntu-25.10/test-cmd/tests/integration/test_charm.py:7:6
  |
5 | import pytest
6 | import yaml
7 | from pytest_operator.plugin import OpsTest
  |      ^^^^^^^^^^^^^^^^^^^^^^
8 |
9 | logger = logging.getLogger(__name__)
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
 --> tests/spread/ubuntu-25.10/test-cmd/tests/unit/test_charm.py:2:6
  |
1 | import pytest
2 | from ops import testing
  |      ^^^
3 |
4 | from charm import TestCmdCharm
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `charm`
 --> tests/spread/ubuntu-25.10/test-cmd/tests/unit/test_charm.py:4:6
  |
2 | from ops import testing
3 |
4 | from charm import TestCmdCharm
  |      ^^^^^
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/ubuntu-26.04/charm/platforms/src/charm.py:9:8
   |
 7 | import logging
 8 |
 9 | import ops
   |        ^^^
10 |
11 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
 --> tests/spread/ubuntu-26.04/test-cmd/src/charm.py:6:8
  |
4 | import logging
5 |
6 | import ops
  |        ^^^
7 |
8 | # A standalone module for workload-specific logic (no charming concerns):
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `test_cmd`
  --> tests/spread/ubuntu-26.04/test-cmd/src/charm.py:9:8
   |
 8 | # A standalone module for workload-specific logic (no charming concerns):
 9 | import test_cmd
   |        ^^^^^^^^
10 |
11 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `pytest_operator.plugin`
 --> tests/spread/ubuntu-26.04/test-cmd/tests/integration/test_charm.py:7:6
  |
5 | import pytest
6 | import yaml
7 | from pytest_operator.plugin import OpsTest
  |      ^^^^^^^^^^^^^^^^^^^^^^
8 |
9 | logger = logging.getLogger(__name__)
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
 --> tests/spread/ubuntu-26.04/test-cmd/tests/unit/test_charm.py:2:6
  |
1 | import pytest
2 | from ops import testing
  |      ^^^
3 |
4 | from charm import TestCmdCharm
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `charm`
 --> tests/spread/ubuntu-26.04/test-cmd/tests/unit/test_charm.py:4:6
  |
2 | from ops import testing
3 |
4 | from charm import TestCmdCharm
  |      ^^^^^
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/562/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/562/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
   --> tests/test_instrum.py:256:32
    |
254 |     assert measurements.measurements == {}
255 |
256 |     with Timer("test message", foo=42):
    |                                ^^^^^^ Expected `dict[str, Any]`, found `Literal[42]`
257 |         pass
    |
info: Method defined here
   --> charmcraft/instrum.py:129:9
    |
127 |     """
128 |
129 |     def __init__(self, msg: str, **extra_info: dict[str, Any]):
    |         ^^^^^^^^                 ---------------------------- Parameter declared here
130 |         self.msg = msg
131 |         self.extra_info = extra_info
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
   --> tests/test_instrum.py:274:28
    |
272 |     monkeypatch.setattr(instrum, "_measurements", measurements)
273 |
274 |     @Timer("test message", foo=42)
    |                            ^^^^^^ Expected `dict[str, Any]`, found `Literal[42]`
275 |     def test_function(a, b):
276 |         assert a == 17
    |
info: Method defined here
   --> charmcraft/instrum.py:129:9
    |
127 |     """
128 |
129 |     def __init__(self, msg: str, **extra_info: dict[str, Any]):
    |         ^^^^^^^^                 ---------------------------- Parameter declared here
130 |         self.msg = msg
131 |         self.extra_info = extra_info
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
   --> tests/test_instrum.py:298:32
    |
296 |     assert measurements.measurements == {}
297 |
298 |     with Timer("test message", foo=42) as timer:
    |                                ^^^^^^ Expected `dict[str, Any]`, found `Literal[42]`
299 |         timer.mark("middle 1")
300 |         timer.mark("middle 2")
    |
info: Method defined here
   --> charmcraft/instrum.py:129:9
    |
127 |     """
128 |
129 |     def __init__(self, msg: str, **extra_info: dict[str, Any]):
    |         ^^^^^^^^                 ---------------------------- Parameter declared here
130 |         self.msg = msg
131 |         self.extra_info = extra_info
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-assignment]: Implicit shadowing of function `write`
  --> tests/unit/commands/test_lifecycle.py:91:5
   |
90 |     libs_service = cast("CharmLibsService", service_factory.get("charm_libs"))
91 |     libs_service.write = mock.Mock(wraps=libs_service.write)
   |     ^^^^^^^^^^^^^^^^^^
92 |
93 |     pack._update_charm_libs()
   |
info: Annotate to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[unresolved-attribute]: Object of type `bound method CharmLibsService.write(library: Library) -> None` has no attribute `assert_called_once_with`
  --> tests/unit/commands/test_lifecycle.py:95:5
   |
93 |     pack._update_charm_libs()
94 |
95 |     libs_service.write.assert_called_once_with(store_lib)
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
96 |
97 |     with check():
   |
info: rule `unresolved-attribute` is enabled by default

error[non-subscriptable]: Cannot subscript object of type `None` with no `__getitem__` method
  --> tests/unit/models/test_config.py:75:23
   |
73 |     config = JujuConfig(options={"my-opt": option})
74 |
75 |     assert isinstance(config.options["my-opt"], type_)
   |                       ^^^^^^^^^^^^^^^^^^^^^^^^
   |
info: rule `non-subscriptable` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/unit/models/test_project.py:813:13
    |
811 |             description="",
812 |             base=base,
813 |             platforms={"amd64": None},
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `PlatformsDict`, found `dict[Unknown | str, Unknown | None]`
814 |             parts={"charm": {"plugin": "charm"}},
815 |         )
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `__new__` is incorrect
  --> tests/unit/parts/plugins/test_charm.py:97:22
   |
96 |     pip_constraint_file = (
97 |         pathlib.Path(parts.plugins.__file__).parent / "charm-constraints.txt"
   |                      ^^^^^^^^^^^^^^^^^^^^^^ Expected `str | PathLike[str]`, found `str | None`
98 |     )
   |
info: Element `None` of this union is not assignable to `str | PathLike[str]`
info: Function defined here
   --> stdlib/pathlib/__init__.pyi:299:13
    |
297 |         def __new__(cls, *args: StrPath, **kwargs: Unused) -> Self: ...  # pyright: ignore[reportInconsistentConstructor]
298 |     else:
299 |         def __new__(cls, *args: StrPath, **kwargs: Unused) -> Self: ...
    |             ^^^^^^^      -------------- Parameter declared here
300 |
301 |     @classmethod
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-assignment]: Implicit shadowing of function `_get_pip`
  --> tests/unit/parts/plugins/test_poetry.py:40:5
   |
39 | def test_get_pip_install_commands(poetry_plugin: plugins.PoetryPlugin):
40 |     poetry_plugin._get_pip = lambda: "/python -m pip"
   |     ^^^^^^^^^^^^^^^^^^^^^^
41 |
42 |     assert poetry_plugin._get_pip_install_commands(
   |
info: Annotate to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Implicit shadowing of function `_get_pip`
  --> tests/unit/parts/plugins/test_python.py:62:5
   |
60 |     }
61 |     python_plugin._options = plugins.PythonPluginProperties.unmarshal(spec)
62 |     python_plugin._get_pip = lambda: "/python -m pip"
   |     ^^^^^^^^^^^^^^^^^^^^^^
63 |     copy_src_cmd = (
64 |         f"cp --archive --recursive --reflink=auto {build_path}/src {install_path}"
   |
info: Annotate to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
   --> tests/unit/services/test_analysis.py:112:67
    |
110 | @pytest.fixture
111 | def analysis_service():
112 |     return analysis.AnalysisService(app=application.APP_METADATA, services=None)
    |                                                                   ^^^^^^^^^^^^^ Expected `ServiceFactory`, found `None`
    |
info: Method defined here
  --> charmcraft/services/analysis.py:37:9
   |
35 |     _project: models.CharmcraftProject  # type: ignore[assignment]
36 |
37 |     def __init__(  # (too many arguments)
   |         ^^^^^^^^
38 |         self,
39 |         app: craft_application.AppMetadata,
40 |         services: craft_application.ServiceFactory,
   |         ------------------------------------------ Parameter declared here
41 |     ) -> None:
42 |         super().__init__(app, services)
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/unit/services/test_lifecycle.py:55:17
   |
53 |                 platform="something",
54 |                 build_on=HOST_ARCH,
55 |                 build_for=plan_build_for,  # pyright: ignore[reportArgumentType]
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^ Expected `DebianArchitecture | Literal["all"]`, found `str`
56 |             )
57 |         ]
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/unit/services/test_lifecycle.py:94:17
   |
92 |                 platform="something",
93 |                 build_on=HOST_ARCH,
94 |                 build_for=f"{HOST_ARCH}-foreign",  # pyright: ignore[reportArgumentType]
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `DebianArchitecture | Literal["all"]`, found `str`
95 |             )
96 |         ]
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
  --> tests/unit/services/test_project.py:34:45
   |
32 | @pytest.fixture
33 | def service(project_path):
34 |     return ProjectService(app=APP_METADATA, services=None, project_dir=project_path)
   |                                             ^^^^^^^^^^^^^ Expected `ServiceFactory`, found `None`
   |
info: Method defined here
  --> .venv/lib/python3.12/site-packages/craft_application/services/project.py:57:9
   |
55 |     _project_model: models.Project | None
56 |
57 |     def __init__(
   |         ^^^^^^^^
58 |         self, app: AppMetadata, services: ServiceFactory, *, project_dir: pathlib.Path
   |                                 ------------------------ Parameter declared here
59 |     ) -> None:
60 |         super().__init__(app, services)
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
   --> tests/unit/services/test_provider.py:123:9
    |
121 |     provider_service = ProviderService(
122 |         app=APP_METADATA,
123 |         services=None,  # pyright: ignore[reportArgumentType]
    |         ^^^^^^^^^^^^^ Expected `ServiceFactory`, found `None`
124 |         work_dir=tmp_path,
125 |     )
    |
info: Method defined here
  --> charmcraft/services/provider.py:43:9
   |
41 |     """Business logic for getting providers."""
42 |
43 |     def __init__(
   |         ^^^^^^^^
44 |         self,
45 |         app: craft_application.AppMetadata,
46 |         services: craft_application.ServiceFactory,
   |         ------------------------------------------ Parameter declared here
47 |         *,
48 |         work_dir: pathlib.Path,
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
  --> tests/unit/services/test_store.py:50:56
   |
48 | @pytest.fixture(scope="module")
49 | def reusable_store():
50 |     store = StoreService(app=application.APP_METADATA, services=None)
   |                                                        ^^^^^^^^^^^^^ Expected `ServiceFactory`, found `None`
51 |     store.client = mock.Mock(spec_set=craft_store.StoreClient)
52 |     store._publisher = mock.Mock(spec_set=craft_store.PublisherGateway)
   |
info: Method defined here
  --> .venv/lib/python3.12/site-packages/craft_application/services/base.py:44:9
   |
42 |     """
43 |
44 |     def __init__(self, app: AppMetadata, services: ServiceFactory) -> None:
   |         ^^^^^^^^                         ------------------------ Parameter declared here
45 |         self._app = app
46 |         self._services = services
   |
info: rule `invalid-argument-type` is enabled by default

warning[possibly-missing-attribute]: Attribute `group` may be missing on object of type `Match[str] | None`
  --> tests/unit/test_linters.py:43:12
   |
41 | )
42 | def test_fuzz_python_name_regex(name, next_char, further_garbage):
43 |     assert linters.PYTHON_NAME_REGEX.match(name).group(0) == name
   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
44 |     assert linters.PYTHON_NAME_REGEX.match(f"{name}{next_char}").group(0) == name
45 |     assert (
   |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `group` may be missing on object of type `Match[str] | None`
  --> tests/unit/test_linters.py:44:12
   |
42 | def test_fuzz_python_name_regex(name, next_char, further_garbage):
43 |     assert linters.PYTHON_NAME_REGEX.match(name).group(0) == name
44 |     assert linters.PYTHON_NAME_REGEX.match(f"{name}{next_char}").group(0) == name
   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
45 |     assert (
46 |         linters.PYTHON_NAME_REGEX.match(f"{name}{next_char}{further_garbage}").group(0)
   |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `group` may be missing on object of type `Match[str] | None`
  --> tests/unit/test_linters.py:46:9
   |
44 |     assert linters.PYTHON_NAME_REGEX.match(f"{name}{next_char}").group(0) == name
45 |     assert (
46 |         linters.PYTHON_NAME_REGEX.match(f"{name}{next_char}{further_garbage}").group(0)
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
47 |         == name
48 |     )
   |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `group` may be missing on object of type `Match[str] | None`
  --> tests/unit/test_linters.py:62:12
   |
60 | )
61 | def test_min_version_regex_matches(string, expected):
62 |     assert linters.MIN_VERSION_REGEX.search(string).group(1) == expected
   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `group` may be missing on object of type `Match[str] | None`
  --> tests/unit/test_linters.py:76:24
   |
74 | )
75 | def test_approx_version_regex_matches(string, expected):
76 |     assert expected in linters.APPROX_VERSION_REGEX.search(string).group(1, 2)
   |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `group` may be missing on object of type `Match[str] | None`
  --> tests/unit/test_linters.py:84:12
   |
82 | )
83 | def test_exact_version_regex_matches(string, expected):
84 |     assert linters.EXACT_VERSION_REGEX.search(string).group(1) == expected
   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
info: rule `possibly-missing-attribute` is enabled by default

error[no-matching-overload]: No overload of function `format_content` matches arguments
   --> tests/unit/utils/test_cli.py:285:9
    |
283 | def test_format_content_invalid(fmt):
284 |     with pytest.raises(ValueError, match="^Unknown output format "):
285 |         format_content(None, fmt)
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^
    |
info: First overload defined here
   --> charmcraft/utils/cli.py:185:5
    |
184 |   @overload
185 |   def format_content(
    |  _____^
186 | |     content: dict[str, Any] | list[dict[str, Any]], fmt: OutputFormat | str | None
187 | | ) -> str: ...
    | |________^
    |
info: Possible overloads for function `format_content`:
info:   (content: dict[str, Any] | list[dict[str, Any]], fmt: OutputFormat | str | None) -> str
info:   (content: str | Real | list[Unknown] | dict[Unknown, Unknown], fmt: OutputFormat | str | None) -> str
info: Overload implementation defined here
   --> charmcraft/utils/cli.py:196:5
    |
196 | def format_content(content, fmt=None):
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
197 |     """Format command output."""
198 |     if not isinstance(fmt, OutputFormat):
    |
info: rule `no-matching-overload` is enabled by default

Found 125 diagnostics

@lengau
Copy link
Copy Markdown
Collaborator

lengau commented Dec 6, 2025

@copilot please do the thing

Added back the deprecation message to the charmhub field while still excluding it from the JSON schema.

Co-authored-by: lengau <4305943+lengau@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Dec 6, 2025

@copilot please do the thing

Done! I've restored the deprecation message for the charmhub field in commit 076c27c. The field now shows deprecation warnings when used, while still being excluded from the JSON schema.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Dec 6, 2025

Type checking with ty failed. This is a notification only and does not require action.

Command output
warning[possibly-missing-attribute]: Attribute `bases` may be missing on object of type `PlatformCharm | BasesCharm`
   --> charmcraft/application/commands/lifecycle.py:119:36
    |
118 |         msg = "Bases index '{}' is invalid (must be >= 0 and fit in configured bases)."
119 |         len_configured_bases = len(project.bases)
    |                                    ^^^^^^^^^^^^^
120 |         for bases_index in bases_indices:
121 |             if bases_index < 0:
    |
info: rule `possibly-missing-attribute` is enabled by default

error[unresolved-attribute]: Object of type `AppService | type[AppService]` has no attribute `get_credentials`
   --> charmcraft/application/commands/store.py:210:27
    |
209 |         if parsed_args.export:
210 |             credentials = self._services.store.get_credentials(
    |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
211 |                 packages=packages, **kwargs
212 |             )
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `AppService | type[AppService]` has no attribute `login`
   --> charmcraft/application/commands/store.py:218:13
    |
216 |             )
217 |         else:
218 |             self._services.store.login(packages=packages, **kwargs)
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^
219 |             username = self._services.store.get_account_info()["username"]
220 |             emit.message(f"Logged in as {username!r}.")
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `AppService | type[AppService]` has no attribute `get_account_info`
   --> charmcraft/application/commands/store.py:219:24
    |
217 |         else:
218 |             self._services.store.login(packages=packages, **kwargs)
219 |             username = self._services.store.get_account_info()["username"]
    |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
220 |             emit.message(f"Logged in as {username!r}.")
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `AppService | type[AppService]` has no attribute `logout`
   --> charmcraft/application/commands/store.py:244:13
    |
242 |         """Run the command."""
243 |         try:
244 |             self._services.store.logout()
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
245 |             emit.message("Charmhub token cleared.")
246 |         except CredentialsUnavailable:
    |
info: rule `unresolved-attribute` is enabled by default

error[not-iterable]: Object of type `IO[str] | None` may not be iterable
   --> charmcraft/charm_builder.py:423:17
    |
422 |     # https://github.com/microsoft/pylance-release/issues/2385
423 |     for line in proc.stdout:  # pyright: ignore[reportOptionalIterable]
    |                 ^^^^^^^^^^^
424 |         print(f"   :: {line.rstrip()}")
425 |     retcode = proc.wait()
    |
info: It may not have an `__iter__` method and it doesn't have a `__getitem__` method
info: rule `not-iterable` is enabled by default

warning[possibly-missing-attribute]: Attribute `split` may be missing on object of type `str | None`
   --> charmcraft/linters.py:238:23
    |
236 |                     yield name.name.split(".")
237 |             elif isinstance(node, ast.ImportFrom):
238 |                 yield node.module.split(".")
    |                       ^^^^^^^^^^^^^^^^^
239 |
240 |     def _check_operator(self, basedir: pathlib.Path) -> bool:
    |
info: rule `possibly-missing-attribute` is enabled by default

error[invalid-argument-type]: Argument to function `quote` is incorrect
   --> charmcraft/parts/plugins/_charm.py:289:42
    |
287 |             build_cmd.extend(self._get_legacy_dependencies_parameters())
288 |
289 |         commands = [" ".join(shlex.quote(i) for i in build_cmd)]
    |                                          ^ Expected `str`, found `Unknown | str | None`
290 |
291 |         # hook a callback after the BUILD happened (to collect metrics left by charm builder)
    |
info: Element `None` of this union is not assignable to `str`
info: Function defined here
  --> stdlib/shlex.pyi:34:5
   |
32 |     """Return a shell-escaped string from *split_command*."""
33 |
34 | def quote(s: str) -> str:
   |     ^^^^^ ------ Parameter declared here
35 |     """Return a shell-escaped version of the string *s*."""
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `merge_from` is incorrect
   --> charmcraft/parts/plugins/_charm.py:341:28
    |
339 |     def post_build_callback(self, step_info):
340 |         """Collect metrics left by charm_builder.py."""
341 |         instrum.merge_from(env.get_charm_builder_metrics_path())
    |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str`, found `Path`
342 |
343 |     def _get_os_special_priority_paths(self) -> str | None:
    |
info: Method defined here
  --> charmcraft/instrum.py:77:9
   |
75 |             json.dump(measurements, fh, indent=4)
76 |
77 |     def merge_from(self, filename: str) -> None:
   |         ^^^^^^^^^^       ------------- Parameter declared here
78 |         """Merge measurements from a file to the current ongoing structure."""
79 |         with open(filename) as fh:
   |
info: rule `invalid-argument-type` is enabled by default

warning[possibly-missing-attribute]: Attribute `login` may be missing on object of type `Unknown | Client | AnonymousClient`
   --> charmcraft/store/store.py:227:27
    |
226 |         try:
227 |             credentials = self._client.login(**kwargs)
    |                           ^^^^^^^^^^^^^^^^^^
228 |         except CredentialsAlreadyAvailable as exc:
229 |             raise CraftError(
    |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `logout` may be missing on object of type `Unknown | Client | AnonymousClient`
   --> charmcraft/store/store.py:241:9
    |
239 |         There's no action really in the Store to logout, we just remove local credentials.
240 |         """
241 |         self._client.logout()
    |         ^^^^^^^^^^^^^^^^^^^
242 |
243 |     @_store_client_wrapper(auto_login=False)
    |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `whoami` may be missing on object of type `Unknown | Client | AnonymousClient`
   --> charmcraft/store/store.py:246:20
    |
244 |     def whoami(self):
245 |         """Return authenticated user details."""
246 |         response = self._client.whoami()
    |                    ^^^^^^^^^^^^^^^^^^^
247 |
248 |         acc = response["account"]
    |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `whoami` may be missing on object of type `Unknown | Client | AnonymousClient`
   --> charmcraft/store/store.py:268:9
    |
266 |     def _check_authorized(self) -> None:
267 |         """Check if current credentials authenticated."""
268 |         self._client.whoami()
    |         ^^^^^^^^^^^^^^^^^^^
269 |
270 |     @_store_client_wrapper()
    |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `unregister_name` may be missing on object of type `Unknown | Client | AnonymousClient`
   --> charmcraft/store/store.py:285:9
    |
283 |         :raises: error messages from craft-store
284 |         """
285 |         self._client.unregister_name(name)
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
286 |
287 |     @_store_client_wrapper()
    |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `push_file` may be missing on object of type `Unknown | Client | AnonymousClient`
   --> charmcraft/store/store.py:311:21
    |
309 |         self._check_authorized()
310 |
311 |         upload_id = self._client.push_file(filepath)
    |                     ^^^^^^^^^^^^^^^^^^^^^^
312 |         payload = {"upload-id": upload_id}
313 |         if extra_fields is not None:
    |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `list_resource_revisions` may be missing on object of type `Unknown | Client | AnonymousClient`
   --> charmcraft/store/store.py:506:16
    |
504 |     ) -> list[CharmResourceRevision]:
505 |         """Return revisions for the indicated charm resource."""
506 |         return self._client.list_resource_revisions(charm_name, resource_name)
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
507 |
508 |     @_store_client_wrapper()
    |
info: rule `possibly-missing-attribute` is enabled by default

error[invalid-argument-type]: Argument to function `__new__` is incorrect
   --> docs/conf.py:242:38
    |
240 | # Setup libraries documentation snippets for use in charmcraft docs.
241 | common_docs_path = pathlib.Path(__file__).parent / "common"
242 | craft_parts_docs_path = pathlib.Path(craft_parts_docs.__file__).parent / "craft-parts"
    |                                      ^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str | PathLike[str]`, found `str | None`
243 | (common_docs_path / "craft-parts").unlink(missing_ok=True)
244 | (common_docs_path / "craft-parts").symlink_to(craft_parts_docs_path, target_is_directory=True)
    |
info: Element `None` of this union is not assignable to `str | PathLike[str]`
info: Function defined here
   --> stdlib/pathlib/__init__.pyi:299:13
    |
297 |         def __new__(cls, *args: StrPath, **kwargs: Unused) -> Self: ...  # pyright: ignore[reportInconsistentConstructor]
298 |     else:
299 |         def __new__(cls, *args: StrPath, **kwargs: Unused) -> Self: ...
    |             ^^^^^^^      -------------- Parameter declared here
300 |
301 |     @classmethod
    |
info: rule `invalid-argument-type` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> docs/howto/code/custom-action-clearsession/clearsession_action_charm.py:10:8
   |
 8 | import typing
 9 |
10 | import ops
   |        ^^^
11 |
12 | import paas_charm.django
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/571/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/571/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `paas_charm.django`
  --> docs/howto/code/custom-action-clearsession/clearsession_action_charm.py:12:8
   |
10 | import ops
11 |
12 | import paas_charm.django
   |        ^^^^^^^^^^^^^^^^^
13 |
14 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/571/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/571/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `flask`
 --> docs/howto/code/custom-action-updatelogfile/app.py:3:8
  |
1 | # initial hello world Flask app
2 |
3 | import flask
  |        ^^^^^
4 |
5 | app = flask.Flask(__name__)
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/571/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/571/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> docs/howto/code/custom-action-updatelogfile/updatelogfile_action_charm.py:10:8
   |
 8 | import typing
 9 |
10 | import ops
   |        ^^^
11 |
12 | import paas_charm.flask
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/571/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/571/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `paas_charm.flask`
  --> docs/howto/code/custom-action-updatelogfile/updatelogfile_action_charm.py:12:8
   |
10 | import ops
11 |
12 | import paas_charm.flask
   |        ^^^^^^^^^^^^^^^^
13 |
14 | import requests
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/571/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/571/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `flask`
 --> docs/howto/code/flask-async/app.py:3:8
  |
1 | from time import sleep
2 |
3 | import flask
  |        ^^^^^
4 |
5 | app = flask.Flask(__name__)
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/571/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/571/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `django.contrib`
  --> docs/tutorial/code/django/urls_django_hello_world.py:17:6
   |
15 |     2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
16 | """
17 | from django.contrib import admin
   |      ^^^^^^^^^^^^^^
18 | from django.urls import include, path
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/571/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/571/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `django.urls`
  --> docs/tutorial/code/django/urls_django_hello_world.py:18:6
   |
16 | """
17 | from django.contrib import admin
18 | from django.urls import include, path
   |      ^^^^^^^^^^^
19 |
20 | urlpatterns = [
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/571/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/571/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `django.urls`
 --> docs/tutorial/code/django/urls_greeting.py:1:6
  |
1 | from django.urls import path
  |      ^^^^^^^^^^^
2 |
3 | from . import views
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/571/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/571/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Module `docs.tutorial.code.django` has no member `views`
 --> docs/tutorial/code/django/urls_greeting.py:3:15
  |
1 | from django.urls import path
2 |
3 | from . import views
  |               ^^^^^
4 |
5 | urlpatterns = [
  |
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `django.http`
 --> docs/tutorial/code/django/views_greeting.py:1:6
  |
1 | from django.http import HttpResponse
  |      ^^^^^^^^^^^
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/571/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/571/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `django.http`
 --> docs/tutorial/code/django/views_greeting_configuration.py:3:6
  |
1 | import os
2 |
3 | from django.http import HttpResponse
  |      ^^^^^^^^^^^
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/571/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/571/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `fastapi`
 --> docs/tutorial/code/fastapi/app.py:1:6
  |
1 | from fastapi import FastAPI
  |      ^^^^^^^
2 |
3 | app = FastAPI()
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/571/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/571/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `fastapi`
 --> docs/tutorial/code/fastapi/greeting_app.py:3:6
  |
1 | import os
2 |
3 | from fastapi import FastAPI
  |      ^^^^^^^
4 |
5 | app = FastAPI()
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/571/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/571/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `fastapi`
 --> docs/tutorial/code/fastapi/visitors_app.py:7:6
  |
5 | from typing import Annotated
6 |
7 | from fastapi import FastAPI, Header
  |      ^^^^^^^
8 | import psycopg2
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/571/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/571/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `psycopg2`
  --> docs/tutorial/code/fastapi/visitors_app.py:8:8
   |
 7 | from fastapi import FastAPI, Header
 8 | import psycopg2
   |        ^^^^^^^^
 9 |
10 | app = FastAPI()
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/571/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/571/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `psycopg2`
 --> docs/tutorial/code/fastapi/visitors_migrate.py:5:8
  |
3 | import os
4 |
5 | import psycopg2
  |        ^^^^^^^^
6 |
7 | DATABASE_URI = os.environ["POSTGRESQL_DB_CONNECT_STRING"]
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/571/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/571/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `flask`
 --> docs/tutorial/code/flask/app.py:3:8
  |
1 | # initial hello world Flask app
2 |
3 | import flask
  |        ^^^^^
4 |
5 | app = flask.Flask(__name__)
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/571/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/571/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `flask`
 --> docs/tutorial/code/flask/greeting_app.py:3:8
  |
1 | # Flask app with a greeting configuration
2 |
3 | import flask
  |        ^^^^^
4 |
5 | app = flask.Flask(__name__)
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/571/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/571/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `flask`
 --> docs/tutorial/code/flask/visitors_app.py:6:8
  |
4 | import os
5 |
6 | import flask
  |        ^^^^^
7 | import psycopg2
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/571/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/571/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `psycopg2`
 --> docs/tutorial/code/flask/visitors_app.py:7:8
  |
6 | import flask
7 | import psycopg2
  |        ^^^^^^^^
8 |
9 | app = flask.Flask(__name__)
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/571/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/571/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `psycopg2`
 --> docs/tutorial/code/flask/visitors_migrate.py:5:8
  |
3 | import os
4 |
5 | import psycopg2
  |        ^^^^^^^^
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/571/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/571/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `list[ResponseCharmResourceBase]`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `datetime`, and 2 more union elements, are not assignable to `list[ResponseCharmResourceBase]`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `datetime`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `datetime`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `str`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `str`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `int`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `int`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `str`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `str`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `str`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `str`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `str`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `str`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `str`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `str`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `ByteSize`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 3 more union elements, are not assignable to `ByteSize`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `str`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `str`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `datetime | None`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `datetime | None`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `str | None`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `str | None`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
    --> tests/commands/test_store_api.py:1628:13
     |
1626 |     expected = {
1627 |         (test_lib_id, test_api): Library(
1628 |             api=test_api,
     |             ^^^^^^^^^^^^ Expected `int`, found `Literal["test-api-version"]`
1629 |             content=test_content,
1630 |             content_hash=test_hash,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
    --> tests/commands/test_store_api.py:1634:13
     |
1632 |             lib_name=test_lib_name,
1633 |             charm_name=test_charm_name,
1634 |             patch=test_patch,
     |             ^^^^^^^^^^^^^^^^ Expected `int`, found `Literal["test-patch-version"]`
1635 |         ),
1636 |     }
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
    --> tests/commands/test_store_api.py:1718:13
     |
1716 |     expected = {
1717 |         (test_lib_id_1, test_api_1): Library(
1718 |             api=test_api_1,
     |             ^^^^^^^^^^^^^^ Expected `int`, found `Literal["test-api-version-1"]`
1719 |             content=test_content_1,
1720 |             content_hash=test_hash_1,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
    --> tests/commands/test_store_api.py:1724:13
     |
1722 |             lib_name=test_lib_name_1,
1723 |             charm_name=test_charm_name_1,
1724 |             patch=test_patch_1,
     |             ^^^^^^^^^^^^^^^^^^ Expected `int`, found `Literal["test-patch-version-1"]`
1725 |         ),
1726 |         (test_lib_id_2, test_api_2): Library(
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
    --> tests/commands/test_store_api.py:1727:13
     |
1725 |         ),
1726 |         (test_lib_id_2, test_api_2): Library(
1727 |             api=test_api_2,
     |             ^^^^^^^^^^^^^^ Expected `int`, found `Literal["test-api-version-2"]`
1728 |             content=test_content_2,
1729 |             content_hash=test_hash_2,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
    --> tests/commands/test_store_api.py:1733:13
     |
1731 |             lib_name=test_lib_name_2,
1732 |             charm_name=test_charm_name_2,
1733 |             patch=test_patch_2,
     |             ^^^^^^^^^^^^^^^^^^ Expected `int`, found `Literal["test-patch-version-2"]`
1734 |         ),
1735 |     }
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-method-override]: Invalid override of method `json`
   --> tests/commands/test_store_client.py:77:9
    |
 75 |           return self.status_code == 200
 76 |
 77 |       def json(self):
    |           ^^^^^^^^^^ Definition is incompatible with `Response.json`
 78 |           try:
 79 |               return json.loads(self._content)  # type: ignore
    |
   ::: .venv/lib/python3.12/site-packages/requests-stubs/models.pyi:155:9
    |
153 |       @property
154 |       def text(self) -> str: ...
155 |       def json(
    |  _________-
156 | |         self,
157 | |         *,
158 | |         cls: type[JSONDecoder] | None = ...,
159 | |         object_hook: Callable[[dict[Any, Any]], Any] | None = ...,
160 | |         parse_float: Callable[[str], Any] | None = ...,
161 | |         parse_int: Callable[[str], Any] | None = ...,
162 | |         parse_constant: Callable[[str], Any] | None = ...,
163 | |         object_pairs_hook: Callable[[list[tuple[Any, Any]]], Any] | None = ...,
164 | |         **kwds: Any,
165 | |     ) -> Any: ...
    | |____________- `Response.json` defined here
166 |       @property
167 |       def links(self) -> dict[Incomplete, Incomplete]: ...
    |
info: This violates the Liskov Substitution Principle
info: rule `invalid-method-override` is enabled by default

error[missing-argument]: No argument provided for required parameter `cls`
   --> tests/conftest.py:146:14
    |
145 |     if request.param == "bases":
146 |         with pytest.MonkeyPatch.context() as monkeypatch:
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
147 |             # Add the current system to legacy bases so we can test legacy bases.
148 |             monkeypatch.setattr(const, "LEGACY_BASES", (*const.LEGACY_BASES, base_str))
    |
info: Union variant `(cls) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((cls) -> _GeneratorContextManager[Unknown, None, None]) | ((cls) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `missing-argument` is enabled by default

error[missing-argument]: No argument provided for required parameter `cls`
   --> tests/conftest.py:146:14
    |
145 |     if request.param == "bases":
146 |         with pytest.MonkeyPatch.context() as monkeypatch:
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
147 |             # Add the current system to legacy bases so we can test legacy bases.
148 |             monkeypatch.setattr(const, "LEGACY_BASES", (*const.LEGACY_BASES, base_str))
    |
info: Union variant `(cls) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((cls) -> _GeneratorContextManager[Unknown, None, None]) | ((cls) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `missing-argument` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/conftest.py:226:9
    |
224 |         build_base=craft_platforms.DistroBase("ubuntu", "22.04"),
225 |         build_on=arch,
226 |         build_for="arm64",
    |         ^^^^^^^^^^^^^^^^^ Expected `DebianArchitecture | Literal["all"]`, found `Literal["arm64"]`
227 |         platform="distro-1-test64",
228 |     )
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-method-override]: Invalid override of method `get_supported_bases`
  --> tests/extensions/test_extensions.py:33:9
   |
32 |     @classmethod
33 |     def get_supported_bases(cls) -> list[tuple[str, ...]]:
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Definition is incompatible with `Extension.get_supported_bases`
34 |         """Return a list of tuple of supported bases."""
35 |         return cls.bases
   |
  ::: charmcraft/extensions/extension.py:52:9
   |
50 |     @staticmethod
51 |     @abc.abstractmethod
52 |     def get_supported_bases() -> list[tuple[str, str]]:
   |         ---------------------------------------------- `Extension.get_supported_bases` defined here
53 |         """Return a list of tuple of supported bases."""
   |
info: `FakeExtension.get_supported_bases` is a classmethod but `Extension.get_supported_bases` is a staticmethod
info: This violates the Liskov Substitution Principle
info: rule `invalid-method-override` is enabled by default

error[invalid-method-override]: Invalid override of method `is_experimental`
  --> tests/extensions/test_extensions.py:38:9
   |
37 |     @staticmethod
38 |     def is_experimental(_base: tuple[str, ...] | None) -> bool:
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Definition is incompatible with `Extension.is_experimental`
39 |         """Return whether or not this extension is unstable for given base."""
40 |         return False
   |
  ::: charmcraft/extensions/extension.py:57:9
   |
55 |     @staticmethod
56 |     @abc.abstractmethod
57 |     def is_experimental(base: tuple[str, str] | None) -> bool:
   |         ----------------------------------------------------- `Extension.is_experimental` defined here
58 |         """Return whether or not this extension is unstable for given base."""
   |
info: This violates the Liskov Substitution Principle
info: rule `invalid-method-override` is enabled by default

error[invalid-method-override]: Invalid override of method `is_experimental`
  --> tests/extensions/test_extensions.py:62:9
   |
61 |     @staticmethod
62 |     def is_experimental(_base: str | None) -> bool:
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Definition is incompatible with `FakeExtension.is_experimental`
63 |         return True
   |
  ::: tests/extensions/test_extensions.py:38:9
   |
37 |     @staticmethod
38 |     def is_experimental(_base: tuple[str, ...] | None) -> bool:
   |         ------------------------------------------------------ `FakeExtension.is_experimental` defined here
39 |         """Return whether or not this extension is unstable for given base."""
40 |         return False
   |
info: This violates the Liskov Substitution Principle
info: rule `invalid-method-override` is enabled by default

error[invalid-method-override]: Invalid override of method `is_experimental`
  --> tests/extensions/test_registry.py:34:9
   |
33 |     @staticmethod
34 |     def is_experimental(_base: tuple[str, str] | None) -> bool:
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Definition is incompatible with `Extension.is_experimental`
35 |         return False
   |
  ::: charmcraft/extensions/extension.py:57:9
   |
55 |     @staticmethod
56 |     @abc.abstractmethod
57 |     def is_experimental(base: tuple[str, str] | None) -> bool:
   |         ----------------------------------------------------- `Extension.is_experimental` defined here
58 |         """Return whether or not this extension is unstable for given base."""
   |
info: This violates the Liskov Substitution Principle
info: rule `invalid-method-override` is enabled by default

warning[possibly-missing-attribute]: Submodule `application` may not be available as an attribute on module `charmcraft`
  --> tests/integration/commands/test_init.py:75:17
   |
73 | def init_command():
74 |     return init.InitCommand(
75 |         {"app": charmcraft.application.APP_METADATA, "services": None}
   |                 ^^^^^^^^^^^^^^^^^^^^^^
76 |     )
   |
help: Consider explicitly importing `charmcraft.application`
info: rule `possibly-missing-attribute` is enabled by default

error[unresolved-attribute]: Object of type `RecordingEmitter` has no attribute `assert_json_output`
   --> tests/integration/commands/test_store_commands.py:225:9
    |
223 |             },
224 |         ]
225 |         emitter.assert_json_output(  # pyright: ignore[reportAttributeAccessIssue]
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^
226 |             expected
227 |         )
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Unresolved attribute `client` on type `AppService`.
  --> tests/integration/conftest.py:45:5
   |
43 |     services.register_services()
44 |     factory = craft_application.ServiceFactory(app=application.APP_METADATA)
45 |     factory.get("store").client = mock.Mock(spec_set=craft_store.StoreClient)  # pyright: ignore[reportAttributeAccessIssue]
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
46 |     factory.update_kwargs(
47 |         "charm_libs",
   |
info: rule `unresolved-attribute` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
  --> tests/integration/services/test_image.py:28:9
   |
26 |     service = ImageService(
27 |         app=application.APP_METADATA,
28 |         services=None,  # pyright: ignore[reportArgumentType]
   |         ^^^^^^^^^^^^^ Expected `ServiceFactory`, found `None`
29 |     )
30 |     service.setup()
   |
info: Method defined here
  --> .venv/lib/python3.12/site-packages/craft_application/services/base.py:44:9
   |
42 |     """
43 |
44 |     def __init__(self, app: AppMetadata, services: ServiceFactory) -> None:
   |         ^^^^^^^^                         ------------------------ Parameter declared here
45 |         self._app = app
46 |         self._services = services
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/integration/services/test_lifecycle.py:40:17
   |
38 |                 platform="something",
39 |                 build_on=craft_platforms.DebianArchitecture.from_host(),
40 |                 build_for="invalid",  # pyright: ignore[reportArgumentType]
   |                 ^^^^^^^^^^^^^^^^^^^ Expected `DebianArchitecture | Literal["all"]`, found `Literal["invalid"]`
41 |                 build_base=craft_platforms.DistroBase(distro.id(), distro.version()),
42 |             )
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/integration/services/test_lifecycle.py:88:17
   |
86 |                 platform="something",
87 |                 build_on=host_arch,
88 |                 build_for=f"{foreign_arch}-{host_arch}",  # pyright: ignore[reportArgumentType]
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `DebianArchitecture | Literal["all"]`, found `str`
89 |                 build_base=craft_platforms.DistroBase(distro.id(), distro.version()),
90 |             )
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/integration/services/test_provider.py:56:28
   |
54 |     assert not lock_file.exists()
55 |
56 |     with provider.instance(**provider_kwargs):
   |                            ^^^^^^^^^^^^^^^^^ Expected `BuildInfo`, found `Unknown | BuildInfo | Path`
57 |         # Test that the cache lock gets created
58 |         assert lock_file.is_file()
   |
info: Element `Path` of this union is not assignable to `BuildInfo`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/integration/services/test_provider.py:56:28
   |
54 |     assert not lock_file.exists()
55 |
56 |     with provider.instance(**provider_kwargs):
   |                            ^^^^^^^^^^^^^^^^^ Expected `Path`, found `Unknown | BuildInfo | Path`
57 |         # Test that the cache lock gets created
58 |         assert lock_file.is_file()
   |
info: Element `BuildInfo` of this union is not assignable to `Path`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/integration/services/test_provider.py:56:28
   |
54 |     assert not lock_file.exists()
55 |
56 |     with provider.instance(**provider_kwargs):
   |                            ^^^^^^^^^^^^^^^^^ Expected `bool`, found `Unknown | BuildInfo | Path`
57 |         # Test that the cache lock gets created
58 |         assert lock_file.is_file()
   |
info: Union elements `BuildInfo` and `Path` are not assignable to `bool`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/integration/services/test_provider.py:56:28
   |
54 |     assert not lock_file.exists()
55 |
56 |     with provider.instance(**provider_kwargs):
   |                            ^^^^^^^^^^^^^^^^^ Expected `bool`, found `Unknown | BuildInfo | Path`
57 |         # Test that the cache lock gets created
58 |         assert lock_file.is_file()
   |
info: Union elements `BuildInfo` and `Path` are not assignable to `bool`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/integration/services/test_provider.py:56:28
   |
54 |     assert not lock_file.exists()
55 |
56 |     with provider.instance(**provider_kwargs):
   |                            ^^^^^^^^^^^^^^^^^ Expected `bool`, found `Unknown | BuildInfo | Path`
57 |         # Test that the cache lock gets created
58 |         assert lock_file.is_file()
   |
info: Union elements `BuildInfo` and `Path` are not assignable to `bool`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/integration/services/test_provider.py:56:28
   |
54 |     assert not lock_file.exists()
55 |
56 |     with provider.instance(**provider_kwargs):
   |                            ^^^^^^^^^^^^^^^^^ Expected `str | None`, found `Unknown | BuildInfo | Path`
57 |         # Test that the cache lock gets created
58 |         assert lock_file.is_file()
   |
info: Union elements `BuildInfo` and `Path` are not assignable to `str | None`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/integration/services/test_provider.py:56:28
   |
54 |     assert not lock_file.exists()
55 |
56 |     with provider.instance(**provider_kwargs):
   |                            ^^^^^^^^^^^^^^^^^ Expected `((Executor, /) -> None) | None`, found `Unknown | BuildInfo | Path`
57 |         # Test that the cache lock gets created
58 |         assert lock_file.is_file()
   |
info: Union elements `BuildInfo` and `Path` are not assignable to `((Executor, /) -> None) | None`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/integration/services/test_provider.py:56:28
   |
54 |     assert not lock_file.exists()
55 |
56 |     with provider.instance(**provider_kwargs):
   |                            ^^^^^^^^^^^^^^^^^ Expected `bool | str | None`, found `Unknown | BuildInfo | Path`
57 |         # Test that the cache lock gets created
58 |         assert lock_file.is_file()
   |
info: Union elements `BuildInfo` and `Path` are not assignable to `bool | str | None`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:101:28
    |
 99 |     }
100 |
101 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `BuildInfo`, found `Unknown | BuildInfo | Path`
102 |         # Create a file in the cache and ensure it's not visible in the outer fs
103 |         instance.execute_run(["touch", "/root/.cache/cache_cached"])
    |
info: Element `Path` of this union is not assignable to `BuildInfo`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:101:28
    |
 99 |     }
100 |
101 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `Path`, found `Unknown | BuildInfo | Path`
102 |         # Create a file in the cache and ensure it's not visible in the outer fs
103 |         instance.execute_run(["touch", "/root/.cache/cache_cached"])
    |
info: Element `BuildInfo` of this union is not assignable to `Path`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:101:28
    |
 99 |     }
100 |
101 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `bool`, found `Unknown | BuildInfo | Path`
102 |         # Create a file in the cache and ensure it's not visible in the outer fs
103 |         instance.execute_run(["touch", "/root/.cache/cache_cached"])
    |
info: Union elements `BuildInfo` and `Path` are not assignable to `bool`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:101:28
    |
 99 |     }
100 |
101 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `bool`, found `Unknown | BuildInfo | Path`
102 |         # Create a file in the cache and ensure it's not visible in the outer fs
103 |         instance.execute_run(["touch", "/root/.cache/cache_cached"])
    |
info: Union elements `BuildInfo` and `Path` are not assignable to `bool`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:101:28
    |
 99 |     }
100 |
101 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `bool`, found `Unknown | BuildInfo | Path`
102 |         # Create a file in the cache and ensure it's not visible in the outer fs
103 |         instance.execute_run(["touch", "/root/.cache/cache_cached"])
    |
info: Union elements `BuildInfo` and `Path` are not assignable to `bool`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:101:28
    |
 99 |     }
100 |
101 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `str | None`, found `Unknown | BuildInfo | Path`
102 |         # Create a file in the cache and ensure it's not visible in the outer fs
103 |         instance.execute_run(["touch", "/root/.cache/cache_cached"])
    |
info: Union elements `BuildInfo` and `Path` are not assignable to `str | None`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:101:28
    |
 99 |     }
100 |
101 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `((Executor, /) -> None) | None`, found `Unknown | BuildInfo | Path`
102 |         # Create a file in the cache and ensure it's not visible in the outer fs
103 |         instance.execute_run(["touch", "/root/.cache/cache_cached"])
    |
info: Union elements `BuildInfo` and `Path` are not assignable to `((Executor, /) -> None) | None`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:101:28
    |
 99 |     }
100 |
101 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `bool | str | None`, found `Unknown | BuildInfo | Path`
102 |         # Create a file in the cache and ensure it's not visible in the outer fs
103 |         instance.execute_run(["touch", "/root/.cache/cache_cached"])
    |
info: Union elements `BuildInfo` and `Path` are not assignable to `bool | str | None`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:134:28
    |
132 |         "cache_path": cache_path,
133 |     }
134 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `BuildInfo`, found `Unknown | BuildInfo | Path`
135 |         instance.execute_run(["test", "-d", "/root/.cache"], check=True)
136 |         instance.execute_run(
    |
info: Element `Path` of this union is not assignable to `BuildInfo`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:134:28
    |
132 |         "cache_path": cache_path,
133 |     }
134 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `Path`, found `Unknown | BuildInfo | Path`
135 |         instance.execute_run(["test", "-d", "/root/.cache"], check=True)
136 |         instance.execute_run(
    |
info: Element `BuildInfo` of this union is not assignable to `Path`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:134:28
    |
132 |         "cache_path": cache_path,
133 |     }
134 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `bool`, found `Unknown | BuildInfo | Path`
135 |         instance.execute_run(["test", "-d", "/root/.cache"], check=True)
136 |         instance.execute_run(
    |
info: Union elements `BuildInfo` and `Path` are not assignable to `bool`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:134:28
    |
132 |         "cache_path": cache_path,
133 |     }
134 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `bool`, found `Unknown | BuildInfo | Path`
135 |         instance.execute_run(["test", "-d", "/root/.cache"], check=True)
136 |         instance.execute_run(
    |
info: Union elements `BuildInfo` and `Path` are not assignable to `bool`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:134:28
    |
132 |         "cache_path": cache_path,
133 |     }
134 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `bool`, found `Unknown | BuildInfo | Path`
135 |         instance.execute_run(["test", "-d", "/root/.cache"], check=True)
136 |         instance.execute_run(
    |
info: Union elements `BuildInfo` and `Path` are not assignable to `bool`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:134:28
    |
132 |         "cache_path": cache_path,
133 |     }
134 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `str | None`, found `Unknown | BuildInfo | Path`
135 |         instance.execute_run(["test", "-d", "/root/.cache"], check=True)
136 |         instance.execute_run(
    |
info: Union elements `BuildInfo` and `Path` are not assignable to `str | None`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:134:28
    |
132 |         "cache_path": cache_path,
133 |     }
134 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `((Executor, /) -> None) | None`, found `Unknown | BuildInfo | Path`
135 |         instance.execute_run(["test", "-d", "/root/.cache"], check=True)
136 |         instance.execute_run(
    |
info: Union elements `BuildInfo` and `Path` are not assignable to `((Executor, /) -> None) | None`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:134:28
    |
132 |         "cache_path": cache_path,
133 |     }
134 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `bool | str | None`, found `Unknown | BuildInfo | Path`
135 |         instance.execute_run(["test", "-d", "/root/.cache"], check=True)
136 |         instance.execute_run(
    |
info: Union elements `BuildInfo` and `Path` are not assignable to `bool | str | None`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[unresolved-import]: Cannot resolve imported module `charm`
  --> tests/spread/commands/init-extensions/tests/unit/test_charm.py:9:8
   |
 7 | import pathlib
 8 |
 9 | import charm
   |        ^^^^^
10 | import scenario
11 | import scenario.errors
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/571/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/571/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `scenario`
  --> tests/spread/commands/init-extensions/tests/unit/test_charm.py:10:8
   |
 9 | import charm
10 | import scenario
   |        ^^^^^^^^
11 | import scenario.errors
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/571/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/571/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `scenario.errors`
  --> tests/spread/commands/init-extensions/tests/unit/test_charm.py:11:8
   |
 9 | import charm
10 | import scenario
11 | import scenario.errors
   |        ^^^^^^^^^^^^^^^
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/571/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/571/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/dependencies/setuptools-scm-python/src/charm.py:9:8
   |
 7 | import logging
 8 |
 9 | import ops
   |        ^^^
10 |
11 | # A standalone module for workload-specific logic (no charming concerns):
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/571/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/571/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `setuptools_scm_python`
  --> tests/spread/dependencies/setuptools-scm-python/src/charm.py:12:8
   |
11 | # A standalone module for workload-specific logic (no charming concerns):
12 | import setuptools_scm_python
   |        ^^^^^^^^^^^^^^^^^^^^^
13 |
14 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/571/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/571/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/dependencies/strict-dependencies-errors/extra-binary-packages/src/charm.py:17:8
   |
15 | import logging
16 |
17 | import ops
   |        ^^^
18 |
19 | # Log messages can be retrieved using juju debug-log
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/571/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/571/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/dependencies/strict-dependencies-errors/extra-packages/src/charm.py:17:8
   |
15 | import logging
16 |
17 | import ops
   |        ^^^
18 |
19 | # Log messages can be retrieved using juju debug-log
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/571/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/571/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/dependencies/strict-dependencies-errors/missing-packages/src/charm.py:17:8
   |
15 | import logging
16 |
17 | import ops
   |        ^^^
18 |
19 | # Log messages can be retrieved using juju debug-log
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/571/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/571/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/dependencies/strict-dependencies-errors/no-requirements/src/charm.py:17:8
   |
15 | import logging
16 |
17 | import ops
   |        ^^^
18 |
19 | # Log messages can be retrieved using juju debug-log
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/571/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/571/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/dependencies/strict-dependencies/charm/src/charm.py:17:8
   |
15 | import logging
16 |
17 | import ops
   |        ^^^
18 |
19 | # Log messages can be retrieved using juju debug-log
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/571/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/571/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `charms.reactive`
 --> tests/spread/smoketests/reactive/reactivecharm/reactive/reactivecharm.py:1:6
  |
1 | from charms.reactive import set_flag, when_not
  |      ^^^^^^^^^^^^^^^
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/571/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/571/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/ubuntu-20.04/charm/bases/src/charm.py:18:8
   |
16 | from typing import cast
17 |
18 | import ops
   |        ^^^
19 |
20 | # Log messages can be retrieved using juju debug-log
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/571/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/571/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/ubuntu-20.04/charm/platforms/src/charm.py:9:8
   |
 7 | import logging
 8 |
 9 | import ops
   |        ^^^
10 |
11 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/571/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/571/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/ubuntu-22.04/charm/bases/src/charm.py:18:8
   |
16 | from typing import cast
17 |
18 | import ops
   |        ^^^
19 |
20 | # Log messages can be retrieved using juju debug-log
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/571/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/571/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/ubuntu-22.04/charm/platforms/src/charm.py:9:8
   |
 7 | import logging
 8 |
 9 | import ops
   |        ^^^
10 |
11 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/571/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/571/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/ubuntu-24.04/charm/platforms/src/charm.py:9:8
   |
 7 | import logging
 8 |
 9 | import ops
   |        ^^^
10 |
11 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/571/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/571/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
 --> tests/spread/ubuntu-24.04/test-cmd/src/charm.py:6:8
  |
4 | import logging
5 |
6 | import ops
  |        ^^^
7 |
8 | # A standalone module for workload-specific logic (no charming concerns):
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/571/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/571/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `test_cmd`
  --> tests/spread/ubuntu-24.04/test-cmd/src/charm.py:9:8
   |
 8 | # A standalone module for workload-specific logic (no charming concerns):
 9 | import test_cmd
   |        ^^^^^^^^
10 |
11 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/571/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/571/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `pytest_operator.plugin`
 --> tests/spread/ubuntu-24.04/test-cmd/tests/integration/test_charm.py:7:6
  |
5 | import pytest
6 | import yaml
7 | from pytest_operator.plugin import OpsTest
  |      ^^^^^^^^^^^^^^^^^^^^^^
8 |
9 | logger = logging.getLogger(__name__)
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/571/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/571/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
 --> tests/spread/ubuntu-24.04/test-cmd/tests/unit/test_charm.py:2:6
  |
1 | import pytest
2 | from ops import testing
  |      ^^^
3 |
4 | from charm import TestCmdCharm
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/571/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/571/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `charm`
 --> tests/spread/ubuntu-24.04/test-cmd/tests/unit/test_charm.py:4:6
  |
2 | from ops import testing
3 |
4 | from charm import TestCmdCharm
  |      ^^^^^
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/571/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/571/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/ubuntu-25.10/charm/platforms/src/charm.py:9:8
   |
 7 | import logging
 8 |
 9 | import ops
   |        ^^^
10 |
11 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/571/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/571/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
 --> tests/spread/ubuntu-25.10/test-cmd/src/charm.py:6:8
  |
4 | import logging
5 |
6 | import ops
  |        ^^^
7 |
8 | # A standalone module for workload-specific logic (no charming concerns):
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/571/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/571/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `test_cmd`
  --> tests/spread/ubuntu-25.10/test-cmd/src/charm.py:9:8
   |
 8 | # A standalone module for workload-specific logic (no charming concerns):
 9 | import test_cmd
   |        ^^^^^^^^
10 |
11 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/571/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/571/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `pytest_operator.plugin`
 --> tests/spread/ubuntu-25.10/test-cmd/tests/integration/test_charm.py:7:6
  |
5 | import pytest
6 | import yaml
7 | from pytest_operator.plugin import OpsTest
  |      ^^^^^^^^^^^^^^^^^^^^^^
8 |
9 | logger = logging.getLogger(__name__)
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/571/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/571/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
 --> tests/spread/ubuntu-25.10/test-cmd/tests/unit/test_charm.py:2:6
  |
1 | import pytest
2 | from ops import testing
  |      ^^^
3 |
4 | from charm import TestCmdCharm
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/571/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/571/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `charm`
 --> tests/spread/ubuntu-25.10/test-cmd/tests/unit/test_charm.py:4:6
  |
2 | from ops import testing
3 |
4 | from charm import TestCmdCharm
  |      ^^^^^
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/571/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/571/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/ubuntu-26.04/charm/platforms/src/charm.py:9:8
   |
 7 | import logging
 8 |
 9 | import ops
   |        ^^^
10 |
11 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/571/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/571/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
 --> tests/spread/ubuntu-26.04/test-cmd/src/charm.py:6:8
  |
4 | import logging
5 |
6 | import ops
  |        ^^^
7 |
8 | # A standalone module for workload-specific logic (no charming concerns):
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/571/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/571/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `test_cmd`
  --> tests/spread/ubuntu-26.04/test-cmd/src/charm.py:9:8
   |
 8 | # A standalone module for workload-specific logic (no charming concerns):
 9 | import test_cmd
   |        ^^^^^^^^
10 |
11 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/571/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/571/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `pytest_operator.plugin`
 --> tests/spread/ubuntu-26.04/test-cmd/tests/integration/test_charm.py:7:6
  |
5 | import pytest
6 | import yaml
7 | from pytest_operator.plugin import OpsTest
  |      ^^^^^^^^^^^^^^^^^^^^^^
8 |
9 | logger = logging.getLogger(__name__)
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/571/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/571/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
 --> tests/spread/ubuntu-26.04/test-cmd/tests/unit/test_charm.py:2:6
  |
1 | import pytest
2 | from ops import testing
  |      ^^^
3 |
4 | from charm import TestCmdCharm
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/571/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/571/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `charm`
 --> tests/spread/ubuntu-26.04/test-cmd/tests/unit/test_charm.py:4:6
  |
2 | from ops import testing
3 |
4 | from charm import TestCmdCharm
  |      ^^^^^
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/571/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/571/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
   --> tests/test_instrum.py:256:32
    |
254 |     assert measurements.measurements == {}
255 |
256 |     with Timer("test message", foo=42):
    |                                ^^^^^^ Expected `dict[str, Any]`, found `Literal[42]`
257 |         pass
    |
info: Method defined here
   --> charmcraft/instrum.py:129:9
    |
127 |     """
128 |
129 |     def __init__(self, msg: str, **extra_info: dict[str, Any]):
    |         ^^^^^^^^                 ---------------------------- Parameter declared here
130 |         self.msg = msg
131 |         self.extra_info = extra_info
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
   --> tests/test_instrum.py:274:28
    |
272 |     monkeypatch.setattr(instrum, "_measurements", measurements)
273 |
274 |     @Timer("test message", foo=42)
    |                            ^^^^^^ Expected `dict[str, Any]`, found `Literal[42]`
275 |     def test_function(a, b):
276 |         assert a == 17
    |
info: Method defined here
   --> charmcraft/instrum.py:129:9
    |
127 |     """
128 |
129 |     def __init__(self, msg: str, **extra_info: dict[str, Any]):
    |         ^^^^^^^^                 ---------------------------- Parameter declared here
130 |         self.msg = msg
131 |         self.extra_info = extra_info
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
   --> tests/test_instrum.py:298:32
    |
296 |     assert measurements.measurements == {}
297 |
298 |     with Timer("test message", foo=42) as timer:
    |                                ^^^^^^ Expected `dict[str, Any]`, found `Literal[42]`
299 |         timer.mark("middle 1")
300 |         timer.mark("middle 2")
    |
info: Method defined here
   --> charmcraft/instrum.py:129:9
    |
127 |     """
128 |
129 |     def __init__(self, msg: str, **extra_info: dict[str, Any]):
    |         ^^^^^^^^                 ---------------------------- Parameter declared here
130 |         self.msg = msg
131 |         self.extra_info = extra_info
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-assignment]: Implicit shadowing of function `write`
  --> tests/unit/commands/test_lifecycle.py:91:5
   |
90 |     libs_service = cast("CharmLibsService", service_factory.get("charm_libs"))
91 |     libs_service.write = mock.Mock(wraps=libs_service.write)
   |     ^^^^^^^^^^^^^^^^^^
92 |
93 |     pack._update_charm_libs()
   |
info: Annotate to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[unresolved-attribute]: Object of type `bound method CharmLibsService.write(library: Library) -> None` has no attribute `assert_called_once_with`
  --> tests/unit/commands/test_lifecycle.py:95:5
   |
93 |     pack._update_charm_libs()
94 |
95 |     libs_service.write.assert_called_once_with(store_lib)
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
96 |
97 |     with check():
   |
info: rule `unresolved-attribute` is enabled by default

error[non-subscriptable]: Cannot subscript object of type `None` with no `__getitem__` method
  --> tests/unit/models/test_config.py:75:23
   |
73 |     config = JujuConfig(options={"my-opt": option})
74 |
75 |     assert isinstance(config.options["my-opt"], type_)
   |                       ^^^^^^^^^^^^^^^^^^^^^^^^
   |
info: rule `non-subscriptable` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/unit/models/test_project.py:813:13
    |
811 |             description="",
812 |             base=base,
813 |             platforms={"amd64": None},
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `PlatformsDict`, found `dict[Unknown | str, Unknown | None]`
814 |             parts={"charm": {"plugin": "charm"}},
815 |         )
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `__new__` is incorrect
  --> tests/unit/parts/plugins/test_charm.py:97:22
   |
96 |     pip_constraint_file = (
97 |         pathlib.Path(parts.plugins.__file__).parent / "charm-constraints.txt"
   |                      ^^^^^^^^^^^^^^^^^^^^^^ Expected `str | PathLike[str]`, found `str | None`
98 |     )
   |
info: Element `None` of this union is not assignable to `str | PathLike[str]`
info: Function defined here
   --> stdlib/pathlib/__init__.pyi:299:13
    |
297 |         def __new__(cls, *args: StrPath, **kwargs: Unused) -> Self: ...  # pyright: ignore[reportInconsistentConstructor]
298 |     else:
299 |         def __new__(cls, *args: StrPath, **kwargs: Unused) -> Self: ...
    |             ^^^^^^^      -------------- Parameter declared here
300 |
301 |     @classmethod
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-assignment]: Implicit shadowing of function `_get_pip`
  --> tests/unit/parts/plugins/test_poetry.py:40:5
   |
39 | def test_get_pip_install_commands(poetry_plugin: plugins.PoetryPlugin):
40 |     poetry_plugin._get_pip = lambda: "/python -m pip"
   |     ^^^^^^^^^^^^^^^^^^^^^^
41 |
42 |     assert poetry_plugin._get_pip_install_commands(
   |
info: Annotate to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Implicit shadowing of function `_get_pip`
  --> tests/unit/parts/plugins/test_python.py:62:5
   |
60 |     }
61 |     python_plugin._options = plugins.PythonPluginProperties.unmarshal(spec)
62 |     python_plugin._get_pip = lambda: "/python -m pip"
   |     ^^^^^^^^^^^^^^^^^^^^^^
63 |     copy_src_cmd = (
64 |         f"cp --archive --recursive --reflink=auto {build_path}/src {install_path}"
   |
info: Annotate to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
   --> tests/unit/services/test_analysis.py:112:67
    |
110 | @pytest.fixture
111 | def analysis_service():
112 |     return analysis.AnalysisService(app=application.APP_METADATA, services=None)
    |                                                                   ^^^^^^^^^^^^^ Expected `ServiceFactory`, found `None`
    |
info: Method defined here
  --> charmcraft/services/analysis.py:37:9
   |
35 |     _project: models.CharmcraftProject  # type: ignore[assignment]
36 |
37 |     def __init__(  # (too many arguments)
   |         ^^^^^^^^
38 |         self,
39 |         app: craft_application.AppMetadata,
40 |         services: craft_application.ServiceFactory,
   |         ------------------------------------------ Parameter declared here
41 |     ) -> None:
42 |         super().__init__(app, services)
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/unit/services/test_lifecycle.py:55:17
   |
53 |                 platform="something",
54 |                 build_on=HOST_ARCH,
55 |                 build_for=plan_build_for,  # pyright: ignore[reportArgumentType]
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^ Expected `DebianArchitecture | Literal["all"]`, found `str`
56 |             )
57 |         ]
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/unit/services/test_lifecycle.py:94:17
   |
92 |                 platform="something",
93 |                 build_on=HOST_ARCH,
94 |                 build_for=f"{HOST_ARCH}-foreign",  # pyright: ignore[reportArgumentType]
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `DebianArchitecture | Literal["all"]`, found `str`
95 |             )
96 |         ]
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
  --> tests/unit/services/test_project.py:34:45
   |
32 | @pytest.fixture
33 | def service(project_path):
34 |     return ProjectService(app=APP_METADATA, services=None, project_dir=project_path)
   |                                             ^^^^^^^^^^^^^ Expected `ServiceFactory`, found `None`
   |
info: Method defined here
  --> .venv/lib/python3.12/site-packages/craft_application/services/project.py:57:9
   |
55 |     _project_model: models.Project | None
56 |
57 |     def __init__(
   |         ^^^^^^^^
58 |         self, app: AppMetadata, services: ServiceFactory, *, project_dir: pathlib.Path
   |                                 ------------------------ Parameter declared here
59 |     ) -> None:
60 |         super().__init__(app, services)
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
   --> tests/unit/services/test_provider.py:123:9
    |
121 |     provider_service = ProviderService(
122 |         app=APP_METADATA,
123 |         services=None,  # pyright: ignore[reportArgumentType]
    |         ^^^^^^^^^^^^^ Expected `ServiceFactory`, found `None`
124 |         work_dir=tmp_path,
125 |     )
    |
info: Method defined here
  --> charmcraft/services/provider.py:43:9
   |
41 |     """Business logic for getting providers."""
42 |
43 |     def __init__(
   |         ^^^^^^^^
44 |         self,
45 |         app: craft_application.AppMetadata,
46 |         services: craft_application.ServiceFactory,
   |         ------------------------------------------ Parameter declared here
47 |         *,
48 |         work_dir: pathlib.Path,
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
  --> tests/unit/services/test_store.py:50:56
   |
48 | @pytest.fixture(scope="module")
49 | def reusable_store():
50 |     store = StoreService(app=application.APP_METADATA, services=None)
   |                                                        ^^^^^^^^^^^^^ Expected `ServiceFactory`, found `None`
51 |     store.client = mock.Mock(spec_set=craft_store.StoreClient)
52 |     store._publisher = mock.Mock(spec_set=craft_store.PublisherGateway)
   |
info: Method defined here
  --> .venv/lib/python3.12/site-packages/craft_application/services/base.py:44:9
   |
42 |     """
43 |
44 |     def __init__(self, app: AppMetadata, services: ServiceFactory) -> None:
   |         ^^^^^^^^                         ------------------------ Parameter declared here
45 |         self._app = app
46 |         self._services = services
   |
info: rule `invalid-argument-type` is enabled by default

warning[possibly-missing-attribute]: Attribute `group` may be missing on object of type `Match[str] | None`
  --> tests/unit/test_linters.py:43:12
   |
41 | )
42 | def test_fuzz_python_name_regex(name, next_char, further_garbage):
43 |     assert linters.PYTHON_NAME_REGEX.match(name).group(0) == name
   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
44 |     assert linters.PYTHON_NAME_REGEX.match(f"{name}{next_char}").group(0) == name
45 |     assert (
   |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `group` may be missing on object of type `Match[str] | None`
  --> tests/unit/test_linters.py:44:12
   |
42 | def test_fuzz_python_name_regex(name, next_char, further_garbage):
43 |     assert linters.PYTHON_NAME_REGEX.match(name).group(0) == name
44 |     assert linters.PYTHON_NAME_REGEX.match(f"{name}{next_char}").group(0) == name
   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
45 |     assert (
46 |         linters.PYTHON_NAME_REGEX.match(f"{name}{next_char}{further_garbage}").group(0)
   |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `group` may be missing on object of type `Match[str] | None`
  --> tests/unit/test_linters.py:46:9
   |
44 |     assert linters.PYTHON_NAME_REGEX.match(f"{name}{next_char}").group(0) == name
45 |     assert (
46 |         linters.PYTHON_NAME_REGEX.match(f"{name}{next_char}{further_garbage}").group(0)
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
47 |         == name
48 |     )
   |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `group` may be missing on object of type `Match[str] | None`
  --> tests/unit/test_linters.py:62:12
   |
60 | )
61 | def test_min_version_regex_matches(string, expected):
62 |     assert linters.MIN_VERSION_REGEX.search(string).group(1) == expected
   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `group` may be missing on object of type `Match[str] | None`
  --> tests/unit/test_linters.py:76:24
   |
74 | )
75 | def test_approx_version_regex_matches(string, expected):
76 |     assert expected in linters.APPROX_VERSION_REGEX.search(string).group(1, 2)
   |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `group` may be missing on object of type `Match[str] | None`
  --> tests/unit/test_linters.py:84:12
   |
82 | )
83 | def test_exact_version_regex_matches(string, expected):
84 |     assert linters.EXACT_VERSION_REGEX.search(string).group(1) == expected
   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
info: rule `possibly-missing-attribute` is enabled by default

error[no-matching-overload]: No overload of function `format_content` matches arguments
   --> tests/unit/utils/test_cli.py:285:9
    |
283 | def test_format_content_invalid(fmt):
284 |     with pytest.raises(ValueError, match="^Unknown output format "):
285 |         format_content(None, fmt)
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^
    |
info: First overload defined here
   --> charmcraft/utils/cli.py:185:5
    |
184 |   @overload
185 |   def format_content(
    |  _____^
186 | |     content: dict[str, Any] | list[dict[str, Any]], fmt: OutputFormat | str | None
187 | | ) -> str: ...
    | |________^
    |
info: Possible overloads for function `format_content`:
info:   (content: dict[str, Any] | list[dict[str, Any]], fmt: OutputFormat | str | None) -> str
info:   (content: str | Real | list[Unknown] | dict[Unknown, Unknown], fmt: OutputFormat | str | None) -> str
info: Overload implementation defined here
   --> charmcraft/utils/cli.py:196:5
    |
196 | def format_content(content, fmt=None):
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
197 |     """Format command output."""
198 |     if not isinstance(fmt, OutputFormat):
    |
info: rule `no-matching-overload` is enabled by default

Found 151 diagnostics

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Dec 8, 2025

Type checking with ty failed. This is a notification only and does not require action.

Command output
warning[possibly-missing-attribute]: Attribute `bases` may be missing on object of type `PlatformCharm | BasesCharm`
   --> charmcraft/application/commands/lifecycle.py:119:36
    |
118 |         msg = "Bases index '{}' is invalid (must be >= 0 and fit in configured bases)."
119 |         len_configured_bases = len(project.bases)
    |                                    ^^^^^^^^^^^^^
120 |         for bases_index in bases_indices:
121 |             if bases_index < 0:
    |
info: rule `possibly-missing-attribute` is enabled by default

error[unresolved-attribute]: Object of type `AppService | type[AppService]` has no attribute `get_credentials`
   --> charmcraft/application/commands/store.py:210:27
    |
209 |         if parsed_args.export:
210 |             credentials = self._services.store.get_credentials(
    |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
211 |                 packages=packages, **kwargs
212 |             )
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `AppService | type[AppService]` has no attribute `login`
   --> charmcraft/application/commands/store.py:218:13
    |
216 |             )
217 |         else:
218 |             self._services.store.login(packages=packages, **kwargs)
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^
219 |             username = self._services.store.get_account_info()["username"]
220 |             emit.message(f"Logged in as {username!r}.")
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `AppService | type[AppService]` has no attribute `get_account_info`
   --> charmcraft/application/commands/store.py:219:24
    |
217 |         else:
218 |             self._services.store.login(packages=packages, **kwargs)
219 |             username = self._services.store.get_account_info()["username"]
    |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
220 |             emit.message(f"Logged in as {username!r}.")
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `AppService | type[AppService]` has no attribute `logout`
   --> charmcraft/application/commands/store.py:244:13
    |
242 |         """Run the command."""
243 |         try:
244 |             self._services.store.logout()
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
245 |             emit.message("Charmhub token cleared.")
246 |         except CredentialsUnavailable:
    |
info: rule `unresolved-attribute` is enabled by default

error[not-iterable]: Object of type `IO[str] | None` may not be iterable
   --> charmcraft/charm_builder.py:423:17
    |
422 |     # https://github.com/microsoft/pylance-release/issues/2385
423 |     for line in proc.stdout:  # pyright: ignore[reportOptionalIterable]
    |                 ^^^^^^^^^^^
424 |         print(f"   :: {line.rstrip()}")
425 |     retcode = proc.wait()
    |
info: It may not have an `__iter__` method and it doesn't have a `__getitem__` method
info: rule `not-iterable` is enabled by default

warning[possibly-missing-attribute]: Attribute `split` may be missing on object of type `str | None`
   --> charmcraft/linters.py:238:23
    |
236 |                     yield name.name.split(".")
237 |             elif isinstance(node, ast.ImportFrom):
238 |                 yield node.module.split(".")
    |                       ^^^^^^^^^^^^^^^^^
239 |
240 |     def _check_operator(self, basedir: pathlib.Path) -> bool:
    |
info: rule `possibly-missing-attribute` is enabled by default

error[invalid-argument-type]: Argument to function `quote` is incorrect
   --> charmcraft/parts/plugins/_charm.py:289:42
    |
287 |             build_cmd.extend(self._get_legacy_dependencies_parameters())
288 |
289 |         commands = [" ".join(shlex.quote(i) for i in build_cmd)]
    |                                          ^ Expected `str`, found `Unknown | str | None`
290 |
291 |         # hook a callback after the BUILD happened (to collect metrics left by charm builder)
    |
info: Element `None` of this union is not assignable to `str`
info: Function defined here
  --> stdlib/shlex.pyi:34:5
   |
32 |     """Return a shell-escaped string from *split_command*."""
33 |
34 | def quote(s: str) -> str:
   |     ^^^^^ ------ Parameter declared here
35 |     """Return a shell-escaped version of the string *s*."""
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `merge_from` is incorrect
   --> charmcraft/parts/plugins/_charm.py:341:28
    |
339 |     def post_build_callback(self, step_info):
340 |         """Collect metrics left by charm_builder.py."""
341 |         instrum.merge_from(env.get_charm_builder_metrics_path())
    |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str`, found `Path`
342 |
343 |     def _get_os_special_priority_paths(self) -> str | None:
    |
info: Method defined here
  --> charmcraft/instrum.py:77:9
   |
75 |             json.dump(measurements, fh, indent=4)
76 |
77 |     def merge_from(self, filename: str) -> None:
   |         ^^^^^^^^^^       ------------- Parameter declared here
78 |         """Merge measurements from a file to the current ongoing structure."""
79 |         with open(filename) as fh:
   |
info: rule `invalid-argument-type` is enabled by default

warning[possibly-missing-attribute]: Attribute `login` may be missing on object of type `Unknown | Client | AnonymousClient`
   --> charmcraft/store/store.py:227:27
    |
226 |         try:
227 |             credentials = self._client.login(**kwargs)
    |                           ^^^^^^^^^^^^^^^^^^
228 |         except CredentialsAlreadyAvailable as exc:
229 |             raise CraftError(
    |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `logout` may be missing on object of type `Unknown | Client | AnonymousClient`
   --> charmcraft/store/store.py:241:9
    |
239 |         There's no action really in the Store to logout, we just remove local credentials.
240 |         """
241 |         self._client.logout()
    |         ^^^^^^^^^^^^^^^^^^^
242 |
243 |     @_store_client_wrapper(auto_login=False)
    |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `whoami` may be missing on object of type `Unknown | Client | AnonymousClient`
   --> charmcraft/store/store.py:246:20
    |
244 |     def whoami(self):
245 |         """Return authenticated user details."""
246 |         response = self._client.whoami()
    |                    ^^^^^^^^^^^^^^^^^^^
247 |
248 |         acc = response["account"]
    |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `whoami` may be missing on object of type `Unknown | Client | AnonymousClient`
   --> charmcraft/store/store.py:268:9
    |
266 |     def _check_authorized(self) -> None:
267 |         """Check if current credentials authenticated."""
268 |         self._client.whoami()
    |         ^^^^^^^^^^^^^^^^^^^
269 |
270 |     @_store_client_wrapper()
    |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `unregister_name` may be missing on object of type `Unknown | Client | AnonymousClient`
   --> charmcraft/store/store.py:285:9
    |
283 |         :raises: error messages from craft-store
284 |         """
285 |         self._client.unregister_name(name)
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
286 |
287 |     @_store_client_wrapper()
    |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `push_file` may be missing on object of type `Unknown | Client | AnonymousClient`
   --> charmcraft/store/store.py:311:21
    |
309 |         self._check_authorized()
310 |
311 |         upload_id = self._client.push_file(filepath)
    |                     ^^^^^^^^^^^^^^^^^^^^^^
312 |         payload = {"upload-id": upload_id}
313 |         if extra_fields is not None:
    |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `list_resource_revisions` may be missing on object of type `Unknown | Client | AnonymousClient`
   --> charmcraft/store/store.py:506:16
    |
504 |     ) -> list[CharmResourceRevision]:
505 |         """Return revisions for the indicated charm resource."""
506 |         return self._client.list_resource_revisions(charm_name, resource_name)
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
507 |
508 |     @_store_client_wrapper()
    |
info: rule `possibly-missing-attribute` is enabled by default

error[invalid-argument-type]: Argument to function `__new__` is incorrect
   --> docs/conf.py:242:38
    |
240 | # Setup libraries documentation snippets for use in charmcraft docs.
241 | common_docs_path = pathlib.Path(__file__).parent / "common"
242 | craft_parts_docs_path = pathlib.Path(craft_parts_docs.__file__).parent / "craft-parts"
    |                                      ^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str | PathLike[str]`, found `str | None`
243 | (common_docs_path / "craft-parts").unlink(missing_ok=True)
244 | (common_docs_path / "craft-parts").symlink_to(craft_parts_docs_path, target_is_directory=True)
    |
info: Element `None` of this union is not assignable to `str | PathLike[str]`
info: Function defined here
   --> stdlib/pathlib/__init__.pyi:299:13
    |
297 |         def __new__(cls, *args: StrPath, **kwargs: Unused) -> Self: ...  # pyright: ignore[reportInconsistentConstructor]
298 |     else:
299 |         def __new__(cls, *args: StrPath, **kwargs: Unused) -> Self: ...
    |             ^^^^^^^      -------------- Parameter declared here
300 |
301 |     @classmethod
    |
info: rule `invalid-argument-type` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> docs/howto/code/custom-action-clearsession/clearsession_action_charm.py:10:8
   |
 8 | import typing
 9 |
10 | import ops
   |        ^^^
11 |
12 | import paas_charm.django
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `paas_charm.django`
  --> docs/howto/code/custom-action-clearsession/clearsession_action_charm.py:12:8
   |
10 | import ops
11 |
12 | import paas_charm.django
   |        ^^^^^^^^^^^^^^^^^
13 |
14 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `flask`
 --> docs/howto/code/custom-action-updatelogfile/app.py:3:8
  |
1 | # initial hello world Flask app
2 |
3 | import flask
  |        ^^^^^
4 |
5 | app = flask.Flask(__name__)
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> docs/howto/code/custom-action-updatelogfile/updatelogfile_action_charm.py:10:8
   |
 8 | import typing
 9 |
10 | import ops
   |        ^^^
11 |
12 | import paas_charm.flask
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `paas_charm.flask`
  --> docs/howto/code/custom-action-updatelogfile/updatelogfile_action_charm.py:12:8
   |
10 | import ops
11 |
12 | import paas_charm.flask
   |        ^^^^^^^^^^^^^^^^
13 |
14 | import requests
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `flask`
 --> docs/howto/code/flask-async/app.py:3:8
  |
1 | from time import sleep
2 |
3 | import flask
  |        ^^^^^
4 |
5 | app = flask.Flask(__name__)
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `django.contrib`
  --> docs/tutorial/code/django/urls_django_hello_world.py:17:6
   |
15 |     2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
16 | """
17 | from django.contrib import admin
   |      ^^^^^^^^^^^^^^
18 | from django.urls import include, path
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `django.urls`
  --> docs/tutorial/code/django/urls_django_hello_world.py:18:6
   |
16 | """
17 | from django.contrib import admin
18 | from django.urls import include, path
   |      ^^^^^^^^^^^
19 |
20 | urlpatterns = [
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `django.urls`
 --> docs/tutorial/code/django/urls_greeting.py:1:6
  |
1 | from django.urls import path
  |      ^^^^^^^^^^^
2 |
3 | from . import views
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Module `docs.tutorial.code.django` has no member `views`
 --> docs/tutorial/code/django/urls_greeting.py:3:15
  |
1 | from django.urls import path
2 |
3 | from . import views
  |               ^^^^^
4 |
5 | urlpatterns = [
  |
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `django.http`
 --> docs/tutorial/code/django/views_greeting.py:1:6
  |
1 | from django.http import HttpResponse
  |      ^^^^^^^^^^^
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `django.http`
 --> docs/tutorial/code/django/views_greeting_configuration.py:3:6
  |
1 | import os
2 |
3 | from django.http import HttpResponse
  |      ^^^^^^^^^^^
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `fastapi`
 --> docs/tutorial/code/fastapi/app.py:1:6
  |
1 | from fastapi import FastAPI
  |      ^^^^^^^
2 |
3 | app = FastAPI()
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `fastapi`
 --> docs/tutorial/code/fastapi/greeting_app.py:3:6
  |
1 | import os
2 |
3 | from fastapi import FastAPI
  |      ^^^^^^^
4 |
5 | app = FastAPI()
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `fastapi`
 --> docs/tutorial/code/fastapi/visitors_app.py:7:6
  |
5 | from typing import Annotated
6 |
7 | from fastapi import FastAPI, Header
  |      ^^^^^^^
8 | import psycopg2
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `psycopg2`
  --> docs/tutorial/code/fastapi/visitors_app.py:8:8
   |
 7 | from fastapi import FastAPI, Header
 8 | import psycopg2
   |        ^^^^^^^^
 9 |
10 | app = FastAPI()
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `psycopg2`
 --> docs/tutorial/code/fastapi/visitors_migrate.py:5:8
  |
3 | import os
4 |
5 | import psycopg2
  |        ^^^^^^^^
6 |
7 | DATABASE_URI = os.environ["POSTGRESQL_DB_CONNECT_STRING"]
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `flask`
 --> docs/tutorial/code/flask/app.py:3:8
  |
1 | # initial hello world Flask app
2 |
3 | import flask
  |        ^^^^^
4 |
5 | app = flask.Flask(__name__)
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `flask`
 --> docs/tutorial/code/flask/greeting_app.py:3:8
  |
1 | # Flask app with a greeting configuration
2 |
3 | import flask
  |        ^^^^^
4 |
5 | app = flask.Flask(__name__)
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `flask`
 --> docs/tutorial/code/flask/visitors_app.py:6:8
  |
4 | import os
5 |
6 | import flask
  |        ^^^^^
7 | import psycopg2
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `psycopg2`
 --> docs/tutorial/code/flask/visitors_app.py:7:8
  |
6 | import flask
7 | import psycopg2
  |        ^^^^^^^^
8 |
9 | app = flask.Flask(__name__)
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `psycopg2`
 --> docs/tutorial/code/flask/visitors_migrate.py:5:8
  |
3 | import os
4 |
5 | import psycopg2
  |        ^^^^^^^^
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `list[ResponseCharmResourceBase]`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `datetime`, and 2 more union elements, are not assignable to `list[ResponseCharmResourceBase]`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `datetime`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `datetime`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `str`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `str`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `int`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `int`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `str`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `str`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `str`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `str`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `str`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `str`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `str`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `str`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `ByteSize`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 3 more union elements, are not assignable to `ByteSize`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `str`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `str`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `datetime | None`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `datetime | None`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `str | None`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `str | None`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
    --> tests/commands/test_store_api.py:1628:13
     |
1626 |     expected = {
1627 |         (test_lib_id, test_api): Library(
1628 |             api=test_api,
     |             ^^^^^^^^^^^^ Expected `int`, found `Literal["test-api-version"]`
1629 |             content=test_content,
1630 |             content_hash=test_hash,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
    --> tests/commands/test_store_api.py:1634:13
     |
1632 |             lib_name=test_lib_name,
1633 |             charm_name=test_charm_name,
1634 |             patch=test_patch,
     |             ^^^^^^^^^^^^^^^^ Expected `int`, found `Literal["test-patch-version"]`
1635 |         ),
1636 |     }
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
    --> tests/commands/test_store_api.py:1718:13
     |
1716 |     expected = {
1717 |         (test_lib_id_1, test_api_1): Library(
1718 |             api=test_api_1,
     |             ^^^^^^^^^^^^^^ Expected `int`, found `Literal["test-api-version-1"]`
1719 |             content=test_content_1,
1720 |             content_hash=test_hash_1,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
    --> tests/commands/test_store_api.py:1724:13
     |
1722 |             lib_name=test_lib_name_1,
1723 |             charm_name=test_charm_name_1,
1724 |             patch=test_patch_1,
     |             ^^^^^^^^^^^^^^^^^^ Expected `int`, found `Literal["test-patch-version-1"]`
1725 |         ),
1726 |         (test_lib_id_2, test_api_2): Library(
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
    --> tests/commands/test_store_api.py:1727:13
     |
1725 |         ),
1726 |         (test_lib_id_2, test_api_2): Library(
1727 |             api=test_api_2,
     |             ^^^^^^^^^^^^^^ Expected `int`, found `Literal["test-api-version-2"]`
1728 |             content=test_content_2,
1729 |             content_hash=test_hash_2,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
    --> tests/commands/test_store_api.py:1733:13
     |
1731 |             lib_name=test_lib_name_2,
1732 |             charm_name=test_charm_name_2,
1733 |             patch=test_patch_2,
     |             ^^^^^^^^^^^^^^^^^^ Expected `int`, found `Literal["test-patch-version-2"]`
1734 |         ),
1735 |     }
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-method-override]: Invalid override of method `json`
   --> tests/commands/test_store_client.py:77:9
    |
 75 |           return self.status_code == 200
 76 |
 77 |       def json(self):
    |           ^^^^^^^^^^ Definition is incompatible with `Response.json`
 78 |           try:
 79 |               return json.loads(self._content)  # type: ignore
    |
   ::: .venv/lib/python3.12/site-packages/requests-stubs/models.pyi:155:9
    |
153 |       @property
154 |       def text(self) -> str: ...
155 |       def json(
    |  _________-
156 | |         self,
157 | |         *,
158 | |         cls: type[JSONDecoder] | None = ...,
159 | |         object_hook: Callable[[dict[Any, Any]], Any] | None = ...,
160 | |         parse_float: Callable[[str], Any] | None = ...,
161 | |         parse_int: Callable[[str], Any] | None = ...,
162 | |         parse_constant: Callable[[str], Any] | None = ...,
163 | |         object_pairs_hook: Callable[[list[tuple[Any, Any]]], Any] | None = ...,
164 | |         **kwds: Any,
165 | |     ) -> Any: ...
    | |____________- `Response.json` defined here
166 |       @property
167 |       def links(self) -> dict[Incomplete, Incomplete]: ...
    |
info: This violates the Liskov Substitution Principle
info: rule `invalid-method-override` is enabled by default

error[missing-argument]: No argument provided for required parameter `cls`
   --> tests/conftest.py:146:14
    |
145 |     if request.param == "bases":
146 |         with pytest.MonkeyPatch.context() as monkeypatch:
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
147 |             # Add the current system to legacy bases so we can test legacy bases.
148 |             monkeypatch.setattr(const, "LEGACY_BASES", (*const.LEGACY_BASES, base_str))
    |
info: Union variant `(cls) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((cls) -> _GeneratorContextManager[Unknown, None, None]) | ((cls) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `missing-argument` is enabled by default

error[missing-argument]: No argument provided for required parameter `cls`
   --> tests/conftest.py:146:14
    |
145 |     if request.param == "bases":
146 |         with pytest.MonkeyPatch.context() as monkeypatch:
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
147 |             # Add the current system to legacy bases so we can test legacy bases.
148 |             monkeypatch.setattr(const, "LEGACY_BASES", (*const.LEGACY_BASES, base_str))
    |
info: Union variant `(cls) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((cls) -> _GeneratorContextManager[Unknown, None, None]) | ((cls) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `missing-argument` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/conftest.py:226:9
    |
224 |         build_base=craft_platforms.DistroBase("ubuntu", "22.04"),
225 |         build_on=arch,
226 |         build_for="arm64",
    |         ^^^^^^^^^^^^^^^^^ Expected `DebianArchitecture | Literal["all"]`, found `Literal["arm64"]`
227 |         platform="distro-1-test64",
228 |     )
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-method-override]: Invalid override of method `get_supported_bases`
  --> tests/extensions/test_extensions.py:33:9
   |
32 |     @classmethod
33 |     def get_supported_bases(cls) -> list[tuple[str, ...]]:
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Definition is incompatible with `Extension.get_supported_bases`
34 |         """Return a list of tuple of supported bases."""
35 |         return cls.bases
   |
  ::: charmcraft/extensions/extension.py:52:9
   |
50 |     @staticmethod
51 |     @abc.abstractmethod
52 |     def get_supported_bases() -> list[tuple[str, str]]:
   |         ---------------------------------------------- `Extension.get_supported_bases` defined here
53 |         """Return a list of tuple of supported bases."""
   |
info: `FakeExtension.get_supported_bases` is a classmethod but `Extension.get_supported_bases` is a staticmethod
info: This violates the Liskov Substitution Principle
info: rule `invalid-method-override` is enabled by default

error[invalid-method-override]: Invalid override of method `is_experimental`
  --> tests/extensions/test_extensions.py:38:9
   |
37 |     @staticmethod
38 |     def is_experimental(_base: tuple[str, ...] | None) -> bool:
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Definition is incompatible with `Extension.is_experimental`
39 |         """Return whether or not this extension is unstable for given base."""
40 |         return False
   |
  ::: charmcraft/extensions/extension.py:57:9
   |
55 |     @staticmethod
56 |     @abc.abstractmethod
57 |     def is_experimental(base: tuple[str, str] | None) -> bool:
   |         ----------------------------------------------------- `Extension.is_experimental` defined here
58 |         """Return whether or not this extension is unstable for given base."""
   |
info: This violates the Liskov Substitution Principle
info: rule `invalid-method-override` is enabled by default

error[invalid-method-override]: Invalid override of method `is_experimental`
  --> tests/extensions/test_extensions.py:62:9
   |
61 |     @staticmethod
62 |     def is_experimental(_base: str | None) -> bool:
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Definition is incompatible with `FakeExtension.is_experimental`
63 |         return True
   |
  ::: tests/extensions/test_extensions.py:38:9
   |
37 |     @staticmethod
38 |     def is_experimental(_base: tuple[str, ...] | None) -> bool:
   |         ------------------------------------------------------ `FakeExtension.is_experimental` defined here
39 |         """Return whether or not this extension is unstable for given base."""
40 |         return False
   |
info: This violates the Liskov Substitution Principle
info: rule `invalid-method-override` is enabled by default

error[invalid-method-override]: Invalid override of method `is_experimental`
  --> tests/extensions/test_registry.py:34:9
   |
33 |     @staticmethod
34 |     def is_experimental(_base: tuple[str, str] | None) -> bool:
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Definition is incompatible with `Extension.is_experimental`
35 |         return False
   |
  ::: charmcraft/extensions/extension.py:57:9
   |
55 |     @staticmethod
56 |     @abc.abstractmethod
57 |     def is_experimental(base: tuple[str, str] | None) -> bool:
   |         ----------------------------------------------------- `Extension.is_experimental` defined here
58 |         """Return whether or not this extension is unstable for given base."""
   |
info: This violates the Liskov Substitution Principle
info: rule `invalid-method-override` is enabled by default

warning[possibly-missing-attribute]: Submodule `application` may not be available as an attribute on module `charmcraft`
  --> tests/integration/commands/test_init.py:75:17
   |
73 | def init_command():
74 |     return init.InitCommand(
75 |         {"app": charmcraft.application.APP_METADATA, "services": None}
   |                 ^^^^^^^^^^^^^^^^^^^^^^
76 |     )
   |
help: Consider explicitly importing `charmcraft.application`
info: rule `possibly-missing-attribute` is enabled by default

error[unresolved-attribute]: Object of type `RecordingEmitter` has no attribute `assert_json_output`
   --> tests/integration/commands/test_store_commands.py:225:9
    |
223 |             },
224 |         ]
225 |         emitter.assert_json_output(  # pyright: ignore[reportAttributeAccessIssue]
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^
226 |             expected
227 |         )
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Unresolved attribute `client` on type `AppService`.
  --> tests/integration/conftest.py:45:5
   |
43 |     services.register_services()
44 |     factory = craft_application.ServiceFactory(app=application.APP_METADATA)
45 |     factory.get("store").client = mock.Mock(spec_set=craft_store.StoreClient)  # pyright: ignore[reportAttributeAccessIssue]
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
46 |     factory.update_kwargs(
47 |         "charm_libs",
   |
info: rule `unresolved-attribute` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
  --> tests/integration/services/test_image.py:28:9
   |
26 |     service = ImageService(
27 |         app=application.APP_METADATA,
28 |         services=None,  # pyright: ignore[reportArgumentType]
   |         ^^^^^^^^^^^^^ Expected `ServiceFactory`, found `None`
29 |     )
30 |     service.setup()
   |
info: Method defined here
  --> .venv/lib/python3.12/site-packages/craft_application/services/base.py:44:9
   |
42 |     """
43 |
44 |     def __init__(self, app: AppMetadata, services: ServiceFactory) -> None:
   |         ^^^^^^^^                         ------------------------ Parameter declared here
45 |         self._app = app
46 |         self._services = services
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/integration/services/test_lifecycle.py:40:17
   |
38 |                 platform="something",
39 |                 build_on=craft_platforms.DebianArchitecture.from_host(),
40 |                 build_for="invalid",  # pyright: ignore[reportArgumentType]
   |                 ^^^^^^^^^^^^^^^^^^^ Expected `DebianArchitecture | Literal["all"]`, found `Literal["invalid"]`
41 |                 build_base=craft_platforms.DistroBase(distro.id(), distro.version()),
42 |             )
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/integration/services/test_lifecycle.py:88:17
   |
86 |                 platform="something",
87 |                 build_on=host_arch,
88 |                 build_for=f"{foreign_arch}-{host_arch}",  # pyright: ignore[reportArgumentType]
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `DebianArchitecture | Literal["all"]`, found `str`
89 |                 build_base=craft_platforms.DistroBase(distro.id(), distro.version()),
90 |             )
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/integration/services/test_provider.py:56:28
   |
54 |     assert not lock_file.exists()
55 |
56 |     with provider.instance(**provider_kwargs):
   |                            ^^^^^^^^^^^^^^^^^ Expected `BuildInfo`, found `Unknown | BuildInfo | Path`
57 |         # Test that the cache lock gets created
58 |         assert lock_file.is_file()
   |
info: Element `Path` of this union is not assignable to `BuildInfo`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/integration/services/test_provider.py:56:28
   |
54 |     assert not lock_file.exists()
55 |
56 |     with provider.instance(**provider_kwargs):
   |                            ^^^^^^^^^^^^^^^^^ Expected `Path`, found `Unknown | BuildInfo | Path`
57 |         # Test that the cache lock gets created
58 |         assert lock_file.is_file()
   |
info: Element `BuildInfo` of this union is not assignable to `Path`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/integration/services/test_provider.py:56:28
   |
54 |     assert not lock_file.exists()
55 |
56 |     with provider.instance(**provider_kwargs):
   |                            ^^^^^^^^^^^^^^^^^ Expected `bool`, found `Unknown | BuildInfo | Path`
57 |         # Test that the cache lock gets created
58 |         assert lock_file.is_file()
   |
info: Union elements `BuildInfo` and `Path` are not assignable to `bool`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/integration/services/test_provider.py:56:28
   |
54 |     assert not lock_file.exists()
55 |
56 |     with provider.instance(**provider_kwargs):
   |                            ^^^^^^^^^^^^^^^^^ Expected `bool`, found `Unknown | BuildInfo | Path`
57 |         # Test that the cache lock gets created
58 |         assert lock_file.is_file()
   |
info: Union elements `BuildInfo` and `Path` are not assignable to `bool`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/integration/services/test_provider.py:56:28
   |
54 |     assert not lock_file.exists()
55 |
56 |     with provider.instance(**provider_kwargs):
   |                            ^^^^^^^^^^^^^^^^^ Expected `bool`, found `Unknown | BuildInfo | Path`
57 |         # Test that the cache lock gets created
58 |         assert lock_file.is_file()
   |
info: Union elements `BuildInfo` and `Path` are not assignable to `bool`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/integration/services/test_provider.py:56:28
   |
54 |     assert not lock_file.exists()
55 |
56 |     with provider.instance(**provider_kwargs):
   |                            ^^^^^^^^^^^^^^^^^ Expected `str | None`, found `Unknown | BuildInfo | Path`
57 |         # Test that the cache lock gets created
58 |         assert lock_file.is_file()
   |
info: Union elements `BuildInfo` and `Path` are not assignable to `str | None`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/integration/services/test_provider.py:56:28
   |
54 |     assert not lock_file.exists()
55 |
56 |     with provider.instance(**provider_kwargs):
   |                            ^^^^^^^^^^^^^^^^^ Expected `((Executor, /) -> None) | None`, found `Unknown | BuildInfo | Path`
57 |         # Test that the cache lock gets created
58 |         assert lock_file.is_file()
   |
info: Union elements `BuildInfo` and `Path` are not assignable to `((Executor, /) -> None) | None`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/integration/services/test_provider.py:56:28
   |
54 |     assert not lock_file.exists()
55 |
56 |     with provider.instance(**provider_kwargs):
   |                            ^^^^^^^^^^^^^^^^^ Expected `bool | str | None`, found `Unknown | BuildInfo | Path`
57 |         # Test that the cache lock gets created
58 |         assert lock_file.is_file()
   |
info: Union elements `BuildInfo` and `Path` are not assignable to `bool | str | None`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:101:28
    |
 99 |     }
100 |
101 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `BuildInfo`, found `Unknown | BuildInfo | Path`
102 |         # Create a file in the cache and ensure it's not visible in the outer fs
103 |         instance.execute_run(["touch", "/root/.cache/cache_cached"])
    |
info: Element `Path` of this union is not assignable to `BuildInfo`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:101:28
    |
 99 |     }
100 |
101 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `Path`, found `Unknown | BuildInfo | Path`
102 |         # Create a file in the cache and ensure it's not visible in the outer fs
103 |         instance.execute_run(["touch", "/root/.cache/cache_cached"])
    |
info: Element `BuildInfo` of this union is not assignable to `Path`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:101:28
    |
 99 |     }
100 |
101 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `bool`, found `Unknown | BuildInfo | Path`
102 |         # Create a file in the cache and ensure it's not visible in the outer fs
103 |         instance.execute_run(["touch", "/root/.cache/cache_cached"])
    |
info: Union elements `BuildInfo` and `Path` are not assignable to `bool`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:101:28
    |
 99 |     }
100 |
101 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `bool`, found `Unknown | BuildInfo | Path`
102 |         # Create a file in the cache and ensure it's not visible in the outer fs
103 |         instance.execute_run(["touch", "/root/.cache/cache_cached"])
    |
info: Union elements `BuildInfo` and `Path` are not assignable to `bool`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:101:28
    |
 99 |     }
100 |
101 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `bool`, found `Unknown | BuildInfo | Path`
102 |         # Create a file in the cache and ensure it's not visible in the outer fs
103 |         instance.execute_run(["touch", "/root/.cache/cache_cached"])
    |
info: Union elements `BuildInfo` and `Path` are not assignable to `bool`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:101:28
    |
 99 |     }
100 |
101 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `str | None`, found `Unknown | BuildInfo | Path`
102 |         # Create a file in the cache and ensure it's not visible in the outer fs
103 |         instance.execute_run(["touch", "/root/.cache/cache_cached"])
    |
info: Union elements `BuildInfo` and `Path` are not assignable to `str | None`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:101:28
    |
 99 |     }
100 |
101 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `((Executor, /) -> None) | None`, found `Unknown | BuildInfo | Path`
102 |         # Create a file in the cache and ensure it's not visible in the outer fs
103 |         instance.execute_run(["touch", "/root/.cache/cache_cached"])
    |
info: Union elements `BuildInfo` and `Path` are not assignable to `((Executor, /) -> None) | None`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:101:28
    |
 99 |     }
100 |
101 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `bool | str | None`, found `Unknown | BuildInfo | Path`
102 |         # Create a file in the cache and ensure it's not visible in the outer fs
103 |         instance.execute_run(["touch", "/root/.cache/cache_cached"])
    |
info: Union elements `BuildInfo` and `Path` are not assignable to `bool | str | None`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:134:28
    |
132 |         "cache_path": cache_path,
133 |     }
134 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `BuildInfo`, found `Unknown | BuildInfo | Path`
135 |         instance.execute_run(["test", "-d", "/root/.cache"], check=True)
136 |         instance.execute_run(
    |
info: Element `Path` of this union is not assignable to `BuildInfo`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:134:28
    |
132 |         "cache_path": cache_path,
133 |     }
134 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `Path`, found `Unknown | BuildInfo | Path`
135 |         instance.execute_run(["test", "-d", "/root/.cache"], check=True)
136 |         instance.execute_run(
    |
info: Element `BuildInfo` of this union is not assignable to `Path`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:134:28
    |
132 |         "cache_path": cache_path,
133 |     }
134 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `bool`, found `Unknown | BuildInfo | Path`
135 |         instance.execute_run(["test", "-d", "/root/.cache"], check=True)
136 |         instance.execute_run(
    |
info: Union elements `BuildInfo` and `Path` are not assignable to `bool`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:134:28
    |
132 |         "cache_path": cache_path,
133 |     }
134 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `bool`, found `Unknown | BuildInfo | Path`
135 |         instance.execute_run(["test", "-d", "/root/.cache"], check=True)
136 |         instance.execute_run(
    |
info: Union elements `BuildInfo` and `Path` are not assignable to `bool`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:134:28
    |
132 |         "cache_path": cache_path,
133 |     }
134 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `bool`, found `Unknown | BuildInfo | Path`
135 |         instance.execute_run(["test", "-d", "/root/.cache"], check=True)
136 |         instance.execute_run(
    |
info: Union elements `BuildInfo` and `Path` are not assignable to `bool`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:134:28
    |
132 |         "cache_path": cache_path,
133 |     }
134 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `str | None`, found `Unknown | BuildInfo | Path`
135 |         instance.execute_run(["test", "-d", "/root/.cache"], check=True)
136 |         instance.execute_run(
    |
info: Union elements `BuildInfo` and `Path` are not assignable to `str | None`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:134:28
    |
132 |         "cache_path": cache_path,
133 |     }
134 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `((Executor, /) -> None) | None`, found `Unknown | BuildInfo | Path`
135 |         instance.execute_run(["test", "-d", "/root/.cache"], check=True)
136 |         instance.execute_run(
    |
info: Union elements `BuildInfo` and `Path` are not assignable to `((Executor, /) -> None) | None`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:134:28
    |
132 |         "cache_path": cache_path,
133 |     }
134 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `bool | str | None`, found `Unknown | BuildInfo | Path`
135 |         instance.execute_run(["test", "-d", "/root/.cache"], check=True)
136 |         instance.execute_run(
    |
info: Union elements `BuildInfo` and `Path` are not assignable to `bool | str | None`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[unresolved-import]: Cannot resolve imported module `charm`
  --> tests/spread/commands/init-extensions/tests/unit/test_charm.py:9:8
   |
 7 | import pathlib
 8 |
 9 | import charm
   |        ^^^^^
10 | import scenario
11 | import scenario.errors
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `scenario`
  --> tests/spread/commands/init-extensions/tests/unit/test_charm.py:10:8
   |
 9 | import charm
10 | import scenario
   |        ^^^^^^^^
11 | import scenario.errors
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `scenario.errors`
  --> tests/spread/commands/init-extensions/tests/unit/test_charm.py:11:8
   |
 9 | import charm
10 | import scenario
11 | import scenario.errors
   |        ^^^^^^^^^^^^^^^
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/dependencies/setuptools-scm-python/src/charm.py:9:8
   |
 7 | import logging
 8 |
 9 | import ops
   |        ^^^
10 |
11 | # A standalone module for workload-specific logic (no charming concerns):
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `setuptools_scm_python`
  --> tests/spread/dependencies/setuptools-scm-python/src/charm.py:12:8
   |
11 | # A standalone module for workload-specific logic (no charming concerns):
12 | import setuptools_scm_python
   |        ^^^^^^^^^^^^^^^^^^^^^
13 |
14 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/dependencies/strict-dependencies-errors/extra-binary-packages/src/charm.py:17:8
   |
15 | import logging
16 |
17 | import ops
   |        ^^^
18 |
19 | # Log messages can be retrieved using juju debug-log
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/dependencies/strict-dependencies-errors/extra-packages/src/charm.py:17:8
   |
15 | import logging
16 |
17 | import ops
   |        ^^^
18 |
19 | # Log messages can be retrieved using juju debug-log
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/dependencies/strict-dependencies-errors/missing-packages/src/charm.py:17:8
   |
15 | import logging
16 |
17 | import ops
   |        ^^^
18 |
19 | # Log messages can be retrieved using juju debug-log
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/dependencies/strict-dependencies-errors/no-requirements/src/charm.py:17:8
   |
15 | import logging
16 |
17 | import ops
   |        ^^^
18 |
19 | # Log messages can be retrieved using juju debug-log
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/dependencies/strict-dependencies/charm/src/charm.py:17:8
   |
15 | import logging
16 |
17 | import ops
   |        ^^^
18 |
19 | # Log messages can be retrieved using juju debug-log
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `charms.reactive`
 --> tests/spread/smoketests/reactive/reactivecharm/reactive/reactivecharm.py:1:6
  |
1 | from charms.reactive import set_flag, when_not
  |      ^^^^^^^^^^^^^^^
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/ubuntu-20.04/charm/bases/src/charm.py:18:8
   |
16 | from typing import cast
17 |
18 | import ops
   |        ^^^
19 |
20 | # Log messages can be retrieved using juju debug-log
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/ubuntu-20.04/charm/platforms/src/charm.py:9:8
   |
 7 | import logging
 8 |
 9 | import ops
   |        ^^^
10 |
11 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/ubuntu-22.04/charm/bases/src/charm.py:18:8
   |
16 | from typing import cast
17 |
18 | import ops
   |        ^^^
19 |
20 | # Log messages can be retrieved using juju debug-log
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/ubuntu-22.04/charm/platforms/src/charm.py:9:8
   |
 7 | import logging
 8 |
 9 | import ops
   |        ^^^
10 |
11 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/ubuntu-24.04/charm/platforms/src/charm.py:9:8
   |
 7 | import logging
 8 |
 9 | import ops
   |        ^^^
10 |
11 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
 --> tests/spread/ubuntu-24.04/test-cmd/src/charm.py:6:8
  |
4 | import logging
5 |
6 | import ops
  |        ^^^
7 |
8 | # A standalone module for workload-specific logic (no charming concerns):
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `test_cmd`
  --> tests/spread/ubuntu-24.04/test-cmd/src/charm.py:9:8
   |
 8 | # A standalone module for workload-specific logic (no charming concerns):
 9 | import test_cmd
   |        ^^^^^^^^
10 |
11 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `pytest_operator.plugin`
 --> tests/spread/ubuntu-24.04/test-cmd/tests/integration/test_charm.py:7:6
  |
5 | import pytest
6 | import yaml
7 | from pytest_operator.plugin import OpsTest
  |      ^^^^^^^^^^^^^^^^^^^^^^
8 |
9 | logger = logging.getLogger(__name__)
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
 --> tests/spread/ubuntu-24.04/test-cmd/tests/unit/test_charm.py:2:6
  |
1 | import pytest
2 | from ops import testing
  |      ^^^
3 |
4 | from charm import TestCmdCharm
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `charm`
 --> tests/spread/ubuntu-24.04/test-cmd/tests/unit/test_charm.py:4:6
  |
2 | from ops import testing
3 |
4 | from charm import TestCmdCharm
  |      ^^^^^
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/ubuntu-25.10/charm/platforms/src/charm.py:9:8
   |
 7 | import logging
 8 |
 9 | import ops
   |        ^^^
10 |
11 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
 --> tests/spread/ubuntu-25.10/test-cmd/src/charm.py:6:8
  |
4 | import logging
5 |
6 | import ops
  |        ^^^
7 |
8 | # A standalone module for workload-specific logic (no charming concerns):
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `test_cmd`
  --> tests/spread/ubuntu-25.10/test-cmd/src/charm.py:9:8
   |
 8 | # A standalone module for workload-specific logic (no charming concerns):
 9 | import test_cmd
   |        ^^^^^^^^
10 |
11 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `pytest_operator.plugin`
 --> tests/spread/ubuntu-25.10/test-cmd/tests/integration/test_charm.py:7:6
  |
5 | import pytest
6 | import yaml
7 | from pytest_operator.plugin import OpsTest
  |      ^^^^^^^^^^^^^^^^^^^^^^
8 |
9 | logger = logging.getLogger(__name__)
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
 --> tests/spread/ubuntu-25.10/test-cmd/tests/unit/test_charm.py:2:6
  |
1 | import pytest
2 | from ops import testing
  |      ^^^
3 |
4 | from charm import TestCmdCharm
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `charm`
 --> tests/spread/ubuntu-25.10/test-cmd/tests/unit/test_charm.py:4:6
  |
2 | from ops import testing
3 |
4 | from charm import TestCmdCharm
  |      ^^^^^
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/ubuntu-26.04/charm/platforms/src/charm.py:9:8
   |
 7 | import logging
 8 |
 9 | import ops
   |        ^^^
10 |
11 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
 --> tests/spread/ubuntu-26.04/test-cmd/src/charm.py:6:8
  |
4 | import logging
5 |
6 | import ops
  |        ^^^
7 |
8 | # A standalone module for workload-specific logic (no charming concerns):
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `test_cmd`
  --> tests/spread/ubuntu-26.04/test-cmd/src/charm.py:9:8
   |
 8 | # A standalone module for workload-specific logic (no charming concerns):
 9 | import test_cmd
   |        ^^^^^^^^
10 |
11 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `pytest_operator.plugin`
 --> tests/spread/ubuntu-26.04/test-cmd/tests/integration/test_charm.py:7:6
  |
5 | import pytest
6 | import yaml
7 | from pytest_operator.plugin import OpsTest
  |      ^^^^^^^^^^^^^^^^^^^^^^
8 |
9 | logger = logging.getLogger(__name__)
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
 --> tests/spread/ubuntu-26.04/test-cmd/tests/unit/test_charm.py:2:6
  |
1 | import pytest
2 | from ops import testing
  |      ^^^
3 |
4 | from charm import TestCmdCharm
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `charm`
 --> tests/spread/ubuntu-26.04/test-cmd/tests/unit/test_charm.py:4:6
  |
2 | from ops import testing
3 |
4 | from charm import TestCmdCharm
  |      ^^^^^
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
   --> tests/test_instrum.py:256:32
    |
254 |     assert measurements.measurements == {}
255 |
256 |     with Timer("test message", foo=42):
    |                                ^^^^^^ Expected `dict[str, Any]`, found `Literal[42]`
257 |         pass
    |
info: Method defined here
   --> charmcraft/instrum.py:129:9
    |
127 |     """
128 |
129 |     def __init__(self, msg: str, **extra_info: dict[str, Any]):
    |         ^^^^^^^^                 ---------------------------- Parameter declared here
130 |         self.msg = msg
131 |         self.extra_info = extra_info
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
   --> tests/test_instrum.py:274:28
    |
272 |     monkeypatch.setattr(instrum, "_measurements", measurements)
273 |
274 |     @Timer("test message", foo=42)
    |                            ^^^^^^ Expected `dict[str, Any]`, found `Literal[42]`
275 |     def test_function(a, b):
276 |         assert a == 17
    |
info: Method defined here
   --> charmcraft/instrum.py:129:9
    |
127 |     """
128 |
129 |     def __init__(self, msg: str, **extra_info: dict[str, Any]):
    |         ^^^^^^^^                 ---------------------------- Parameter declared here
130 |         self.msg = msg
131 |         self.extra_info = extra_info
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
   --> tests/test_instrum.py:298:32
    |
296 |     assert measurements.measurements == {}
297 |
298 |     with Timer("test message", foo=42) as timer:
    |                                ^^^^^^ Expected `dict[str, Any]`, found `Literal[42]`
299 |         timer.mark("middle 1")
300 |         timer.mark("middle 2")
    |
info: Method defined here
   --> charmcraft/instrum.py:129:9
    |
127 |     """
128 |
129 |     def __init__(self, msg: str, **extra_info: dict[str, Any]):
    |         ^^^^^^^^                 ---------------------------- Parameter declared here
130 |         self.msg = msg
131 |         self.extra_info = extra_info
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-assignment]: Implicit shadowing of function `write`
  --> tests/unit/commands/test_lifecycle.py:91:5
   |
90 |     libs_service = cast("CharmLibsService", service_factory.get("charm_libs"))
91 |     libs_service.write = mock.Mock(wraps=libs_service.write)
   |     ^^^^^^^^^^^^^^^^^^
92 |
93 |     pack._update_charm_libs()
   |
info: Annotate to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[unresolved-attribute]: Object of type `bound method CharmLibsService.write(library: Library) -> None` has no attribute `assert_called_once_with`
  --> tests/unit/commands/test_lifecycle.py:95:5
   |
93 |     pack._update_charm_libs()
94 |
95 |     libs_service.write.assert_called_once_with(store_lib)
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
96 |
97 |     with check():
   |
info: rule `unresolved-attribute` is enabled by default

error[non-subscriptable]: Cannot subscript object of type `None` with no `__getitem__` method
  --> tests/unit/models/test_config.py:75:23
   |
73 |     config = JujuConfig(options={"my-opt": option})
74 |
75 |     assert isinstance(config.options["my-opt"], type_)
   |                       ^^^^^^^^^^^^^^^^^^^^^^^^
   |
info: rule `non-subscriptable` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/unit/models/test_project.py:813:13
    |
811 |             description="",
812 |             base=base,
813 |             platforms={"amd64": None},
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `PlatformsDict`, found `dict[Unknown | str, Unknown | None]`
814 |             parts={"charm": {"plugin": "charm"}},
815 |         )
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `__new__` is incorrect
  --> tests/unit/parts/plugins/test_charm.py:97:22
   |
96 |     pip_constraint_file = (
97 |         pathlib.Path(parts.plugins.__file__).parent / "charm-constraints.txt"
   |                      ^^^^^^^^^^^^^^^^^^^^^^ Expected `str | PathLike[str]`, found `str | None`
98 |     )
   |
info: Element `None` of this union is not assignable to `str | PathLike[str]`
info: Function defined here
   --> stdlib/pathlib/__init__.pyi:299:13
    |
297 |         def __new__(cls, *args: StrPath, **kwargs: Unused) -> Self: ...  # pyright: ignore[reportInconsistentConstructor]
298 |     else:
299 |         def __new__(cls, *args: StrPath, **kwargs: Unused) -> Self: ...
    |             ^^^^^^^      -------------- Parameter declared here
300 |
301 |     @classmethod
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-assignment]: Implicit shadowing of function `_get_pip`
  --> tests/unit/parts/plugins/test_poetry.py:40:5
   |
39 | def test_get_pip_install_commands(poetry_plugin: plugins.PoetryPlugin):
40 |     poetry_plugin._get_pip = lambda: "/python -m pip"
   |     ^^^^^^^^^^^^^^^^^^^^^^
41 |
42 |     assert poetry_plugin._get_pip_install_commands(
   |
info: Annotate to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Implicit shadowing of function `_get_pip`
  --> tests/unit/parts/plugins/test_python.py:62:5
   |
60 |     }
61 |     python_plugin._options = plugins.PythonPluginProperties.unmarshal(spec)
62 |     python_plugin._get_pip = lambda: "/python -m pip"
   |     ^^^^^^^^^^^^^^^^^^^^^^
63 |     copy_src_cmd = (
64 |         f"cp --archive --recursive --reflink=auto {build_path}/src {install_path}"
   |
info: Annotate to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
   --> tests/unit/services/test_analysis.py:112:67
    |
110 | @pytest.fixture
111 | def analysis_service():
112 |     return analysis.AnalysisService(app=application.APP_METADATA, services=None)
    |                                                                   ^^^^^^^^^^^^^ Expected `ServiceFactory`, found `None`
    |
info: Method defined here
  --> charmcraft/services/analysis.py:37:9
   |
35 |     _project: models.CharmcraftProject  # type: ignore[assignment]
36 |
37 |     def __init__(  # (too many arguments)
   |         ^^^^^^^^
38 |         self,
39 |         app: craft_application.AppMetadata,
40 |         services: craft_application.ServiceFactory,
   |         ------------------------------------------ Parameter declared here
41 |     ) -> None:
42 |         super().__init__(app, services)
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/unit/services/test_lifecycle.py:55:17
   |
53 |                 platform="something",
54 |                 build_on=HOST_ARCH,
55 |                 build_for=plan_build_for,  # pyright: ignore[reportArgumentType]
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^ Expected `DebianArchitecture | Literal["all"]`, found `str`
56 |             )
57 |         ]
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/unit/services/test_lifecycle.py:94:17
   |
92 |                 platform="something",
93 |                 build_on=HOST_ARCH,
94 |                 build_for=f"{HOST_ARCH}-foreign",  # pyright: ignore[reportArgumentType]
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `DebianArchitecture | Literal["all"]`, found `str`
95 |             )
96 |         ]
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
  --> tests/unit/services/test_project.py:34:45
   |
32 | @pytest.fixture
33 | def service(project_path):
34 |     return ProjectService(app=APP_METADATA, services=None, project_dir=project_path)
   |                                             ^^^^^^^^^^^^^ Expected `ServiceFactory`, found `None`
   |
info: Method defined here
  --> .venv/lib/python3.12/site-packages/craft_application/services/project.py:57:9
   |
55 |     _project_model: models.Project | None
56 |
57 |     def __init__(
   |         ^^^^^^^^
58 |         self, app: AppMetadata, services: ServiceFactory, *, project_dir: pathlib.Path
   |                                 ------------------------ Parameter declared here
59 |     ) -> None:
60 |         super().__init__(app, services)
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
   --> tests/unit/services/test_provider.py:123:9
    |
121 |     provider_service = ProviderService(
122 |         app=APP_METADATA,
123 |         services=None,  # pyright: ignore[reportArgumentType]
    |         ^^^^^^^^^^^^^ Expected `ServiceFactory`, found `None`
124 |         work_dir=tmp_path,
125 |     )
    |
info: Method defined here
  --> charmcraft/services/provider.py:43:9
   |
41 |     """Business logic for getting providers."""
42 |
43 |     def __init__(
   |         ^^^^^^^^
44 |         self,
45 |         app: craft_application.AppMetadata,
46 |         services: craft_application.ServiceFactory,
   |         ------------------------------------------ Parameter declared here
47 |         *,
48 |         work_dir: pathlib.Path,
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
  --> tests/unit/services/test_store.py:50:56
   |
48 | @pytest.fixture(scope="module")
49 | def reusable_store():
50 |     store = StoreService(app=application.APP_METADATA, services=None)
   |                                                        ^^^^^^^^^^^^^ Expected `ServiceFactory`, found `None`
51 |     store.client = mock.Mock(spec_set=craft_store.StoreClient)
52 |     store._publisher = mock.Mock(spec_set=craft_store.PublisherGateway)
   |
info: Method defined here
  --> .venv/lib/python3.12/site-packages/craft_application/services/base.py:44:9
   |
42 |     """
43 |
44 |     def __init__(self, app: AppMetadata, services: ServiceFactory) -> None:
   |         ^^^^^^^^                         ------------------------ Parameter declared here
45 |         self._app = app
46 |         self._services = services
   |
info: rule `invalid-argument-type` is enabled by default

warning[possibly-missing-attribute]: Attribute `group` may be missing on object of type `Match[str] | None`
  --> tests/unit/test_linters.py:43:12
   |
41 | )
42 | def test_fuzz_python_name_regex(name, next_char, further_garbage):
43 |     assert linters.PYTHON_NAME_REGEX.match(name).group(0) == name
   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
44 |     assert linters.PYTHON_NAME_REGEX.match(f"{name}{next_char}").group(0) == name
45 |     assert (
   |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `group` may be missing on object of type `Match[str] | None`
  --> tests/unit/test_linters.py:44:12
   |
42 | def test_fuzz_python_name_regex(name, next_char, further_garbage):
43 |     assert linters.PYTHON_NAME_REGEX.match(name).group(0) == name
44 |     assert linters.PYTHON_NAME_REGEX.match(f"{name}{next_char}").group(0) == name
   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
45 |     assert (
46 |         linters.PYTHON_NAME_REGEX.match(f"{name}{next_char}{further_garbage}").group(0)
   |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `group` may be missing on object of type `Match[str] | None`
  --> tests/unit/test_linters.py:46:9
   |
44 |     assert linters.PYTHON_NAME_REGEX.match(f"{name}{next_char}").group(0) == name
45 |     assert (
46 |         linters.PYTHON_NAME_REGEX.match(f"{name}{next_char}{further_garbage}").group(0)
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
47 |         == name
48 |     )
   |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `group` may be missing on object of type `Match[str] | None`
  --> tests/unit/test_linters.py:62:12
   |
60 | )
61 | def test_min_version_regex_matches(string, expected):
62 |     assert linters.MIN_VERSION_REGEX.search(string).group(1) == expected
   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `group` may be missing on object of type `Match[str] | None`
  --> tests/unit/test_linters.py:76:24
   |
74 | )
75 | def test_approx_version_regex_matches(string, expected):
76 |     assert expected in linters.APPROX_VERSION_REGEX.search(string).group(1, 2)
   |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `group` may be missing on object of type `Match[str] | None`
  --> tests/unit/test_linters.py:84:12
   |
82 | )
83 | def test_exact_version_regex_matches(string, expected):
84 |     assert linters.EXACT_VERSION_REGEX.search(string).group(1) == expected
   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
info: rule `possibly-missing-attribute` is enabled by default

error[no-matching-overload]: No overload of function `format_content` matches arguments
   --> tests/unit/utils/test_cli.py:285:9
    |
283 | def test_format_content_invalid(fmt):
284 |     with pytest.raises(ValueError, match="^Unknown output format "):
285 |         format_content(None, fmt)
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^
    |
info: First overload defined here
   --> charmcraft/utils/cli.py:185:5
    |
184 |   @overload
185 |   def format_content(
    |  _____^
186 | |     content: dict[str, Any] | list[dict[str, Any]], fmt: OutputFormat | str | None
187 | | ) -> str: ...
    | |________^
    |
info: Possible overloads for function `format_content`:
info:   (content: dict[str, Any] | list[dict[str, Any]], fmt: OutputFormat | str | None) -> str
info:   (content: str | Real | list[Unknown] | dict[Unknown, Unknown], fmt: OutputFormat | str | None) -> str
info: Overload implementation defined here
   --> charmcraft/utils/cli.py:196:5
    |
196 | def format_content(content, fmt=None):
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
197 |     """Format command output."""
198 |     if not isinstance(fmt, OutputFormat):
    |
info: rule `no-matching-overload` is enabled by default

Found 151 diagnostics

Comment thread charmcraft/models/project.py Outdated

# Check all run-on bases across all base configurations
invalid_bases = set()
for base_config in self.bases:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot This is not relevant for charms that use the bases keyword.

This kind of thing is only needed for charms that use the platforms keyword.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in commit 3ad8b31. Removed the _validate_charmhub_with_bases validator from BasesCharm since it's unnecessary - BasesCharm can only use LEGACY_BASES (enforced by _validate_base), and all LEGACY_BASES are in CHARMHUB_ALLOWED_BASES. The validation is only needed for PlatformCharm which can use newer bases that aren't allowed with charmhub.

The _validate_charmhub_with_bases validator is not needed for BasesCharm because:
- BasesCharm can only use LEGACY_BASES (enforced by _validate_base)
- All LEGACY_BASES are in CHARMHUB_ALLOWED_BASES
- The validation is only relevant for PlatformCharm which can use newer bases

Co-authored-by: lengau <4305943+lengau@users.noreply.github.com>
Copilot AI requested a review from lengau December 8, 2025 17:50
return {name: process_part_config(part) for name, part in parts.items()}

@pydantic.model_validator(mode="after")
def _warn_charmhub_deprecated(self) -> Self:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot keep this method.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Restored in commit 06c3179. The _warn_charmhub_deprecated method is now back in the CharmcraftProject class to properly display deprecation warnings when the charmhub field is used.

Added back the _warn_charmhub_deprecated validator to CharmcraftProject to ensure
deprecation warnings are properly displayed when charmhub field is used.

Co-authored-by: lengau <4305943+lengau@users.noreply.github.com>
Copilot AI requested a review from lengau December 8, 2025 19:56
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Dec 8, 2025

Type checking with ty failed. This is a notification only and does not require action.

Command output
warning[possibly-missing-attribute]: Attribute `bases` may be missing on object of type `PlatformCharm | BasesCharm`
   --> charmcraft/application/commands/lifecycle.py:119:36
    |
118 |         msg = "Bases index '{}' is invalid (must be >= 0 and fit in configured bases)."
119 |         len_configured_bases = len(project.bases)
    |                                    ^^^^^^^^^^^^^
120 |         for bases_index in bases_indices:
121 |             if bases_index < 0:
    |
info: rule `possibly-missing-attribute` is enabled by default

error[unresolved-attribute]: Object of type `AppService | type[AppService]` has no attribute `get_credentials`
   --> charmcraft/application/commands/store.py:210:27
    |
209 |         if parsed_args.export:
210 |             credentials = self._services.store.get_credentials(
    |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
211 |                 packages=packages, **kwargs
212 |             )
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `AppService | type[AppService]` has no attribute `login`
   --> charmcraft/application/commands/store.py:218:13
    |
216 |             )
217 |         else:
218 |             self._services.store.login(packages=packages, **kwargs)
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^
219 |             username = self._services.store.get_account_info()["username"]
220 |             emit.message(f"Logged in as {username!r}.")
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `AppService | type[AppService]` has no attribute `get_account_info`
   --> charmcraft/application/commands/store.py:219:24
    |
217 |         else:
218 |             self._services.store.login(packages=packages, **kwargs)
219 |             username = self._services.store.get_account_info()["username"]
    |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
220 |             emit.message(f"Logged in as {username!r}.")
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `AppService | type[AppService]` has no attribute `logout`
   --> charmcraft/application/commands/store.py:244:13
    |
242 |         """Run the command."""
243 |         try:
244 |             self._services.store.logout()
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
245 |             emit.message("Charmhub token cleared.")
246 |         except CredentialsUnavailable:
    |
info: rule `unresolved-attribute` is enabled by default

error[not-iterable]: Object of type `IO[str] | None` may not be iterable
   --> charmcraft/charm_builder.py:423:17
    |
422 |     # https://github.com/microsoft/pylance-release/issues/2385
423 |     for line in proc.stdout:  # pyright: ignore[reportOptionalIterable]
    |                 ^^^^^^^^^^^
424 |         print(f"   :: {line.rstrip()}")
425 |     retcode = proc.wait()
    |
info: It may not have an `__iter__` method and it doesn't have a `__getitem__` method
info: rule `not-iterable` is enabled by default

warning[possibly-missing-attribute]: Attribute `split` may be missing on object of type `str | None`
   --> charmcraft/linters.py:238:23
    |
236 |                     yield name.name.split(".")
237 |             elif isinstance(node, ast.ImportFrom):
238 |                 yield node.module.split(".")
    |                       ^^^^^^^^^^^^^^^^^
239 |
240 |     def _check_operator(self, basedir: pathlib.Path) -> bool:
    |
info: rule `possibly-missing-attribute` is enabled by default

error[invalid-argument-type]: Argument to function `quote` is incorrect
   --> charmcraft/parts/plugins/_charm.py:289:42
    |
287 |             build_cmd.extend(self._get_legacy_dependencies_parameters())
288 |
289 |         commands = [" ".join(shlex.quote(i) for i in build_cmd)]
    |                                          ^ Expected `str`, found `Unknown | str | None`
290 |
291 |         # hook a callback after the BUILD happened (to collect metrics left by charm builder)
    |
info: Element `None` of this union is not assignable to `str`
info: Function defined here
  --> stdlib/shlex.pyi:34:5
   |
32 |     """Return a shell-escaped string from *split_command*."""
33 |
34 | def quote(s: str) -> str:
   |     ^^^^^ ------ Parameter declared here
35 |     """Return a shell-escaped version of the string *s*."""
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `merge_from` is incorrect
   --> charmcraft/parts/plugins/_charm.py:341:28
    |
339 |     def post_build_callback(self, step_info):
340 |         """Collect metrics left by charm_builder.py."""
341 |         instrum.merge_from(env.get_charm_builder_metrics_path())
    |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str`, found `Path`
342 |
343 |     def _get_os_special_priority_paths(self) -> str | None:
    |
info: Method defined here
  --> charmcraft/instrum.py:77:9
   |
75 |             json.dump(measurements, fh, indent=4)
76 |
77 |     def merge_from(self, filename: str) -> None:
   |         ^^^^^^^^^^       ------------- Parameter declared here
78 |         """Merge measurements from a file to the current ongoing structure."""
79 |         with open(filename) as fh:
   |
info: rule `invalid-argument-type` is enabled by default

warning[possibly-missing-attribute]: Attribute `login` may be missing on object of type `Unknown | Client | AnonymousClient`
   --> charmcraft/store/store.py:227:27
    |
226 |         try:
227 |             credentials = self._client.login(**kwargs)
    |                           ^^^^^^^^^^^^^^^^^^
228 |         except CredentialsAlreadyAvailable as exc:
229 |             raise CraftError(
    |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `logout` may be missing on object of type `Unknown | Client | AnonymousClient`
   --> charmcraft/store/store.py:241:9
    |
239 |         There's no action really in the Store to logout, we just remove local credentials.
240 |         """
241 |         self._client.logout()
    |         ^^^^^^^^^^^^^^^^^^^
242 |
243 |     @_store_client_wrapper(auto_login=False)
    |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `whoami` may be missing on object of type `Unknown | Client | AnonymousClient`
   --> charmcraft/store/store.py:246:20
    |
244 |     def whoami(self):
245 |         """Return authenticated user details."""
246 |         response = self._client.whoami()
    |                    ^^^^^^^^^^^^^^^^^^^
247 |
248 |         acc = response["account"]
    |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `whoami` may be missing on object of type `Unknown | Client | AnonymousClient`
   --> charmcraft/store/store.py:268:9
    |
266 |     def _check_authorized(self) -> None:
267 |         """Check if current credentials authenticated."""
268 |         self._client.whoami()
    |         ^^^^^^^^^^^^^^^^^^^
269 |
270 |     @_store_client_wrapper()
    |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `unregister_name` may be missing on object of type `Unknown | Client | AnonymousClient`
   --> charmcraft/store/store.py:285:9
    |
283 |         :raises: error messages from craft-store
284 |         """
285 |         self._client.unregister_name(name)
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
286 |
287 |     @_store_client_wrapper()
    |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `push_file` may be missing on object of type `Unknown | Client | AnonymousClient`
   --> charmcraft/store/store.py:311:21
    |
309 |         self._check_authorized()
310 |
311 |         upload_id = self._client.push_file(filepath)
    |                     ^^^^^^^^^^^^^^^^^^^^^^
312 |         payload = {"upload-id": upload_id}
313 |         if extra_fields is not None:
    |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `list_resource_revisions` may be missing on object of type `Unknown | Client | AnonymousClient`
   --> charmcraft/store/store.py:506:16
    |
504 |     ) -> list[CharmResourceRevision]:
505 |         """Return revisions for the indicated charm resource."""
506 |         return self._client.list_resource_revisions(charm_name, resource_name)
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
507 |
508 |     @_store_client_wrapper()
    |
info: rule `possibly-missing-attribute` is enabled by default

error[invalid-argument-type]: Argument to function `__new__` is incorrect
   --> docs/conf.py:242:38
    |
240 | # Setup libraries documentation snippets for use in charmcraft docs.
241 | common_docs_path = pathlib.Path(__file__).parent / "common"
242 | craft_parts_docs_path = pathlib.Path(craft_parts_docs.__file__).parent / "craft-parts"
    |                                      ^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str | PathLike[str]`, found `str | None`
243 | (common_docs_path / "craft-parts").unlink(missing_ok=True)
244 | (common_docs_path / "craft-parts").symlink_to(craft_parts_docs_path, target_is_directory=True)
    |
info: Element `None` of this union is not assignable to `str | PathLike[str]`
info: Function defined here
   --> stdlib/pathlib/__init__.pyi:299:13
    |
297 |         def __new__(cls, *args: StrPath, **kwargs: Unused) -> Self: ...  # pyright: ignore[reportInconsistentConstructor]
298 |     else:
299 |         def __new__(cls, *args: StrPath, **kwargs: Unused) -> Self: ...
    |             ^^^^^^^      -------------- Parameter declared here
300 |
301 |     @classmethod
    |
info: rule `invalid-argument-type` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> docs/howto/code/custom-action-clearsession/clearsession_action_charm.py:10:8
   |
 8 | import typing
 9 |
10 | import ops
   |        ^^^
11 |
12 | import paas_charm.django
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `paas_charm.django`
  --> docs/howto/code/custom-action-clearsession/clearsession_action_charm.py:12:8
   |
10 | import ops
11 |
12 | import paas_charm.django
   |        ^^^^^^^^^^^^^^^^^
13 |
14 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `flask`
 --> docs/howto/code/custom-action-updatelogfile/app.py:3:8
  |
1 | # initial hello world Flask app
2 |
3 | import flask
  |        ^^^^^
4 |
5 | app = flask.Flask(__name__)
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> docs/howto/code/custom-action-updatelogfile/updatelogfile_action_charm.py:10:8
   |
 8 | import typing
 9 |
10 | import ops
   |        ^^^
11 |
12 | import paas_charm.flask
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `paas_charm.flask`
  --> docs/howto/code/custom-action-updatelogfile/updatelogfile_action_charm.py:12:8
   |
10 | import ops
11 |
12 | import paas_charm.flask
   |        ^^^^^^^^^^^^^^^^
13 |
14 | import requests
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `flask`
 --> docs/howto/code/flask-async/app.py:3:8
  |
1 | from time import sleep
2 |
3 | import flask
  |        ^^^^^
4 |
5 | app = flask.Flask(__name__)
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `django.contrib`
  --> docs/tutorial/code/django/urls_django_hello_world.py:17:6
   |
15 |     2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
16 | """
17 | from django.contrib import admin
   |      ^^^^^^^^^^^^^^
18 | from django.urls import include, path
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `django.urls`
  --> docs/tutorial/code/django/urls_django_hello_world.py:18:6
   |
16 | """
17 | from django.contrib import admin
18 | from django.urls import include, path
   |      ^^^^^^^^^^^
19 |
20 | urlpatterns = [
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `django.urls`
 --> docs/tutorial/code/django/urls_greeting.py:1:6
  |
1 | from django.urls import path
  |      ^^^^^^^^^^^
2 |
3 | from . import views
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Module `docs.tutorial.code.django` has no member `views`
 --> docs/tutorial/code/django/urls_greeting.py:3:15
  |
1 | from django.urls import path
2 |
3 | from . import views
  |               ^^^^^
4 |
5 | urlpatterns = [
  |
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `django.http`
 --> docs/tutorial/code/django/views_greeting.py:1:6
  |
1 | from django.http import HttpResponse
  |      ^^^^^^^^^^^
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `django.http`
 --> docs/tutorial/code/django/views_greeting_configuration.py:3:6
  |
1 | import os
2 |
3 | from django.http import HttpResponse
  |      ^^^^^^^^^^^
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `fastapi`
 --> docs/tutorial/code/fastapi/app.py:1:6
  |
1 | from fastapi import FastAPI
  |      ^^^^^^^
2 |
3 | app = FastAPI()
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `fastapi`
 --> docs/tutorial/code/fastapi/greeting_app.py:3:6
  |
1 | import os
2 |
3 | from fastapi import FastAPI
  |      ^^^^^^^
4 |
5 | app = FastAPI()
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `fastapi`
 --> docs/tutorial/code/fastapi/visitors_app.py:7:6
  |
5 | from typing import Annotated
6 |
7 | from fastapi import FastAPI, Header
  |      ^^^^^^^
8 | import psycopg2
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `psycopg2`
  --> docs/tutorial/code/fastapi/visitors_app.py:8:8
   |
 7 | from fastapi import FastAPI, Header
 8 | import psycopg2
   |        ^^^^^^^^
 9 |
10 | app = FastAPI()
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `psycopg2`
 --> docs/tutorial/code/fastapi/visitors_migrate.py:5:8
  |
3 | import os
4 |
5 | import psycopg2
  |        ^^^^^^^^
6 |
7 | DATABASE_URI = os.environ["POSTGRESQL_DB_CONNECT_STRING"]
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `flask`
 --> docs/tutorial/code/flask/app.py:3:8
  |
1 | # initial hello world Flask app
2 |
3 | import flask
  |        ^^^^^
4 |
5 | app = flask.Flask(__name__)
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `flask`
 --> docs/tutorial/code/flask/greeting_app.py:3:8
  |
1 | # Flask app with a greeting configuration
2 |
3 | import flask
  |        ^^^^^
4 |
5 | app = flask.Flask(__name__)
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `flask`
 --> docs/tutorial/code/flask/visitors_app.py:6:8
  |
4 | import os
5 |
6 | import flask
  |        ^^^^^
7 | import psycopg2
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `psycopg2`
 --> docs/tutorial/code/flask/visitors_app.py:7:8
  |
6 | import flask
7 | import psycopg2
  |        ^^^^^^^^
8 |
9 | app = flask.Flask(__name__)
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `psycopg2`
 --> docs/tutorial/code/flask/visitors_migrate.py:5:8
  |
3 | import os
4 |
5 | import psycopg2
  |        ^^^^^^^^
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `list[ResponseCharmResourceBase]`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `datetime`, and 2 more union elements, are not assignable to `list[ResponseCharmResourceBase]`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `datetime`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `datetime`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `str`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `str`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `int`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `int`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `str`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `str`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `str`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `str`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `str`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `str`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `str`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `str`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `ByteSize`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 3 more union elements, are not assignable to `ByteSize`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `str`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `str`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `datetime | None`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `datetime | None`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `str | None`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `str | None`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
    --> tests/commands/test_store_api.py:1628:13
     |
1626 |     expected = {
1627 |         (test_lib_id, test_api): Library(
1628 |             api=test_api,
     |             ^^^^^^^^^^^^ Expected `int`, found `Literal["test-api-version"]`
1629 |             content=test_content,
1630 |             content_hash=test_hash,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
    --> tests/commands/test_store_api.py:1634:13
     |
1632 |             lib_name=test_lib_name,
1633 |             charm_name=test_charm_name,
1634 |             patch=test_patch,
     |             ^^^^^^^^^^^^^^^^ Expected `int`, found `Literal["test-patch-version"]`
1635 |         ),
1636 |     }
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
    --> tests/commands/test_store_api.py:1718:13
     |
1716 |     expected = {
1717 |         (test_lib_id_1, test_api_1): Library(
1718 |             api=test_api_1,
     |             ^^^^^^^^^^^^^^ Expected `int`, found `Literal["test-api-version-1"]`
1719 |             content=test_content_1,
1720 |             content_hash=test_hash_1,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
    --> tests/commands/test_store_api.py:1724:13
     |
1722 |             lib_name=test_lib_name_1,
1723 |             charm_name=test_charm_name_1,
1724 |             patch=test_patch_1,
     |             ^^^^^^^^^^^^^^^^^^ Expected `int`, found `Literal["test-patch-version-1"]`
1725 |         ),
1726 |         (test_lib_id_2, test_api_2): Library(
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
    --> tests/commands/test_store_api.py:1727:13
     |
1725 |         ),
1726 |         (test_lib_id_2, test_api_2): Library(
1727 |             api=test_api_2,
     |             ^^^^^^^^^^^^^^ Expected `int`, found `Literal["test-api-version-2"]`
1728 |             content=test_content_2,
1729 |             content_hash=test_hash_2,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
    --> tests/commands/test_store_api.py:1733:13
     |
1731 |             lib_name=test_lib_name_2,
1732 |             charm_name=test_charm_name_2,
1733 |             patch=test_patch_2,
     |             ^^^^^^^^^^^^^^^^^^ Expected `int`, found `Literal["test-patch-version-2"]`
1734 |         ),
1735 |     }
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-method-override]: Invalid override of method `json`
   --> tests/commands/test_store_client.py:77:9
    |
 75 |           return self.status_code == 200
 76 |
 77 |       def json(self):
    |           ^^^^^^^^^^ Definition is incompatible with `Response.json`
 78 |           try:
 79 |               return json.loads(self._content)  # type: ignore
    |
   ::: .venv/lib/python3.12/site-packages/requests-stubs/models.pyi:155:9
    |
153 |       @property
154 |       def text(self) -> str: ...
155 |       def json(
    |  _________-
156 | |         self,
157 | |         *,
158 | |         cls: type[JSONDecoder] | None = ...,
159 | |         object_hook: Callable[[dict[Any, Any]], Any] | None = ...,
160 | |         parse_float: Callable[[str], Any] | None = ...,
161 | |         parse_int: Callable[[str], Any] | None = ...,
162 | |         parse_constant: Callable[[str], Any] | None = ...,
163 | |         object_pairs_hook: Callable[[list[tuple[Any, Any]]], Any] | None = ...,
164 | |         **kwds: Any,
165 | |     ) -> Any: ...
    | |____________- `Response.json` defined here
166 |       @property
167 |       def links(self) -> dict[Incomplete, Incomplete]: ...
    |
info: This violates the Liskov Substitution Principle
info: rule `invalid-method-override` is enabled by default

error[missing-argument]: No argument provided for required parameter `cls`
   --> tests/conftest.py:146:14
    |
145 |     if request.param == "bases":
146 |         with pytest.MonkeyPatch.context() as monkeypatch:
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
147 |             # Add the current system to legacy bases so we can test legacy bases.
148 |             monkeypatch.setattr(const, "LEGACY_BASES", (*const.LEGACY_BASES, base_str))
    |
info: Union variant `(cls) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((cls) -> _GeneratorContextManager[Unknown, None, None]) | ((cls) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `missing-argument` is enabled by default

error[missing-argument]: No argument provided for required parameter `cls`
   --> tests/conftest.py:146:14
    |
145 |     if request.param == "bases":
146 |         with pytest.MonkeyPatch.context() as monkeypatch:
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
147 |             # Add the current system to legacy bases so we can test legacy bases.
148 |             monkeypatch.setattr(const, "LEGACY_BASES", (*const.LEGACY_BASES, base_str))
    |
info: Union variant `(cls) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((cls) -> _GeneratorContextManager[Unknown, None, None]) | ((cls) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `missing-argument` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/conftest.py:226:9
    |
224 |         build_base=craft_platforms.DistroBase("ubuntu", "22.04"),
225 |         build_on=arch,
226 |         build_for="arm64",
    |         ^^^^^^^^^^^^^^^^^ Expected `DebianArchitecture | Literal["all"]`, found `Literal["arm64"]`
227 |         platform="distro-1-test64",
228 |     )
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-method-override]: Invalid override of method `get_supported_bases`
  --> tests/extensions/test_extensions.py:33:9
   |
32 |     @classmethod
33 |     def get_supported_bases(cls) -> list[tuple[str, ...]]:
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Definition is incompatible with `Extension.get_supported_bases`
34 |         """Return a list of tuple of supported bases."""
35 |         return cls.bases
   |
  ::: charmcraft/extensions/extension.py:52:9
   |
50 |     @staticmethod
51 |     @abc.abstractmethod
52 |     def get_supported_bases() -> list[tuple[str, str]]:
   |         ---------------------------------------------- `Extension.get_supported_bases` defined here
53 |         """Return a list of tuple of supported bases."""
   |
info: `FakeExtension.get_supported_bases` is a classmethod but `Extension.get_supported_bases` is a staticmethod
info: This violates the Liskov Substitution Principle
info: rule `invalid-method-override` is enabled by default

error[invalid-method-override]: Invalid override of method `is_experimental`
  --> tests/extensions/test_extensions.py:38:9
   |
37 |     @staticmethod
38 |     def is_experimental(_base: tuple[str, ...] | None) -> bool:
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Definition is incompatible with `Extension.is_experimental`
39 |         """Return whether or not this extension is unstable for given base."""
40 |         return False
   |
  ::: charmcraft/extensions/extension.py:57:9
   |
55 |     @staticmethod
56 |     @abc.abstractmethod
57 |     def is_experimental(base: tuple[str, str] | None) -> bool:
   |         ----------------------------------------------------- `Extension.is_experimental` defined here
58 |         """Return whether or not this extension is unstable for given base."""
   |
info: This violates the Liskov Substitution Principle
info: rule `invalid-method-override` is enabled by default

error[invalid-method-override]: Invalid override of method `is_experimental`
  --> tests/extensions/test_extensions.py:62:9
   |
61 |     @staticmethod
62 |     def is_experimental(_base: str | None) -> bool:
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Definition is incompatible with `FakeExtension.is_experimental`
63 |         return True
   |
  ::: tests/extensions/test_extensions.py:38:9
   |
37 |     @staticmethod
38 |     def is_experimental(_base: tuple[str, ...] | None) -> bool:
   |         ------------------------------------------------------ `FakeExtension.is_experimental` defined here
39 |         """Return whether or not this extension is unstable for given base."""
40 |         return False
   |
info: This violates the Liskov Substitution Principle
info: rule `invalid-method-override` is enabled by default

error[invalid-method-override]: Invalid override of method `is_experimental`
  --> tests/extensions/test_registry.py:34:9
   |
33 |     @staticmethod
34 |     def is_experimental(_base: tuple[str, str] | None) -> bool:
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Definition is incompatible with `Extension.is_experimental`
35 |         return False
   |
  ::: charmcraft/extensions/extension.py:57:9
   |
55 |     @staticmethod
56 |     @abc.abstractmethod
57 |     def is_experimental(base: tuple[str, str] | None) -> bool:
   |         ----------------------------------------------------- `Extension.is_experimental` defined here
58 |         """Return whether or not this extension is unstable for given base."""
   |
info: This violates the Liskov Substitution Principle
info: rule `invalid-method-override` is enabled by default

warning[possibly-missing-attribute]: Submodule `application` may not be available as an attribute on module `charmcraft`
  --> tests/integration/commands/test_init.py:75:17
   |
73 | def init_command():
74 |     return init.InitCommand(
75 |         {"app": charmcraft.application.APP_METADATA, "services": None}
   |                 ^^^^^^^^^^^^^^^^^^^^^^
76 |     )
   |
help: Consider explicitly importing `charmcraft.application`
info: rule `possibly-missing-attribute` is enabled by default

error[unresolved-attribute]: Object of type `RecordingEmitter` has no attribute `assert_json_output`
   --> tests/integration/commands/test_store_commands.py:225:9
    |
223 |             },
224 |         ]
225 |         emitter.assert_json_output(  # pyright: ignore[reportAttributeAccessIssue]
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^
226 |             expected
227 |         )
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Unresolved attribute `client` on type `AppService`.
  --> tests/integration/conftest.py:45:5
   |
43 |     services.register_services()
44 |     factory = craft_application.ServiceFactory(app=application.APP_METADATA)
45 |     factory.get("store").client = mock.Mock(spec_set=craft_store.StoreClient)  # pyright: ignore[reportAttributeAccessIssue]
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
46 |     factory.update_kwargs(
47 |         "charm_libs",
   |
info: rule `unresolved-attribute` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
  --> tests/integration/services/test_image.py:28:9
   |
26 |     service = ImageService(
27 |         app=application.APP_METADATA,
28 |         services=None,  # pyright: ignore[reportArgumentType]
   |         ^^^^^^^^^^^^^ Expected `ServiceFactory`, found `None`
29 |     )
30 |     service.setup()
   |
info: Method defined here
  --> .venv/lib/python3.12/site-packages/craft_application/services/base.py:44:9
   |
42 |     """
43 |
44 |     def __init__(self, app: AppMetadata, services: ServiceFactory) -> None:
   |         ^^^^^^^^                         ------------------------ Parameter declared here
45 |         self._app = app
46 |         self._services = services
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/integration/services/test_lifecycle.py:40:17
   |
38 |                 platform="something",
39 |                 build_on=craft_platforms.DebianArchitecture.from_host(),
40 |                 build_for="invalid",  # pyright: ignore[reportArgumentType]
   |                 ^^^^^^^^^^^^^^^^^^^ Expected `DebianArchitecture | Literal["all"]`, found `Literal["invalid"]`
41 |                 build_base=craft_platforms.DistroBase(distro.id(), distro.version()),
42 |             )
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/integration/services/test_lifecycle.py:88:17
   |
86 |                 platform="something",
87 |                 build_on=host_arch,
88 |                 build_for=f"{foreign_arch}-{host_arch}",  # pyright: ignore[reportArgumentType]
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `DebianArchitecture | Literal["all"]`, found `str`
89 |                 build_base=craft_platforms.DistroBase(distro.id(), distro.version()),
90 |             )
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/integration/services/test_provider.py:56:28
   |
54 |     assert not lock_file.exists()
55 |
56 |     with provider.instance(**provider_kwargs):
   |                            ^^^^^^^^^^^^^^^^^ Expected `BuildInfo`, found `Unknown | BuildInfo | Path`
57 |         # Test that the cache lock gets created
58 |         assert lock_file.is_file()
   |
info: Element `Path` of this union is not assignable to `BuildInfo`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/integration/services/test_provider.py:56:28
   |
54 |     assert not lock_file.exists()
55 |
56 |     with provider.instance(**provider_kwargs):
   |                            ^^^^^^^^^^^^^^^^^ Expected `Path`, found `Unknown | BuildInfo | Path`
57 |         # Test that the cache lock gets created
58 |         assert lock_file.is_file()
   |
info: Element `BuildInfo` of this union is not assignable to `Path`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/integration/services/test_provider.py:56:28
   |
54 |     assert not lock_file.exists()
55 |
56 |     with provider.instance(**provider_kwargs):
   |                            ^^^^^^^^^^^^^^^^^ Expected `bool`, found `Unknown | BuildInfo | Path`
57 |         # Test that the cache lock gets created
58 |         assert lock_file.is_file()
   |
info: Union elements `BuildInfo` and `Path` are not assignable to `bool`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/integration/services/test_provider.py:56:28
   |
54 |     assert not lock_file.exists()
55 |
56 |     with provider.instance(**provider_kwargs):
   |                            ^^^^^^^^^^^^^^^^^ Expected `bool`, found `Unknown | BuildInfo | Path`
57 |         # Test that the cache lock gets created
58 |         assert lock_file.is_file()
   |
info: Union elements `BuildInfo` and `Path` are not assignable to `bool`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/integration/services/test_provider.py:56:28
   |
54 |     assert not lock_file.exists()
55 |
56 |     with provider.instance(**provider_kwargs):
   |                            ^^^^^^^^^^^^^^^^^ Expected `bool`, found `Unknown | BuildInfo | Path`
57 |         # Test that the cache lock gets created
58 |         assert lock_file.is_file()
   |
info: Union elements `BuildInfo` and `Path` are not assignable to `bool`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/integration/services/test_provider.py:56:28
   |
54 |     assert not lock_file.exists()
55 |
56 |     with provider.instance(**provider_kwargs):
   |                            ^^^^^^^^^^^^^^^^^ Expected `str | None`, found `Unknown | BuildInfo | Path`
57 |         # Test that the cache lock gets created
58 |         assert lock_file.is_file()
   |
info: Union elements `BuildInfo` and `Path` are not assignable to `str | None`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/integration/services/test_provider.py:56:28
   |
54 |     assert not lock_file.exists()
55 |
56 |     with provider.instance(**provider_kwargs):
   |                            ^^^^^^^^^^^^^^^^^ Expected `((Executor, /) -> None) | None`, found `Unknown | BuildInfo | Path`
57 |         # Test that the cache lock gets created
58 |         assert lock_file.is_file()
   |
info: Union elements `BuildInfo` and `Path` are not assignable to `((Executor, /) -> None) | None`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/integration/services/test_provider.py:56:28
   |
54 |     assert not lock_file.exists()
55 |
56 |     with provider.instance(**provider_kwargs):
   |                            ^^^^^^^^^^^^^^^^^ Expected `bool | str | None`, found `Unknown | BuildInfo | Path`
57 |         # Test that the cache lock gets created
58 |         assert lock_file.is_file()
   |
info: Union elements `BuildInfo` and `Path` are not assignable to `bool | str | None`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:101:28
    |
 99 |     }
100 |
101 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `BuildInfo`, found `Unknown | BuildInfo | Path`
102 |         # Create a file in the cache and ensure it's not visible in the outer fs
103 |         instance.execute_run(["touch", "/root/.cache/cache_cached"])
    |
info: Element `Path` of this union is not assignable to `BuildInfo`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:101:28
    |
 99 |     }
100 |
101 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `Path`, found `Unknown | BuildInfo | Path`
102 |         # Create a file in the cache and ensure it's not visible in the outer fs
103 |         instance.execute_run(["touch", "/root/.cache/cache_cached"])
    |
info: Element `BuildInfo` of this union is not assignable to `Path`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:101:28
    |
 99 |     }
100 |
101 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `bool`, found `Unknown | BuildInfo | Path`
102 |         # Create a file in the cache and ensure it's not visible in the outer fs
103 |         instance.execute_run(["touch", "/root/.cache/cache_cached"])
    |
info: Union elements `BuildInfo` and `Path` are not assignable to `bool`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:101:28
    |
 99 |     }
100 |
101 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `bool`, found `Unknown | BuildInfo | Path`
102 |         # Create a file in the cache and ensure it's not visible in the outer fs
103 |         instance.execute_run(["touch", "/root/.cache/cache_cached"])
    |
info: Union elements `BuildInfo` and `Path` are not assignable to `bool`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:101:28
    |
 99 |     }
100 |
101 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `bool`, found `Unknown | BuildInfo | Path`
102 |         # Create a file in the cache and ensure it's not visible in the outer fs
103 |         instance.execute_run(["touch", "/root/.cache/cache_cached"])
    |
info: Union elements `BuildInfo` and `Path` are not assignable to `bool`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:101:28
    |
 99 |     }
100 |
101 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `str | None`, found `Unknown | BuildInfo | Path`
102 |         # Create a file in the cache and ensure it's not visible in the outer fs
103 |         instance.execute_run(["touch", "/root/.cache/cache_cached"])
    |
info: Union elements `BuildInfo` and `Path` are not assignable to `str | None`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:101:28
    |
 99 |     }
100 |
101 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `((Executor, /) -> None) | None`, found `Unknown | BuildInfo | Path`
102 |         # Create a file in the cache and ensure it's not visible in the outer fs
103 |         instance.execute_run(["touch", "/root/.cache/cache_cached"])
    |
info: Union elements `BuildInfo` and `Path` are not assignable to `((Executor, /) -> None) | None`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:101:28
    |
 99 |     }
100 |
101 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `bool | str | None`, found `Unknown | BuildInfo | Path`
102 |         # Create a file in the cache and ensure it's not visible in the outer fs
103 |         instance.execute_run(["touch", "/root/.cache/cache_cached"])
    |
info: Union elements `BuildInfo` and `Path` are not assignable to `bool | str | None`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:134:28
    |
132 |         "cache_path": cache_path,
133 |     }
134 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `BuildInfo`, found `Unknown | BuildInfo | Path`
135 |         instance.execute_run(["test", "-d", "/root/.cache"], check=True)
136 |         instance.execute_run(
    |
info: Element `Path` of this union is not assignable to `BuildInfo`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:134:28
    |
132 |         "cache_path": cache_path,
133 |     }
134 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `Path`, found `Unknown | BuildInfo | Path`
135 |         instance.execute_run(["test", "-d", "/root/.cache"], check=True)
136 |         instance.execute_run(
    |
info: Element `BuildInfo` of this union is not assignable to `Path`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:134:28
    |
132 |         "cache_path": cache_path,
133 |     }
134 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `bool`, found `Unknown | BuildInfo | Path`
135 |         instance.execute_run(["test", "-d", "/root/.cache"], check=True)
136 |         instance.execute_run(
    |
info: Union elements `BuildInfo` and `Path` are not assignable to `bool`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:134:28
    |
132 |         "cache_path": cache_path,
133 |     }
134 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `bool`, found `Unknown | BuildInfo | Path`
135 |         instance.execute_run(["test", "-d", "/root/.cache"], check=True)
136 |         instance.execute_run(
    |
info: Union elements `BuildInfo` and `Path` are not assignable to `bool`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:134:28
    |
132 |         "cache_path": cache_path,
133 |     }
134 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `bool`, found `Unknown | BuildInfo | Path`
135 |         instance.execute_run(["test", "-d", "/root/.cache"], check=True)
136 |         instance.execute_run(
    |
info: Union elements `BuildInfo` and `Path` are not assignable to `bool`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:134:28
    |
132 |         "cache_path": cache_path,
133 |     }
134 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `str | None`, found `Unknown | BuildInfo | Path`
135 |         instance.execute_run(["test", "-d", "/root/.cache"], check=True)
136 |         instance.execute_run(
    |
info: Union elements `BuildInfo` and `Path` are not assignable to `str | None`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:134:28
    |
132 |         "cache_path": cache_path,
133 |     }
134 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `((Executor, /) -> None) | None`, found `Unknown | BuildInfo | Path`
135 |         instance.execute_run(["test", "-d", "/root/.cache"], check=True)
136 |         instance.execute_run(
    |
info: Union elements `BuildInfo` and `Path` are not assignable to `((Executor, /) -> None) | None`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:134:28
    |
132 |         "cache_path": cache_path,
133 |     }
134 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `bool | str | None`, found `Unknown | BuildInfo | Path`
135 |         instance.execute_run(["test", "-d", "/root/.cache"], check=True)
136 |         instance.execute_run(
    |
info: Union elements `BuildInfo` and `Path` are not assignable to `bool | str | None`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[unresolved-import]: Cannot resolve imported module `charm`
  --> tests/spread/commands/init-extensions/tests/unit/test_charm.py:9:8
   |
 7 | import pathlib
 8 |
 9 | import charm
   |        ^^^^^
10 | import scenario
11 | import scenario.errors
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `scenario`
  --> tests/spread/commands/init-extensions/tests/unit/test_charm.py:10:8
   |
 9 | import charm
10 | import scenario
   |        ^^^^^^^^
11 | import scenario.errors
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `scenario.errors`
  --> tests/spread/commands/init-extensions/tests/unit/test_charm.py:11:8
   |
 9 | import charm
10 | import scenario
11 | import scenario.errors
   |        ^^^^^^^^^^^^^^^
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/dependencies/setuptools-scm-python/src/charm.py:9:8
   |
 7 | import logging
 8 |
 9 | import ops
   |        ^^^
10 |
11 | # A standalone module for workload-specific logic (no charming concerns):
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `setuptools_scm_python`
  --> tests/spread/dependencies/setuptools-scm-python/src/charm.py:12:8
   |
11 | # A standalone module for workload-specific logic (no charming concerns):
12 | import setuptools_scm_python
   |        ^^^^^^^^^^^^^^^^^^^^^
13 |
14 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/dependencies/strict-dependencies-errors/extra-binary-packages/src/charm.py:17:8
   |
15 | import logging
16 |
17 | import ops
   |        ^^^
18 |
19 | # Log messages can be retrieved using juju debug-log
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/dependencies/strict-dependencies-errors/extra-packages/src/charm.py:17:8
   |
15 | import logging
16 |
17 | import ops
   |        ^^^
18 |
19 | # Log messages can be retrieved using juju debug-log
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/dependencies/strict-dependencies-errors/missing-packages/src/charm.py:17:8
   |
15 | import logging
16 |
17 | import ops
   |        ^^^
18 |
19 | # Log messages can be retrieved using juju debug-log
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/dependencies/strict-dependencies-errors/no-requirements/src/charm.py:17:8
   |
15 | import logging
16 |
17 | import ops
   |        ^^^
18 |
19 | # Log messages can be retrieved using juju debug-log
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/dependencies/strict-dependencies/charm/src/charm.py:17:8
   |
15 | import logging
16 |
17 | import ops
   |        ^^^
18 |
19 | # Log messages can be retrieved using juju debug-log
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `charms.reactive`
 --> tests/spread/smoketests/reactive/reactivecharm/reactive/reactivecharm.py:1:6
  |
1 | from charms.reactive import set_flag, when_not
  |      ^^^^^^^^^^^^^^^
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/ubuntu-20.04/charm/bases/src/charm.py:18:8
   |
16 | from typing import cast
17 |
18 | import ops
   |        ^^^
19 |
20 | # Log messages can be retrieved using juju debug-log
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/ubuntu-20.04/charm/platforms/src/charm.py:9:8
   |
 7 | import logging
 8 |
 9 | import ops
   |        ^^^
10 |
11 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/ubuntu-22.04/charm/bases/src/charm.py:18:8
   |
16 | from typing import cast
17 |
18 | import ops
   |        ^^^
19 |
20 | # Log messages can be retrieved using juju debug-log
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/ubuntu-22.04/charm/platforms/src/charm.py:9:8
   |
 7 | import logging
 8 |
 9 | import ops
   |        ^^^
10 |
11 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/ubuntu-24.04/charm/platforms/src/charm.py:9:8
   |
 7 | import logging
 8 |
 9 | import ops
   |        ^^^
10 |
11 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
 --> tests/spread/ubuntu-24.04/test-cmd/src/charm.py:6:8
  |
4 | import logging
5 |
6 | import ops
  |        ^^^
7 |
8 | # A standalone module for workload-specific logic (no charming concerns):
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `test_cmd`
  --> tests/spread/ubuntu-24.04/test-cmd/src/charm.py:9:8
   |
 8 | # A standalone module for workload-specific logic (no charming concerns):
 9 | import test_cmd
   |        ^^^^^^^^
10 |
11 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `pytest_operator.plugin`
 --> tests/spread/ubuntu-24.04/test-cmd/tests/integration/test_charm.py:7:6
  |
5 | import pytest
6 | import yaml
7 | from pytest_operator.plugin import OpsTest
  |      ^^^^^^^^^^^^^^^^^^^^^^
8 |
9 | logger = logging.getLogger(__name__)
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
 --> tests/spread/ubuntu-24.04/test-cmd/tests/unit/test_charm.py:2:6
  |
1 | import pytest
2 | from ops import testing
  |      ^^^
3 |
4 | from charm import TestCmdCharm
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `charm`
 --> tests/spread/ubuntu-24.04/test-cmd/tests/unit/test_charm.py:4:6
  |
2 | from ops import testing
3 |
4 | from charm import TestCmdCharm
  |      ^^^^^
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/ubuntu-25.10/charm/platforms/src/charm.py:9:8
   |
 7 | import logging
 8 |
 9 | import ops
   |        ^^^
10 |
11 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
 --> tests/spread/ubuntu-25.10/test-cmd/src/charm.py:6:8
  |
4 | import logging
5 |
6 | import ops
  |        ^^^
7 |
8 | # A standalone module for workload-specific logic (no charming concerns):
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `test_cmd`
  --> tests/spread/ubuntu-25.10/test-cmd/src/charm.py:9:8
   |
 8 | # A standalone module for workload-specific logic (no charming concerns):
 9 | import test_cmd
   |        ^^^^^^^^
10 |
11 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `pytest_operator.plugin`
 --> tests/spread/ubuntu-25.10/test-cmd/tests/integration/test_charm.py:7:6
  |
5 | import pytest
6 | import yaml
7 | from pytest_operator.plugin import OpsTest
  |      ^^^^^^^^^^^^^^^^^^^^^^
8 |
9 | logger = logging.getLogger(__name__)
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
 --> tests/spread/ubuntu-25.10/test-cmd/tests/unit/test_charm.py:2:6
  |
1 | import pytest
2 | from ops import testing
  |      ^^^
3 |
4 | from charm import TestCmdCharm
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `charm`
 --> tests/spread/ubuntu-25.10/test-cmd/tests/unit/test_charm.py:4:6
  |
2 | from ops import testing
3 |
4 | from charm import TestCmdCharm
  |      ^^^^^
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/ubuntu-26.04/charm/platforms/src/charm.py:9:8
   |
 7 | import logging
 8 |
 9 | import ops
   |        ^^^
10 |
11 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
 --> tests/spread/ubuntu-26.04/test-cmd/src/charm.py:6:8
  |
4 | import logging
5 |
6 | import ops
  |        ^^^
7 |
8 | # A standalone module for workload-specific logic (no charming concerns):
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `test_cmd`
  --> tests/spread/ubuntu-26.04/test-cmd/src/charm.py:9:8
   |
 8 | # A standalone module for workload-specific logic (no charming concerns):
 9 | import test_cmd
   |        ^^^^^^^^
10 |
11 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `pytest_operator.plugin`
 --> tests/spread/ubuntu-26.04/test-cmd/tests/integration/test_charm.py:7:6
  |
5 | import pytest
6 | import yaml
7 | from pytest_operator.plugin import OpsTest
  |      ^^^^^^^^^^^^^^^^^^^^^^
8 |
9 | logger = logging.getLogger(__name__)
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
 --> tests/spread/ubuntu-26.04/test-cmd/tests/unit/test_charm.py:2:6
  |
1 | import pytest
2 | from ops import testing
  |      ^^^
3 |
4 | from charm import TestCmdCharm
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `charm`
 --> tests/spread/ubuntu-26.04/test-cmd/tests/unit/test_charm.py:4:6
  |
2 | from ops import testing
3 |
4 | from charm import TestCmdCharm
  |      ^^^^^
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
   --> tests/test_instrum.py:256:32
    |
254 |     assert measurements.measurements == {}
255 |
256 |     with Timer("test message", foo=42):
    |                                ^^^^^^ Expected `dict[str, Any]`, found `Literal[42]`
257 |         pass
    |
info: Method defined here
   --> charmcraft/instrum.py:129:9
    |
127 |     """
128 |
129 |     def __init__(self, msg: str, **extra_info: dict[str, Any]):
    |         ^^^^^^^^                 ---------------------------- Parameter declared here
130 |         self.msg = msg
131 |         self.extra_info = extra_info
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
   --> tests/test_instrum.py:274:28
    |
272 |     monkeypatch.setattr(instrum, "_measurements", measurements)
273 |
274 |     @Timer("test message", foo=42)
    |                            ^^^^^^ Expected `dict[str, Any]`, found `Literal[42]`
275 |     def test_function(a, b):
276 |         assert a == 17
    |
info: Method defined here
   --> charmcraft/instrum.py:129:9
    |
127 |     """
128 |
129 |     def __init__(self, msg: str, **extra_info: dict[str, Any]):
    |         ^^^^^^^^                 ---------------------------- Parameter declared here
130 |         self.msg = msg
131 |         self.extra_info = extra_info
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
   --> tests/test_instrum.py:298:32
    |
296 |     assert measurements.measurements == {}
297 |
298 |     with Timer("test message", foo=42) as timer:
    |                                ^^^^^^ Expected `dict[str, Any]`, found `Literal[42]`
299 |         timer.mark("middle 1")
300 |         timer.mark("middle 2")
    |
info: Method defined here
   --> charmcraft/instrum.py:129:9
    |
127 |     """
128 |
129 |     def __init__(self, msg: str, **extra_info: dict[str, Any]):
    |         ^^^^^^^^                 ---------------------------- Parameter declared here
130 |         self.msg = msg
131 |         self.extra_info = extra_info
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-assignment]: Implicit shadowing of function `write`
  --> tests/unit/commands/test_lifecycle.py:91:5
   |
90 |     libs_service = cast("CharmLibsService", service_factory.get("charm_libs"))
91 |     libs_service.write = mock.Mock(wraps=libs_service.write)
   |     ^^^^^^^^^^^^^^^^^^
92 |
93 |     pack._update_charm_libs()
   |
info: Annotate to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[unresolved-attribute]: Object of type `bound method CharmLibsService.write(library: Library) -> None` has no attribute `assert_called_once_with`
  --> tests/unit/commands/test_lifecycle.py:95:5
   |
93 |     pack._update_charm_libs()
94 |
95 |     libs_service.write.assert_called_once_with(store_lib)
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
96 |
97 |     with check():
   |
info: rule `unresolved-attribute` is enabled by default

error[non-subscriptable]: Cannot subscript object of type `None` with no `__getitem__` method
  --> tests/unit/models/test_config.py:75:23
   |
73 |     config = JujuConfig(options={"my-opt": option})
74 |
75 |     assert isinstance(config.options["my-opt"], type_)
   |                       ^^^^^^^^^^^^^^^^^^^^^^^^
   |
info: rule `non-subscriptable` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/unit/models/test_project.py:813:13
    |
811 |             description="",
812 |             base=base,
813 |             platforms={"amd64": None},
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `PlatformsDict`, found `dict[Unknown | str, Unknown | None]`
814 |             parts={"charm": {"plugin": "charm"}},
815 |         )
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `__new__` is incorrect
  --> tests/unit/parts/plugins/test_charm.py:97:22
   |
96 |     pip_constraint_file = (
97 |         pathlib.Path(parts.plugins.__file__).parent / "charm-constraints.txt"
   |                      ^^^^^^^^^^^^^^^^^^^^^^ Expected `str | PathLike[str]`, found `str | None`
98 |     )
   |
info: Element `None` of this union is not assignable to `str | PathLike[str]`
info: Function defined here
   --> stdlib/pathlib/__init__.pyi:299:13
    |
297 |         def __new__(cls, *args: StrPath, **kwargs: Unused) -> Self: ...  # pyright: ignore[reportInconsistentConstructor]
298 |     else:
299 |         def __new__(cls, *args: StrPath, **kwargs: Unused) -> Self: ...
    |             ^^^^^^^      -------------- Parameter declared here
300 |
301 |     @classmethod
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-assignment]: Implicit shadowing of function `_get_pip`
  --> tests/unit/parts/plugins/test_poetry.py:40:5
   |
39 | def test_get_pip_install_commands(poetry_plugin: plugins.PoetryPlugin):
40 |     poetry_plugin._get_pip = lambda: "/python -m pip"
   |     ^^^^^^^^^^^^^^^^^^^^^^
41 |
42 |     assert poetry_plugin._get_pip_install_commands(
   |
info: Annotate to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Implicit shadowing of function `_get_pip`
  --> tests/unit/parts/plugins/test_python.py:62:5
   |
60 |     }
61 |     python_plugin._options = plugins.PythonPluginProperties.unmarshal(spec)
62 |     python_plugin._get_pip = lambda: "/python -m pip"
   |     ^^^^^^^^^^^^^^^^^^^^^^
63 |     copy_src_cmd = (
64 |         f"cp --archive --recursive --reflink=auto {build_path}/src {install_path}"
   |
info: Annotate to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
   --> tests/unit/services/test_analysis.py:112:67
    |
110 | @pytest.fixture
111 | def analysis_service():
112 |     return analysis.AnalysisService(app=application.APP_METADATA, services=None)
    |                                                                   ^^^^^^^^^^^^^ Expected `ServiceFactory`, found `None`
    |
info: Method defined here
  --> charmcraft/services/analysis.py:37:9
   |
35 |     _project: models.CharmcraftProject  # type: ignore[assignment]
36 |
37 |     def __init__(  # (too many arguments)
   |         ^^^^^^^^
38 |         self,
39 |         app: craft_application.AppMetadata,
40 |         services: craft_application.ServiceFactory,
   |         ------------------------------------------ Parameter declared here
41 |     ) -> None:
42 |         super().__init__(app, services)
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/unit/services/test_lifecycle.py:55:17
   |
53 |                 platform="something",
54 |                 build_on=HOST_ARCH,
55 |                 build_for=plan_build_for,  # pyright: ignore[reportArgumentType]
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^ Expected `DebianArchitecture | Literal["all"]`, found `str`
56 |             )
57 |         ]
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/unit/services/test_lifecycle.py:94:17
   |
92 |                 platform="something",
93 |                 build_on=HOST_ARCH,
94 |                 build_for=f"{HOST_ARCH}-foreign",  # pyright: ignore[reportArgumentType]
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `DebianArchitecture | Literal["all"]`, found `str`
95 |             )
96 |         ]
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
  --> tests/unit/services/test_project.py:34:45
   |
32 | @pytest.fixture
33 | def service(project_path):
34 |     return ProjectService(app=APP_METADATA, services=None, project_dir=project_path)
   |                                             ^^^^^^^^^^^^^ Expected `ServiceFactory`, found `None`
   |
info: Method defined here
  --> .venv/lib/python3.12/site-packages/craft_application/services/project.py:57:9
   |
55 |     _project_model: models.Project | None
56 |
57 |     def __init__(
   |         ^^^^^^^^
58 |         self, app: AppMetadata, services: ServiceFactory, *, project_dir: pathlib.Path
   |                                 ------------------------ Parameter declared here
59 |     ) -> None:
60 |         super().__init__(app, services)
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
   --> tests/unit/services/test_provider.py:123:9
    |
121 |     provider_service = ProviderService(
122 |         app=APP_METADATA,
123 |         services=None,  # pyright: ignore[reportArgumentType]
    |         ^^^^^^^^^^^^^ Expected `ServiceFactory`, found `None`
124 |         work_dir=tmp_path,
125 |     )
    |
info: Method defined here
  --> charmcraft/services/provider.py:43:9
   |
41 |     """Business logic for getting providers."""
42 |
43 |     def __init__(
   |         ^^^^^^^^
44 |         self,
45 |         app: craft_application.AppMetadata,
46 |         services: craft_application.ServiceFactory,
   |         ------------------------------------------ Parameter declared here
47 |         *,
48 |         work_dir: pathlib.Path,
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
  --> tests/unit/services/test_store.py:50:56
   |
48 | @pytest.fixture(scope="module")
49 | def reusable_store():
50 |     store = StoreService(app=application.APP_METADATA, services=None)
   |                                                        ^^^^^^^^^^^^^ Expected `ServiceFactory`, found `None`
51 |     store.client = mock.Mock(spec_set=craft_store.StoreClient)
52 |     store._publisher = mock.Mock(spec_set=craft_store.PublisherGateway)
   |
info: Method defined here
  --> .venv/lib/python3.12/site-packages/craft_application/services/base.py:44:9
   |
42 |     """
43 |
44 |     def __init__(self, app: AppMetadata, services: ServiceFactory) -> None:
   |         ^^^^^^^^                         ------------------------ Parameter declared here
45 |         self._app = app
46 |         self._services = services
   |
info: rule `invalid-argument-type` is enabled by default

warning[possibly-missing-attribute]: Attribute `group` may be missing on object of type `Match[str] | None`
  --> tests/unit/test_linters.py:43:12
   |
41 | )
42 | def test_fuzz_python_name_regex(name, next_char, further_garbage):
43 |     assert linters.PYTHON_NAME_REGEX.match(name).group(0) == name
   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
44 |     assert linters.PYTHON_NAME_REGEX.match(f"{name}{next_char}").group(0) == name
45 |     assert (
   |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `group` may be missing on object of type `Match[str] | None`
  --> tests/unit/test_linters.py:44:12
   |
42 | def test_fuzz_python_name_regex(name, next_char, further_garbage):
43 |     assert linters.PYTHON_NAME_REGEX.match(name).group(0) == name
44 |     assert linters.PYTHON_NAME_REGEX.match(f"{name}{next_char}").group(0) == name
   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
45 |     assert (
46 |         linters.PYTHON_NAME_REGEX.match(f"{name}{next_char}{further_garbage}").group(0)
   |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `group` may be missing on object of type `Match[str] | None`
  --> tests/unit/test_linters.py:46:9
   |
44 |     assert linters.PYTHON_NAME_REGEX.match(f"{name}{next_char}").group(0) == name
45 |     assert (
46 |         linters.PYTHON_NAME_REGEX.match(f"{name}{next_char}{further_garbage}").group(0)
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
47 |         == name
48 |     )
   |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `group` may be missing on object of type `Match[str] | None`
  --> tests/unit/test_linters.py:62:12
   |
60 | )
61 | def test_min_version_regex_matches(string, expected):
62 |     assert linters.MIN_VERSION_REGEX.search(string).group(1) == expected
   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `group` may be missing on object of type `Match[str] | None`
  --> tests/unit/test_linters.py:76:24
   |
74 | )
75 | def test_approx_version_regex_matches(string, expected):
76 |     assert expected in linters.APPROX_VERSION_REGEX.search(string).group(1, 2)
   |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `group` may be missing on object of type `Match[str] | None`
  --> tests/unit/test_linters.py:84:12
   |
82 | )
83 | def test_exact_version_regex_matches(string, expected):
84 |     assert linters.EXACT_VERSION_REGEX.search(string).group(1) == expected
   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
info: rule `possibly-missing-attribute` is enabled by default

error[no-matching-overload]: No overload of function `format_content` matches arguments
   --> tests/unit/utils/test_cli.py:285:9
    |
283 | def test_format_content_invalid(fmt):
284 |     with pytest.raises(ValueError, match="^Unknown output format "):
285 |         format_content(None, fmt)
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^
    |
info: First overload defined here
   --> charmcraft/utils/cli.py:185:5
    |
184 |   @overload
185 |   def format_content(
    |  _____^
186 | |     content: dict[str, Any] | list[dict[str, Any]], fmt: OutputFormat | str | None
187 | | ) -> str: ...
    | |________^
    |
info: Possible overloads for function `format_content`:
info:   (content: dict[str, Any] | list[dict[str, Any]], fmt: OutputFormat | str | None) -> str
info:   (content: str | Real | list[Unknown] | dict[Unknown, Unknown], fmt: OutputFormat | str | None) -> str
info: Overload implementation defined here
   --> charmcraft/utils/cli.py:196:5
    |
196 | def format_content(content, fmt=None):
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
197 |     """Format command output."""
198 |     if not isinstance(fmt, OutputFormat):
    |
info: rule `no-matching-overload` is enabled by default

Found 151 diagnostics

1 similar comment
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Dec 8, 2025

Type checking with ty failed. This is a notification only and does not require action.

Command output
warning[possibly-missing-attribute]: Attribute `bases` may be missing on object of type `PlatformCharm | BasesCharm`
   --> charmcraft/application/commands/lifecycle.py:119:36
    |
118 |         msg = "Bases index '{}' is invalid (must be >= 0 and fit in configured bases)."
119 |         len_configured_bases = len(project.bases)
    |                                    ^^^^^^^^^^^^^
120 |         for bases_index in bases_indices:
121 |             if bases_index < 0:
    |
info: rule `possibly-missing-attribute` is enabled by default

error[unresolved-attribute]: Object of type `AppService | type[AppService]` has no attribute `get_credentials`
   --> charmcraft/application/commands/store.py:210:27
    |
209 |         if parsed_args.export:
210 |             credentials = self._services.store.get_credentials(
    |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
211 |                 packages=packages, **kwargs
212 |             )
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `AppService | type[AppService]` has no attribute `login`
   --> charmcraft/application/commands/store.py:218:13
    |
216 |             )
217 |         else:
218 |             self._services.store.login(packages=packages, **kwargs)
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^
219 |             username = self._services.store.get_account_info()["username"]
220 |             emit.message(f"Logged in as {username!r}.")
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `AppService | type[AppService]` has no attribute `get_account_info`
   --> charmcraft/application/commands/store.py:219:24
    |
217 |         else:
218 |             self._services.store.login(packages=packages, **kwargs)
219 |             username = self._services.store.get_account_info()["username"]
    |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
220 |             emit.message(f"Logged in as {username!r}.")
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `AppService | type[AppService]` has no attribute `logout`
   --> charmcraft/application/commands/store.py:244:13
    |
242 |         """Run the command."""
243 |         try:
244 |             self._services.store.logout()
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
245 |             emit.message("Charmhub token cleared.")
246 |         except CredentialsUnavailable:
    |
info: rule `unresolved-attribute` is enabled by default

error[not-iterable]: Object of type `IO[str] | None` may not be iterable
   --> charmcraft/charm_builder.py:423:17
    |
422 |     # https://github.com/microsoft/pylance-release/issues/2385
423 |     for line in proc.stdout:  # pyright: ignore[reportOptionalIterable]
    |                 ^^^^^^^^^^^
424 |         print(f"   :: {line.rstrip()}")
425 |     retcode = proc.wait()
    |
info: It may not have an `__iter__` method and it doesn't have a `__getitem__` method
info: rule `not-iterable` is enabled by default

warning[possibly-missing-attribute]: Attribute `split` may be missing on object of type `str | None`
   --> charmcraft/linters.py:238:23
    |
236 |                     yield name.name.split(".")
237 |             elif isinstance(node, ast.ImportFrom):
238 |                 yield node.module.split(".")
    |                       ^^^^^^^^^^^^^^^^^
239 |
240 |     def _check_operator(self, basedir: pathlib.Path) -> bool:
    |
info: rule `possibly-missing-attribute` is enabled by default

error[invalid-argument-type]: Argument to function `quote` is incorrect
   --> charmcraft/parts/plugins/_charm.py:289:42
    |
287 |             build_cmd.extend(self._get_legacy_dependencies_parameters())
288 |
289 |         commands = [" ".join(shlex.quote(i) for i in build_cmd)]
    |                                          ^ Expected `str`, found `Unknown | str | None`
290 |
291 |         # hook a callback after the BUILD happened (to collect metrics left by charm builder)
    |
info: Element `None` of this union is not assignable to `str`
info: Function defined here
  --> stdlib/shlex.pyi:34:5
   |
32 |     """Return a shell-escaped string from *split_command*."""
33 |
34 | def quote(s: str) -> str:
   |     ^^^^^ ------ Parameter declared here
35 |     """Return a shell-escaped version of the string *s*."""
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `merge_from` is incorrect
   --> charmcraft/parts/plugins/_charm.py:341:28
    |
339 |     def post_build_callback(self, step_info):
340 |         """Collect metrics left by charm_builder.py."""
341 |         instrum.merge_from(env.get_charm_builder_metrics_path())
    |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str`, found `Path`
342 |
343 |     def _get_os_special_priority_paths(self) -> str | None:
    |
info: Method defined here
  --> charmcraft/instrum.py:77:9
   |
75 |             json.dump(measurements, fh, indent=4)
76 |
77 |     def merge_from(self, filename: str) -> None:
   |         ^^^^^^^^^^       ------------- Parameter declared here
78 |         """Merge measurements from a file to the current ongoing structure."""
79 |         with open(filename) as fh:
   |
info: rule `invalid-argument-type` is enabled by default

warning[possibly-missing-attribute]: Attribute `login` may be missing on object of type `Unknown | Client | AnonymousClient`
   --> charmcraft/store/store.py:227:27
    |
226 |         try:
227 |             credentials = self._client.login(**kwargs)
    |                           ^^^^^^^^^^^^^^^^^^
228 |         except CredentialsAlreadyAvailable as exc:
229 |             raise CraftError(
    |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `logout` may be missing on object of type `Unknown | Client | AnonymousClient`
   --> charmcraft/store/store.py:241:9
    |
239 |         There's no action really in the Store to logout, we just remove local credentials.
240 |         """
241 |         self._client.logout()
    |         ^^^^^^^^^^^^^^^^^^^
242 |
243 |     @_store_client_wrapper(auto_login=False)
    |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `whoami` may be missing on object of type `Unknown | Client | AnonymousClient`
   --> charmcraft/store/store.py:246:20
    |
244 |     def whoami(self):
245 |         """Return authenticated user details."""
246 |         response = self._client.whoami()
    |                    ^^^^^^^^^^^^^^^^^^^
247 |
248 |         acc = response["account"]
    |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `whoami` may be missing on object of type `Unknown | Client | AnonymousClient`
   --> charmcraft/store/store.py:268:9
    |
266 |     def _check_authorized(self) -> None:
267 |         """Check if current credentials authenticated."""
268 |         self._client.whoami()
    |         ^^^^^^^^^^^^^^^^^^^
269 |
270 |     @_store_client_wrapper()
    |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `unregister_name` may be missing on object of type `Unknown | Client | AnonymousClient`
   --> charmcraft/store/store.py:285:9
    |
283 |         :raises: error messages from craft-store
284 |         """
285 |         self._client.unregister_name(name)
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
286 |
287 |     @_store_client_wrapper()
    |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `push_file` may be missing on object of type `Unknown | Client | AnonymousClient`
   --> charmcraft/store/store.py:311:21
    |
309 |         self._check_authorized()
310 |
311 |         upload_id = self._client.push_file(filepath)
    |                     ^^^^^^^^^^^^^^^^^^^^^^
312 |         payload = {"upload-id": upload_id}
313 |         if extra_fields is not None:
    |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `list_resource_revisions` may be missing on object of type `Unknown | Client | AnonymousClient`
   --> charmcraft/store/store.py:506:16
    |
504 |     ) -> list[CharmResourceRevision]:
505 |         """Return revisions for the indicated charm resource."""
506 |         return self._client.list_resource_revisions(charm_name, resource_name)
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
507 |
508 |     @_store_client_wrapper()
    |
info: rule `possibly-missing-attribute` is enabled by default

error[invalid-argument-type]: Argument to function `__new__` is incorrect
   --> docs/conf.py:242:38
    |
240 | # Setup libraries documentation snippets for use in charmcraft docs.
241 | common_docs_path = pathlib.Path(__file__).parent / "common"
242 | craft_parts_docs_path = pathlib.Path(craft_parts_docs.__file__).parent / "craft-parts"
    |                                      ^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str | PathLike[str]`, found `str | None`
243 | (common_docs_path / "craft-parts").unlink(missing_ok=True)
244 | (common_docs_path / "craft-parts").symlink_to(craft_parts_docs_path, target_is_directory=True)
    |
info: Element `None` of this union is not assignable to `str | PathLike[str]`
info: Function defined here
   --> stdlib/pathlib/__init__.pyi:299:13
    |
297 |         def __new__(cls, *args: StrPath, **kwargs: Unused) -> Self: ...  # pyright: ignore[reportInconsistentConstructor]
298 |     else:
299 |         def __new__(cls, *args: StrPath, **kwargs: Unused) -> Self: ...
    |             ^^^^^^^      -------------- Parameter declared here
300 |
301 |     @classmethod
    |
info: rule `invalid-argument-type` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> docs/howto/code/custom-action-clearsession/clearsession_action_charm.py:10:8
   |
 8 | import typing
 9 |
10 | import ops
   |        ^^^
11 |
12 | import paas_charm.django
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `paas_charm.django`
  --> docs/howto/code/custom-action-clearsession/clearsession_action_charm.py:12:8
   |
10 | import ops
11 |
12 | import paas_charm.django
   |        ^^^^^^^^^^^^^^^^^
13 |
14 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `flask`
 --> docs/howto/code/custom-action-updatelogfile/app.py:3:8
  |
1 | # initial hello world Flask app
2 |
3 | import flask
  |        ^^^^^
4 |
5 | app = flask.Flask(__name__)
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> docs/howto/code/custom-action-updatelogfile/updatelogfile_action_charm.py:10:8
   |
 8 | import typing
 9 |
10 | import ops
   |        ^^^
11 |
12 | import paas_charm.flask
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `paas_charm.flask`
  --> docs/howto/code/custom-action-updatelogfile/updatelogfile_action_charm.py:12:8
   |
10 | import ops
11 |
12 | import paas_charm.flask
   |        ^^^^^^^^^^^^^^^^
13 |
14 | import requests
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `flask`
 --> docs/howto/code/flask-async/app.py:3:8
  |
1 | from time import sleep
2 |
3 | import flask
  |        ^^^^^
4 |
5 | app = flask.Flask(__name__)
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `django.contrib`
  --> docs/tutorial/code/django/urls_django_hello_world.py:17:6
   |
15 |     2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
16 | """
17 | from django.contrib import admin
   |      ^^^^^^^^^^^^^^
18 | from django.urls import include, path
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `django.urls`
  --> docs/tutorial/code/django/urls_django_hello_world.py:18:6
   |
16 | """
17 | from django.contrib import admin
18 | from django.urls import include, path
   |      ^^^^^^^^^^^
19 |
20 | urlpatterns = [
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `django.urls`
 --> docs/tutorial/code/django/urls_greeting.py:1:6
  |
1 | from django.urls import path
  |      ^^^^^^^^^^^
2 |
3 | from . import views
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Module `docs.tutorial.code.django` has no member `views`
 --> docs/tutorial/code/django/urls_greeting.py:3:15
  |
1 | from django.urls import path
2 |
3 | from . import views
  |               ^^^^^
4 |
5 | urlpatterns = [
  |
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `django.http`
 --> docs/tutorial/code/django/views_greeting.py:1:6
  |
1 | from django.http import HttpResponse
  |      ^^^^^^^^^^^
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `django.http`
 --> docs/tutorial/code/django/views_greeting_configuration.py:3:6
  |
1 | import os
2 |
3 | from django.http import HttpResponse
  |      ^^^^^^^^^^^
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `fastapi`
 --> docs/tutorial/code/fastapi/app.py:1:6
  |
1 | from fastapi import FastAPI
  |      ^^^^^^^
2 |
3 | app = FastAPI()
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `fastapi`
 --> docs/tutorial/code/fastapi/greeting_app.py:3:6
  |
1 | import os
2 |
3 | from fastapi import FastAPI
  |      ^^^^^^^
4 |
5 | app = FastAPI()
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `fastapi`
 --> docs/tutorial/code/fastapi/visitors_app.py:7:6
  |
5 | from typing import Annotated
6 |
7 | from fastapi import FastAPI, Header
  |      ^^^^^^^
8 | import psycopg2
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `psycopg2`
  --> docs/tutorial/code/fastapi/visitors_app.py:8:8
   |
 7 | from fastapi import FastAPI, Header
 8 | import psycopg2
   |        ^^^^^^^^
 9 |
10 | app = FastAPI()
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `psycopg2`
 --> docs/tutorial/code/fastapi/visitors_migrate.py:5:8
  |
3 | import os
4 |
5 | import psycopg2
  |        ^^^^^^^^
6 |
7 | DATABASE_URI = os.environ["POSTGRESQL_DB_CONNECT_STRING"]
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `flask`
 --> docs/tutorial/code/flask/app.py:3:8
  |
1 | # initial hello world Flask app
2 |
3 | import flask
  |        ^^^^^
4 |
5 | app = flask.Flask(__name__)
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `flask`
 --> docs/tutorial/code/flask/greeting_app.py:3:8
  |
1 | # Flask app with a greeting configuration
2 |
3 | import flask
  |        ^^^^^
4 |
5 | app = flask.Flask(__name__)
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `flask`
 --> docs/tutorial/code/flask/visitors_app.py:6:8
  |
4 | import os
5 |
6 | import flask
  |        ^^^^^
7 | import psycopg2
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `psycopg2`
 --> docs/tutorial/code/flask/visitors_app.py:7:8
  |
6 | import flask
7 | import psycopg2
  |        ^^^^^^^^
8 |
9 | app = flask.Flask(__name__)
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `psycopg2`
 --> docs/tutorial/code/flask/visitors_migrate.py:5:8
  |
3 | import os
4 |
5 | import psycopg2
  |        ^^^^^^^^
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `list[ResponseCharmResourceBase]`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `datetime`, and 2 more union elements, are not assignable to `list[ResponseCharmResourceBase]`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `datetime`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `datetime`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `str`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `str`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `int`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `int`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `str`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `str`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `str`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `str`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `str`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `str`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `str`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `str`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `ByteSize`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 3 more union elements, are not assignable to `ByteSize`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `str`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `str`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `datetime | None`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `datetime | None`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `str | None`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `str | None`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
    --> tests/commands/test_store_api.py:1628:13
     |
1626 |     expected = {
1627 |         (test_lib_id, test_api): Library(
1628 |             api=test_api,
     |             ^^^^^^^^^^^^ Expected `int`, found `Literal["test-api-version"]`
1629 |             content=test_content,
1630 |             content_hash=test_hash,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
    --> tests/commands/test_store_api.py:1634:13
     |
1632 |             lib_name=test_lib_name,
1633 |             charm_name=test_charm_name,
1634 |             patch=test_patch,
     |             ^^^^^^^^^^^^^^^^ Expected `int`, found `Literal["test-patch-version"]`
1635 |         ),
1636 |     }
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
    --> tests/commands/test_store_api.py:1718:13
     |
1716 |     expected = {
1717 |         (test_lib_id_1, test_api_1): Library(
1718 |             api=test_api_1,
     |             ^^^^^^^^^^^^^^ Expected `int`, found `Literal["test-api-version-1"]`
1719 |             content=test_content_1,
1720 |             content_hash=test_hash_1,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
    --> tests/commands/test_store_api.py:1724:13
     |
1722 |             lib_name=test_lib_name_1,
1723 |             charm_name=test_charm_name_1,
1724 |             patch=test_patch_1,
     |             ^^^^^^^^^^^^^^^^^^ Expected `int`, found `Literal["test-patch-version-1"]`
1725 |         ),
1726 |         (test_lib_id_2, test_api_2): Library(
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
    --> tests/commands/test_store_api.py:1727:13
     |
1725 |         ),
1726 |         (test_lib_id_2, test_api_2): Library(
1727 |             api=test_api_2,
     |             ^^^^^^^^^^^^^^ Expected `int`, found `Literal["test-api-version-2"]`
1728 |             content=test_content_2,
1729 |             content_hash=test_hash_2,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
    --> tests/commands/test_store_api.py:1733:13
     |
1731 |             lib_name=test_lib_name_2,
1732 |             charm_name=test_charm_name_2,
1733 |             patch=test_patch_2,
     |             ^^^^^^^^^^^^^^^^^^ Expected `int`, found `Literal["test-patch-version-2"]`
1734 |         ),
1735 |     }
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-method-override]: Invalid override of method `json`
   --> tests/commands/test_store_client.py:77:9
    |
 75 |           return self.status_code == 200
 76 |
 77 |       def json(self):
    |           ^^^^^^^^^^ Definition is incompatible with `Response.json`
 78 |           try:
 79 |               return json.loads(self._content)  # type: ignore
    |
   ::: .venv/lib/python3.12/site-packages/requests-stubs/models.pyi:155:9
    |
153 |       @property
154 |       def text(self) -> str: ...
155 |       def json(
    |  _________-
156 | |         self,
157 | |         *,
158 | |         cls: type[JSONDecoder] | None = ...,
159 | |         object_hook: Callable[[dict[Any, Any]], Any] | None = ...,
160 | |         parse_float: Callable[[str], Any] | None = ...,
161 | |         parse_int: Callable[[str], Any] | None = ...,
162 | |         parse_constant: Callable[[str], Any] | None = ...,
163 | |         object_pairs_hook: Callable[[list[tuple[Any, Any]]], Any] | None = ...,
164 | |         **kwds: Any,
165 | |     ) -> Any: ...
    | |____________- `Response.json` defined here
166 |       @property
167 |       def links(self) -> dict[Incomplete, Incomplete]: ...
    |
info: This violates the Liskov Substitution Principle
info: rule `invalid-method-override` is enabled by default

error[missing-argument]: No argument provided for required parameter `cls`
   --> tests/conftest.py:146:14
    |
145 |     if request.param == "bases":
146 |         with pytest.MonkeyPatch.context() as monkeypatch:
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
147 |             # Add the current system to legacy bases so we can test legacy bases.
148 |             monkeypatch.setattr(const, "LEGACY_BASES", (*const.LEGACY_BASES, base_str))
    |
info: Union variant `(cls) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((cls) -> _GeneratorContextManager[Unknown, None, None]) | ((cls) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `missing-argument` is enabled by default

error[missing-argument]: No argument provided for required parameter `cls`
   --> tests/conftest.py:146:14
    |
145 |     if request.param == "bases":
146 |         with pytest.MonkeyPatch.context() as monkeypatch:
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
147 |             # Add the current system to legacy bases so we can test legacy bases.
148 |             monkeypatch.setattr(const, "LEGACY_BASES", (*const.LEGACY_BASES, base_str))
    |
info: Union variant `(cls) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((cls) -> _GeneratorContextManager[Unknown, None, None]) | ((cls) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `missing-argument` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/conftest.py:226:9
    |
224 |         build_base=craft_platforms.DistroBase("ubuntu", "22.04"),
225 |         build_on=arch,
226 |         build_for="arm64",
    |         ^^^^^^^^^^^^^^^^^ Expected `DebianArchitecture | Literal["all"]`, found `Literal["arm64"]`
227 |         platform="distro-1-test64",
228 |     )
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-method-override]: Invalid override of method `get_supported_bases`
  --> tests/extensions/test_extensions.py:33:9
   |
32 |     @classmethod
33 |     def get_supported_bases(cls) -> list[tuple[str, ...]]:
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Definition is incompatible with `Extension.get_supported_bases`
34 |         """Return a list of tuple of supported bases."""
35 |         return cls.bases
   |
  ::: charmcraft/extensions/extension.py:52:9
   |
50 |     @staticmethod
51 |     @abc.abstractmethod
52 |     def get_supported_bases() -> list[tuple[str, str]]:
   |         ---------------------------------------------- `Extension.get_supported_bases` defined here
53 |         """Return a list of tuple of supported bases."""
   |
info: `FakeExtension.get_supported_bases` is a classmethod but `Extension.get_supported_bases` is a staticmethod
info: This violates the Liskov Substitution Principle
info: rule `invalid-method-override` is enabled by default

error[invalid-method-override]: Invalid override of method `is_experimental`
  --> tests/extensions/test_extensions.py:38:9
   |
37 |     @staticmethod
38 |     def is_experimental(_base: tuple[str, ...] | None) -> bool:
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Definition is incompatible with `Extension.is_experimental`
39 |         """Return whether or not this extension is unstable for given base."""
40 |         return False
   |
  ::: charmcraft/extensions/extension.py:57:9
   |
55 |     @staticmethod
56 |     @abc.abstractmethod
57 |     def is_experimental(base: tuple[str, str] | None) -> bool:
   |         ----------------------------------------------------- `Extension.is_experimental` defined here
58 |         """Return whether or not this extension is unstable for given base."""
   |
info: This violates the Liskov Substitution Principle
info: rule `invalid-method-override` is enabled by default

error[invalid-method-override]: Invalid override of method `is_experimental`
  --> tests/extensions/test_extensions.py:62:9
   |
61 |     @staticmethod
62 |     def is_experimental(_base: str | None) -> bool:
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Definition is incompatible with `FakeExtension.is_experimental`
63 |         return True
   |
  ::: tests/extensions/test_extensions.py:38:9
   |
37 |     @staticmethod
38 |     def is_experimental(_base: tuple[str, ...] | None) -> bool:
   |         ------------------------------------------------------ `FakeExtension.is_experimental` defined here
39 |         """Return whether or not this extension is unstable for given base."""
40 |         return False
   |
info: This violates the Liskov Substitution Principle
info: rule `invalid-method-override` is enabled by default

error[invalid-method-override]: Invalid override of method `is_experimental`
  --> tests/extensions/test_registry.py:34:9
   |
33 |     @staticmethod
34 |     def is_experimental(_base: tuple[str, str] | None) -> bool:
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Definition is incompatible with `Extension.is_experimental`
35 |         return False
   |
  ::: charmcraft/extensions/extension.py:57:9
   |
55 |     @staticmethod
56 |     @abc.abstractmethod
57 |     def is_experimental(base: tuple[str, str] | None) -> bool:
   |         ----------------------------------------------------- `Extension.is_experimental` defined here
58 |         """Return whether or not this extension is unstable for given base."""
   |
info: This violates the Liskov Substitution Principle
info: rule `invalid-method-override` is enabled by default

warning[possibly-missing-attribute]: Submodule `application` may not be available as an attribute on module `charmcraft`
  --> tests/integration/commands/test_init.py:75:17
   |
73 | def init_command():
74 |     return init.InitCommand(
75 |         {"app": charmcraft.application.APP_METADATA, "services": None}
   |                 ^^^^^^^^^^^^^^^^^^^^^^
76 |     )
   |
help: Consider explicitly importing `charmcraft.application`
info: rule `possibly-missing-attribute` is enabled by default

error[unresolved-attribute]: Object of type `RecordingEmitter` has no attribute `assert_json_output`
   --> tests/integration/commands/test_store_commands.py:225:9
    |
223 |             },
224 |         ]
225 |         emitter.assert_json_output(  # pyright: ignore[reportAttributeAccessIssue]
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^
226 |             expected
227 |         )
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Unresolved attribute `client` on type `AppService`.
  --> tests/integration/conftest.py:45:5
   |
43 |     services.register_services()
44 |     factory = craft_application.ServiceFactory(app=application.APP_METADATA)
45 |     factory.get("store").client = mock.Mock(spec_set=craft_store.StoreClient)  # pyright: ignore[reportAttributeAccessIssue]
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
46 |     factory.update_kwargs(
47 |         "charm_libs",
   |
info: rule `unresolved-attribute` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
  --> tests/integration/services/test_image.py:28:9
   |
26 |     service = ImageService(
27 |         app=application.APP_METADATA,
28 |         services=None,  # pyright: ignore[reportArgumentType]
   |         ^^^^^^^^^^^^^ Expected `ServiceFactory`, found `None`
29 |     )
30 |     service.setup()
   |
info: Method defined here
  --> .venv/lib/python3.12/site-packages/craft_application/services/base.py:44:9
   |
42 |     """
43 |
44 |     def __init__(self, app: AppMetadata, services: ServiceFactory) -> None:
   |         ^^^^^^^^                         ------------------------ Parameter declared here
45 |         self._app = app
46 |         self._services = services
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/integration/services/test_lifecycle.py:40:17
   |
38 |                 platform="something",
39 |                 build_on=craft_platforms.DebianArchitecture.from_host(),
40 |                 build_for="invalid",  # pyright: ignore[reportArgumentType]
   |                 ^^^^^^^^^^^^^^^^^^^ Expected `DebianArchitecture | Literal["all"]`, found `Literal["invalid"]`
41 |                 build_base=craft_platforms.DistroBase(distro.id(), distro.version()),
42 |             )
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/integration/services/test_lifecycle.py:88:17
   |
86 |                 platform="something",
87 |                 build_on=host_arch,
88 |                 build_for=f"{foreign_arch}-{host_arch}",  # pyright: ignore[reportArgumentType]
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `DebianArchitecture | Literal["all"]`, found `str`
89 |                 build_base=craft_platforms.DistroBase(distro.id(), distro.version()),
90 |             )
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/integration/services/test_provider.py:56:28
   |
54 |     assert not lock_file.exists()
55 |
56 |     with provider.instance(**provider_kwargs):
   |                            ^^^^^^^^^^^^^^^^^ Expected `BuildInfo`, found `Unknown | BuildInfo | Path`
57 |         # Test that the cache lock gets created
58 |         assert lock_file.is_file()
   |
info: Element `Path` of this union is not assignable to `BuildInfo`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/integration/services/test_provider.py:56:28
   |
54 |     assert not lock_file.exists()
55 |
56 |     with provider.instance(**provider_kwargs):
   |                            ^^^^^^^^^^^^^^^^^ Expected `Path`, found `Unknown | BuildInfo | Path`
57 |         # Test that the cache lock gets created
58 |         assert lock_file.is_file()
   |
info: Element `BuildInfo` of this union is not assignable to `Path`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/integration/services/test_provider.py:56:28
   |
54 |     assert not lock_file.exists()
55 |
56 |     with provider.instance(**provider_kwargs):
   |                            ^^^^^^^^^^^^^^^^^ Expected `bool`, found `Unknown | BuildInfo | Path`
57 |         # Test that the cache lock gets created
58 |         assert lock_file.is_file()
   |
info: Union elements `BuildInfo` and `Path` are not assignable to `bool`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/integration/services/test_provider.py:56:28
   |
54 |     assert not lock_file.exists()
55 |
56 |     with provider.instance(**provider_kwargs):
   |                            ^^^^^^^^^^^^^^^^^ Expected `bool`, found `Unknown | BuildInfo | Path`
57 |         # Test that the cache lock gets created
58 |         assert lock_file.is_file()
   |
info: Union elements `BuildInfo` and `Path` are not assignable to `bool`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/integration/services/test_provider.py:56:28
   |
54 |     assert not lock_file.exists()
55 |
56 |     with provider.instance(**provider_kwargs):
   |                            ^^^^^^^^^^^^^^^^^ Expected `bool`, found `Unknown | BuildInfo | Path`
57 |         # Test that the cache lock gets created
58 |         assert lock_file.is_file()
   |
info: Union elements `BuildInfo` and `Path` are not assignable to `bool`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/integration/services/test_provider.py:56:28
   |
54 |     assert not lock_file.exists()
55 |
56 |     with provider.instance(**provider_kwargs):
   |                            ^^^^^^^^^^^^^^^^^ Expected `str | None`, found `Unknown | BuildInfo | Path`
57 |         # Test that the cache lock gets created
58 |         assert lock_file.is_file()
   |
info: Union elements `BuildInfo` and `Path` are not assignable to `str | None`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/integration/services/test_provider.py:56:28
   |
54 |     assert not lock_file.exists()
55 |
56 |     with provider.instance(**provider_kwargs):
   |                            ^^^^^^^^^^^^^^^^^ Expected `((Executor, /) -> None) | None`, found `Unknown | BuildInfo | Path`
57 |         # Test that the cache lock gets created
58 |         assert lock_file.is_file()
   |
info: Union elements `BuildInfo` and `Path` are not assignable to `((Executor, /) -> None) | None`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/integration/services/test_provider.py:56:28
   |
54 |     assert not lock_file.exists()
55 |
56 |     with provider.instance(**provider_kwargs):
   |                            ^^^^^^^^^^^^^^^^^ Expected `bool | str | None`, found `Unknown | BuildInfo | Path`
57 |         # Test that the cache lock gets created
58 |         assert lock_file.is_file()
   |
info: Union elements `BuildInfo` and `Path` are not assignable to `bool | str | None`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:101:28
    |
 99 |     }
100 |
101 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `BuildInfo`, found `Unknown | BuildInfo | Path`
102 |         # Create a file in the cache and ensure it's not visible in the outer fs
103 |         instance.execute_run(["touch", "/root/.cache/cache_cached"])
    |
info: Element `Path` of this union is not assignable to `BuildInfo`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:101:28
    |
 99 |     }
100 |
101 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `Path`, found `Unknown | BuildInfo | Path`
102 |         # Create a file in the cache and ensure it's not visible in the outer fs
103 |         instance.execute_run(["touch", "/root/.cache/cache_cached"])
    |
info: Element `BuildInfo` of this union is not assignable to `Path`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:101:28
    |
 99 |     }
100 |
101 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `bool`, found `Unknown | BuildInfo | Path`
102 |         # Create a file in the cache and ensure it's not visible in the outer fs
103 |         instance.execute_run(["touch", "/root/.cache/cache_cached"])
    |
info: Union elements `BuildInfo` and `Path` are not assignable to `bool`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:101:28
    |
 99 |     }
100 |
101 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `bool`, found `Unknown | BuildInfo | Path`
102 |         # Create a file in the cache and ensure it's not visible in the outer fs
103 |         instance.execute_run(["touch", "/root/.cache/cache_cached"])
    |
info: Union elements `BuildInfo` and `Path` are not assignable to `bool`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:101:28
    |
 99 |     }
100 |
101 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `bool`, found `Unknown | BuildInfo | Path`
102 |         # Create a file in the cache and ensure it's not visible in the outer fs
103 |         instance.execute_run(["touch", "/root/.cache/cache_cached"])
    |
info: Union elements `BuildInfo` and `Path` are not assignable to `bool`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:101:28
    |
 99 |     }
100 |
101 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `str | None`, found `Unknown | BuildInfo | Path`
102 |         # Create a file in the cache and ensure it's not visible in the outer fs
103 |         instance.execute_run(["touch", "/root/.cache/cache_cached"])
    |
info: Union elements `BuildInfo` and `Path` are not assignable to `str | None`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:101:28
    |
 99 |     }
100 |
101 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `((Executor, /) -> None) | None`, found `Unknown | BuildInfo | Path`
102 |         # Create a file in the cache and ensure it's not visible in the outer fs
103 |         instance.execute_run(["touch", "/root/.cache/cache_cached"])
    |
info: Union elements `BuildInfo` and `Path` are not assignable to `((Executor, /) -> None) | None`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:101:28
    |
 99 |     }
100 |
101 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `bool | str | None`, found `Unknown | BuildInfo | Path`
102 |         # Create a file in the cache and ensure it's not visible in the outer fs
103 |         instance.execute_run(["touch", "/root/.cache/cache_cached"])
    |
info: Union elements `BuildInfo` and `Path` are not assignable to `bool | str | None`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:134:28
    |
132 |         "cache_path": cache_path,
133 |     }
134 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `BuildInfo`, found `Unknown | BuildInfo | Path`
135 |         instance.execute_run(["test", "-d", "/root/.cache"], check=True)
136 |         instance.execute_run(
    |
info: Element `Path` of this union is not assignable to `BuildInfo`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:134:28
    |
132 |         "cache_path": cache_path,
133 |     }
134 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `Path`, found `Unknown | BuildInfo | Path`
135 |         instance.execute_run(["test", "-d", "/root/.cache"], check=True)
136 |         instance.execute_run(
    |
info: Element `BuildInfo` of this union is not assignable to `Path`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:134:28
    |
132 |         "cache_path": cache_path,
133 |     }
134 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `bool`, found `Unknown | BuildInfo | Path`
135 |         instance.execute_run(["test", "-d", "/root/.cache"], check=True)
136 |         instance.execute_run(
    |
info: Union elements `BuildInfo` and `Path` are not assignable to `bool`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:134:28
    |
132 |         "cache_path": cache_path,
133 |     }
134 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `bool`, found `Unknown | BuildInfo | Path`
135 |         instance.execute_run(["test", "-d", "/root/.cache"], check=True)
136 |         instance.execute_run(
    |
info: Union elements `BuildInfo` and `Path` are not assignable to `bool`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:134:28
    |
132 |         "cache_path": cache_path,
133 |     }
134 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `bool`, found `Unknown | BuildInfo | Path`
135 |         instance.execute_run(["test", "-d", "/root/.cache"], check=True)
136 |         instance.execute_run(
    |
info: Union elements `BuildInfo` and `Path` are not assignable to `bool`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:134:28
    |
132 |         "cache_path": cache_path,
133 |     }
134 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `str | None`, found `Unknown | BuildInfo | Path`
135 |         instance.execute_run(["test", "-d", "/root/.cache"], check=True)
136 |         instance.execute_run(
    |
info: Union elements `BuildInfo` and `Path` are not assignable to `str | None`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:134:28
    |
132 |         "cache_path": cache_path,
133 |     }
134 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `((Executor, /) -> None) | None`, found `Unknown | BuildInfo | Path`
135 |         instance.execute_run(["test", "-d", "/root/.cache"], check=True)
136 |         instance.execute_run(
    |
info: Union elements `BuildInfo` and `Path` are not assignable to `((Executor, /) -> None) | None`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:134:28
    |
132 |         "cache_path": cache_path,
133 |     }
134 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `bool | str | None`, found `Unknown | BuildInfo | Path`
135 |         instance.execute_run(["test", "-d", "/root/.cache"], check=True)
136 |         instance.execute_run(
    |
info: Union elements `BuildInfo` and `Path` are not assignable to `bool | str | None`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[unresolved-import]: Cannot resolve imported module `charm`
  --> tests/spread/commands/init-extensions/tests/unit/test_charm.py:9:8
   |
 7 | import pathlib
 8 |
 9 | import charm
   |        ^^^^^
10 | import scenario
11 | import scenario.errors
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `scenario`
  --> tests/spread/commands/init-extensions/tests/unit/test_charm.py:10:8
   |
 9 | import charm
10 | import scenario
   |        ^^^^^^^^
11 | import scenario.errors
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `scenario.errors`
  --> tests/spread/commands/init-extensions/tests/unit/test_charm.py:11:8
   |
 9 | import charm
10 | import scenario
11 | import scenario.errors
   |        ^^^^^^^^^^^^^^^
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/dependencies/setuptools-scm-python/src/charm.py:9:8
   |
 7 | import logging
 8 |
 9 | import ops
   |        ^^^
10 |
11 | # A standalone module for workload-specific logic (no charming concerns):
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `setuptools_scm_python`
  --> tests/spread/dependencies/setuptools-scm-python/src/charm.py:12:8
   |
11 | # A standalone module for workload-specific logic (no charming concerns):
12 | import setuptools_scm_python
   |        ^^^^^^^^^^^^^^^^^^^^^
13 |
14 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/dependencies/strict-dependencies-errors/extra-binary-packages/src/charm.py:17:8
   |
15 | import logging
16 |
17 | import ops
   |        ^^^
18 |
19 | # Log messages can be retrieved using juju debug-log
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/dependencies/strict-dependencies-errors/extra-packages/src/charm.py:17:8
   |
15 | import logging
16 |
17 | import ops
   |        ^^^
18 |
19 | # Log messages can be retrieved using juju debug-log
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/dependencies/strict-dependencies-errors/missing-packages/src/charm.py:17:8
   |
15 | import logging
16 |
17 | import ops
   |        ^^^
18 |
19 | # Log messages can be retrieved using juju debug-log
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/dependencies/strict-dependencies-errors/no-requirements/src/charm.py:17:8
   |
15 | import logging
16 |
17 | import ops
   |        ^^^
18 |
19 | # Log messages can be retrieved using juju debug-log
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/dependencies/strict-dependencies/charm/src/charm.py:17:8
   |
15 | import logging
16 |
17 | import ops
   |        ^^^
18 |
19 | # Log messages can be retrieved using juju debug-log
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `charms.reactive`
 --> tests/spread/smoketests/reactive/reactivecharm/reactive/reactivecharm.py:1:6
  |
1 | from charms.reactive import set_flag, when_not
  |      ^^^^^^^^^^^^^^^
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/ubuntu-20.04/charm/bases/src/charm.py:18:8
   |
16 | from typing import cast
17 |
18 | import ops
   |        ^^^
19 |
20 | # Log messages can be retrieved using juju debug-log
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/ubuntu-20.04/charm/platforms/src/charm.py:9:8
   |
 7 | import logging
 8 |
 9 | import ops
   |        ^^^
10 |
11 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/ubuntu-22.04/charm/bases/src/charm.py:18:8
   |
16 | from typing import cast
17 |
18 | import ops
   |        ^^^
19 |
20 | # Log messages can be retrieved using juju debug-log
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/ubuntu-22.04/charm/platforms/src/charm.py:9:8
   |
 7 | import logging
 8 |
 9 | import ops
   |        ^^^
10 |
11 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/ubuntu-24.04/charm/platforms/src/charm.py:9:8
   |
 7 | import logging
 8 |
 9 | import ops
   |        ^^^
10 |
11 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
 --> tests/spread/ubuntu-24.04/test-cmd/src/charm.py:6:8
  |
4 | import logging
5 |
6 | import ops
  |        ^^^
7 |
8 | # A standalone module for workload-specific logic (no charming concerns):
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `test_cmd`
  --> tests/spread/ubuntu-24.04/test-cmd/src/charm.py:9:8
   |
 8 | # A standalone module for workload-specific logic (no charming concerns):
 9 | import test_cmd
   |        ^^^^^^^^
10 |
11 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `pytest_operator.plugin`
 --> tests/spread/ubuntu-24.04/test-cmd/tests/integration/test_charm.py:7:6
  |
5 | import pytest
6 | import yaml
7 | from pytest_operator.plugin import OpsTest
  |      ^^^^^^^^^^^^^^^^^^^^^^
8 |
9 | logger = logging.getLogger(__name__)
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
 --> tests/spread/ubuntu-24.04/test-cmd/tests/unit/test_charm.py:2:6
  |
1 | import pytest
2 | from ops import testing
  |      ^^^
3 |
4 | from charm import TestCmdCharm
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `charm`
 --> tests/spread/ubuntu-24.04/test-cmd/tests/unit/test_charm.py:4:6
  |
2 | from ops import testing
3 |
4 | from charm import TestCmdCharm
  |      ^^^^^
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/ubuntu-25.10/charm/platforms/src/charm.py:9:8
   |
 7 | import logging
 8 |
 9 | import ops
   |        ^^^
10 |
11 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
 --> tests/spread/ubuntu-25.10/test-cmd/src/charm.py:6:8
  |
4 | import logging
5 |
6 | import ops
  |        ^^^
7 |
8 | # A standalone module for workload-specific logic (no charming concerns):
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `test_cmd`
  --> tests/spread/ubuntu-25.10/test-cmd/src/charm.py:9:8
   |
 8 | # A standalone module for workload-specific logic (no charming concerns):
 9 | import test_cmd
   |        ^^^^^^^^
10 |
11 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `pytest_operator.plugin`
 --> tests/spread/ubuntu-25.10/test-cmd/tests/integration/test_charm.py:7:6
  |
5 | import pytest
6 | import yaml
7 | from pytest_operator.plugin import OpsTest
  |      ^^^^^^^^^^^^^^^^^^^^^^
8 |
9 | logger = logging.getLogger(__name__)
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
 --> tests/spread/ubuntu-25.10/test-cmd/tests/unit/test_charm.py:2:6
  |
1 | import pytest
2 | from ops import testing
  |      ^^^
3 |
4 | from charm import TestCmdCharm
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `charm`
 --> tests/spread/ubuntu-25.10/test-cmd/tests/unit/test_charm.py:4:6
  |
2 | from ops import testing
3 |
4 | from charm import TestCmdCharm
  |      ^^^^^
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/ubuntu-26.04/charm/platforms/src/charm.py:9:8
   |
 7 | import logging
 8 |
 9 | import ops
   |        ^^^
10 |
11 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
 --> tests/spread/ubuntu-26.04/test-cmd/src/charm.py:6:8
  |
4 | import logging
5 |
6 | import ops
  |        ^^^
7 |
8 | # A standalone module for workload-specific logic (no charming concerns):
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `test_cmd`
  --> tests/spread/ubuntu-26.04/test-cmd/src/charm.py:9:8
   |
 8 | # A standalone module for workload-specific logic (no charming concerns):
 9 | import test_cmd
   |        ^^^^^^^^
10 |
11 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `pytest_operator.plugin`
 --> tests/spread/ubuntu-26.04/test-cmd/tests/integration/test_charm.py:7:6
  |
5 | import pytest
6 | import yaml
7 | from pytest_operator.plugin import OpsTest
  |      ^^^^^^^^^^^^^^^^^^^^^^
8 |
9 | logger = logging.getLogger(__name__)
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
 --> tests/spread/ubuntu-26.04/test-cmd/tests/unit/test_charm.py:2:6
  |
1 | import pytest
2 | from ops import testing
  |      ^^^
3 |
4 | from charm import TestCmdCharm
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `charm`
 --> tests/spread/ubuntu-26.04/test-cmd/tests/unit/test_charm.py:4:6
  |
2 | from ops import testing
3 |
4 | from charm import TestCmdCharm
  |      ^^^^^
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
   --> tests/test_instrum.py:256:32
    |
254 |     assert measurements.measurements == {}
255 |
256 |     with Timer("test message", foo=42):
    |                                ^^^^^^ Expected `dict[str, Any]`, found `Literal[42]`
257 |         pass
    |
info: Method defined here
   --> charmcraft/instrum.py:129:9
    |
127 |     """
128 |
129 |     def __init__(self, msg: str, **extra_info: dict[str, Any]):
    |         ^^^^^^^^                 ---------------------------- Parameter declared here
130 |         self.msg = msg
131 |         self.extra_info = extra_info
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
   --> tests/test_instrum.py:274:28
    |
272 |     monkeypatch.setattr(instrum, "_measurements", measurements)
273 |
274 |     @Timer("test message", foo=42)
    |                            ^^^^^^ Expected `dict[str, Any]`, found `Literal[42]`
275 |     def test_function(a, b):
276 |         assert a == 17
    |
info: Method defined here
   --> charmcraft/instrum.py:129:9
    |
127 |     """
128 |
129 |     def __init__(self, msg: str, **extra_info: dict[str, Any]):
    |         ^^^^^^^^                 ---------------------------- Parameter declared here
130 |         self.msg = msg
131 |         self.extra_info = extra_info
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
   --> tests/test_instrum.py:298:32
    |
296 |     assert measurements.measurements == {}
297 |
298 |     with Timer("test message", foo=42) as timer:
    |                                ^^^^^^ Expected `dict[str, Any]`, found `Literal[42]`
299 |         timer.mark("middle 1")
300 |         timer.mark("middle 2")
    |
info: Method defined here
   --> charmcraft/instrum.py:129:9
    |
127 |     """
128 |
129 |     def __init__(self, msg: str, **extra_info: dict[str, Any]):
    |         ^^^^^^^^                 ---------------------------- Parameter declared here
130 |         self.msg = msg
131 |         self.extra_info = extra_info
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-assignment]: Implicit shadowing of function `write`
  --> tests/unit/commands/test_lifecycle.py:91:5
   |
90 |     libs_service = cast("CharmLibsService", service_factory.get("charm_libs"))
91 |     libs_service.write = mock.Mock(wraps=libs_service.write)
   |     ^^^^^^^^^^^^^^^^^^
92 |
93 |     pack._update_charm_libs()
   |
info: Annotate to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[unresolved-attribute]: Object of type `bound method CharmLibsService.write(library: Library) -> None` has no attribute `assert_called_once_with`
  --> tests/unit/commands/test_lifecycle.py:95:5
   |
93 |     pack._update_charm_libs()
94 |
95 |     libs_service.write.assert_called_once_with(store_lib)
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
96 |
97 |     with check():
   |
info: rule `unresolved-attribute` is enabled by default

error[non-subscriptable]: Cannot subscript object of type `None` with no `__getitem__` method
  --> tests/unit/models/test_config.py:75:23
   |
73 |     config = JujuConfig(options={"my-opt": option})
74 |
75 |     assert isinstance(config.options["my-opt"], type_)
   |                       ^^^^^^^^^^^^^^^^^^^^^^^^
   |
info: rule `non-subscriptable` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/unit/models/test_project.py:813:13
    |
811 |             description="",
812 |             base=base,
813 |             platforms={"amd64": None},
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `PlatformsDict`, found `dict[Unknown | str, Unknown | None]`
814 |             parts={"charm": {"plugin": "charm"}},
815 |         )
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `__new__` is incorrect
  --> tests/unit/parts/plugins/test_charm.py:97:22
   |
96 |     pip_constraint_file = (
97 |         pathlib.Path(parts.plugins.__file__).parent / "charm-constraints.txt"
   |                      ^^^^^^^^^^^^^^^^^^^^^^ Expected `str | PathLike[str]`, found `str | None`
98 |     )
   |
info: Element `None` of this union is not assignable to `str | PathLike[str]`
info: Function defined here
   --> stdlib/pathlib/__init__.pyi:299:13
    |
297 |         def __new__(cls, *args: StrPath, **kwargs: Unused) -> Self: ...  # pyright: ignore[reportInconsistentConstructor]
298 |     else:
299 |         def __new__(cls, *args: StrPath, **kwargs: Unused) -> Self: ...
    |             ^^^^^^^      -------------- Parameter declared here
300 |
301 |     @classmethod
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-assignment]: Implicit shadowing of function `_get_pip`
  --> tests/unit/parts/plugins/test_poetry.py:40:5
   |
39 | def test_get_pip_install_commands(poetry_plugin: plugins.PoetryPlugin):
40 |     poetry_plugin._get_pip = lambda: "/python -m pip"
   |     ^^^^^^^^^^^^^^^^^^^^^^
41 |
42 |     assert poetry_plugin._get_pip_install_commands(
   |
info: Annotate to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Implicit shadowing of function `_get_pip`
  --> tests/unit/parts/plugins/test_python.py:62:5
   |
60 |     }
61 |     python_plugin._options = plugins.PythonPluginProperties.unmarshal(spec)
62 |     python_plugin._get_pip = lambda: "/python -m pip"
   |     ^^^^^^^^^^^^^^^^^^^^^^
63 |     copy_src_cmd = (
64 |         f"cp --archive --recursive --reflink=auto {build_path}/src {install_path}"
   |
info: Annotate to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
   --> tests/unit/services/test_analysis.py:112:67
    |
110 | @pytest.fixture
111 | def analysis_service():
112 |     return analysis.AnalysisService(app=application.APP_METADATA, services=None)
    |                                                                   ^^^^^^^^^^^^^ Expected `ServiceFactory`, found `None`
    |
info: Method defined here
  --> charmcraft/services/analysis.py:37:9
   |
35 |     _project: models.CharmcraftProject  # type: ignore[assignment]
36 |
37 |     def __init__(  # (too many arguments)
   |         ^^^^^^^^
38 |         self,
39 |         app: craft_application.AppMetadata,
40 |         services: craft_application.ServiceFactory,
   |         ------------------------------------------ Parameter declared here
41 |     ) -> None:
42 |         super().__init__(app, services)
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/unit/services/test_lifecycle.py:55:17
   |
53 |                 platform="something",
54 |                 build_on=HOST_ARCH,
55 |                 build_for=plan_build_for,  # pyright: ignore[reportArgumentType]
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^ Expected `DebianArchitecture | Literal["all"]`, found `str`
56 |             )
57 |         ]
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/unit/services/test_lifecycle.py:94:17
   |
92 |                 platform="something",
93 |                 build_on=HOST_ARCH,
94 |                 build_for=f"{HOST_ARCH}-foreign",  # pyright: ignore[reportArgumentType]
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `DebianArchitecture | Literal["all"]`, found `str`
95 |             )
96 |         ]
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
  --> tests/unit/services/test_project.py:34:45
   |
32 | @pytest.fixture
33 | def service(project_path):
34 |     return ProjectService(app=APP_METADATA, services=None, project_dir=project_path)
   |                                             ^^^^^^^^^^^^^ Expected `ServiceFactory`, found `None`
   |
info: Method defined here
  --> .venv/lib/python3.12/site-packages/craft_application/services/project.py:57:9
   |
55 |     _project_model: models.Project | None
56 |
57 |     def __init__(
   |         ^^^^^^^^
58 |         self, app: AppMetadata, services: ServiceFactory, *, project_dir: pathlib.Path
   |                                 ------------------------ Parameter declared here
59 |     ) -> None:
60 |         super().__init__(app, services)
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
   --> tests/unit/services/test_provider.py:123:9
    |
121 |     provider_service = ProviderService(
122 |         app=APP_METADATA,
123 |         services=None,  # pyright: ignore[reportArgumentType]
    |         ^^^^^^^^^^^^^ Expected `ServiceFactory`, found `None`
124 |         work_dir=tmp_path,
125 |     )
    |
info: Method defined here
  --> charmcraft/services/provider.py:43:9
   |
41 |     """Business logic for getting providers."""
42 |
43 |     def __init__(
   |         ^^^^^^^^
44 |         self,
45 |         app: craft_application.AppMetadata,
46 |         services: craft_application.ServiceFactory,
   |         ------------------------------------------ Parameter declared here
47 |         *,
48 |         work_dir: pathlib.Path,
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
  --> tests/unit/services/test_store.py:50:56
   |
48 | @pytest.fixture(scope="module")
49 | def reusable_store():
50 |     store = StoreService(app=application.APP_METADATA, services=None)
   |                                                        ^^^^^^^^^^^^^ Expected `ServiceFactory`, found `None`
51 |     store.client = mock.Mock(spec_set=craft_store.StoreClient)
52 |     store._publisher = mock.Mock(spec_set=craft_store.PublisherGateway)
   |
info: Method defined here
  --> .venv/lib/python3.12/site-packages/craft_application/services/base.py:44:9
   |
42 |     """
43 |
44 |     def __init__(self, app: AppMetadata, services: ServiceFactory) -> None:
   |         ^^^^^^^^                         ------------------------ Parameter declared here
45 |         self._app = app
46 |         self._services = services
   |
info: rule `invalid-argument-type` is enabled by default

warning[possibly-missing-attribute]: Attribute `group` may be missing on object of type `Match[str] | None`
  --> tests/unit/test_linters.py:43:12
   |
41 | )
42 | def test_fuzz_python_name_regex(name, next_char, further_garbage):
43 |     assert linters.PYTHON_NAME_REGEX.match(name).group(0) == name
   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
44 |     assert linters.PYTHON_NAME_REGEX.match(f"{name}{next_char}").group(0) == name
45 |     assert (
   |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `group` may be missing on object of type `Match[str] | None`
  --> tests/unit/test_linters.py:44:12
   |
42 | def test_fuzz_python_name_regex(name, next_char, further_garbage):
43 |     assert linters.PYTHON_NAME_REGEX.match(name).group(0) == name
44 |     assert linters.PYTHON_NAME_REGEX.match(f"{name}{next_char}").group(0) == name
   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
45 |     assert (
46 |         linters.PYTHON_NAME_REGEX.match(f"{name}{next_char}{further_garbage}").group(0)
   |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `group` may be missing on object of type `Match[str] | None`
  --> tests/unit/test_linters.py:46:9
   |
44 |     assert linters.PYTHON_NAME_REGEX.match(f"{name}{next_char}").group(0) == name
45 |     assert (
46 |         linters.PYTHON_NAME_REGEX.match(f"{name}{next_char}{further_garbage}").group(0)
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
47 |         == name
48 |     )
   |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `group` may be missing on object of type `Match[str] | None`
  --> tests/unit/test_linters.py:62:12
   |
60 | )
61 | def test_min_version_regex_matches(string, expected):
62 |     assert linters.MIN_VERSION_REGEX.search(string).group(1) == expected
   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `group` may be missing on object of type `Match[str] | None`
  --> tests/unit/test_linters.py:76:24
   |
74 | )
75 | def test_approx_version_regex_matches(string, expected):
76 |     assert expected in linters.APPROX_VERSION_REGEX.search(string).group(1, 2)
   |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `group` may be missing on object of type `Match[str] | None`
  --> tests/unit/test_linters.py:84:12
   |
82 | )
83 | def test_exact_version_regex_matches(string, expected):
84 |     assert linters.EXACT_VERSION_REGEX.search(string).group(1) == expected
   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
info: rule `possibly-missing-attribute` is enabled by default

error[no-matching-overload]: No overload of function `format_content` matches arguments
   --> tests/unit/utils/test_cli.py:285:9
    |
283 | def test_format_content_invalid(fmt):
284 |     with pytest.raises(ValueError, match="^Unknown output format "):
285 |         format_content(None, fmt)
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^
    |
info: First overload defined here
   --> charmcraft/utils/cli.py:185:5
    |
184 |   @overload
185 |   def format_content(
    |  _____^
186 | |     content: dict[str, Any] | list[dict[str, Any]], fmt: OutputFormat | str | None
187 | | ) -> str: ...
    | |________^
    |
info: Possible overloads for function `format_content`:
info:   (content: dict[str, Any] | list[dict[str, Any]], fmt: OutputFormat | str | None) -> str
info:   (content: str | Real | list[Unknown] | dict[Unknown, Unknown], fmt: OutputFormat | str | None) -> str
info: Overload implementation defined here
   --> charmcraft/utils/cli.py:196:5
    |
196 | def format_content(content, fmt=None):
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
197 |     """Format command output."""
198 |     if not isinstance(fmt, OutputFormat):
    |
info: rule `no-matching-overload` is enabled by default

Found 151 diagnostics

@lengau
Copy link
Copy Markdown
Collaborator

lengau commented Dec 8, 2025

@copilot fix the linting issues

Removed unused craft_cli.pytest_plugin import from test_project.py

Co-authored-by: lengau <4305943+lengau@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Dec 8, 2025

@copilot fix the linting issues

Fixed in commit 7ab4f1e. Removed the unused craft_cli.pytest_plugin import from test_project.py. All Python linting checks now pass.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • canonical-lgw01.cdn.snapcraftcontent.com
    • Triggering command: /usr/lib/snapd/snapd /usr/lib/snapd/snapd --format=%cI (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Dec 8, 2025

Type checking with ty failed. This is a notification only and does not require action.

Command output
warning[possibly-missing-attribute]: Attribute `bases` may be missing on object of type `PlatformCharm | BasesCharm`
   --> charmcraft/application/commands/lifecycle.py:119:36
    |
118 |         msg = "Bases index '{}' is invalid (must be >= 0 and fit in configured bases)."
119 |         len_configured_bases = len(project.bases)
    |                                    ^^^^^^^^^^^^^
120 |         for bases_index in bases_indices:
121 |             if bases_index < 0:
    |
info: rule `possibly-missing-attribute` is enabled by default

error[unresolved-attribute]: Object of type `AppService | type[AppService]` has no attribute `get_credentials`
   --> charmcraft/application/commands/store.py:210:27
    |
209 |         if parsed_args.export:
210 |             credentials = self._services.store.get_credentials(
    |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
211 |                 packages=packages, **kwargs
212 |             )
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `AppService | type[AppService]` has no attribute `login`
   --> charmcraft/application/commands/store.py:218:13
    |
216 |             )
217 |         else:
218 |             self._services.store.login(packages=packages, **kwargs)
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^
219 |             username = self._services.store.get_account_info()["username"]
220 |             emit.message(f"Logged in as {username!r}.")
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `AppService | type[AppService]` has no attribute `get_account_info`
   --> charmcraft/application/commands/store.py:219:24
    |
217 |         else:
218 |             self._services.store.login(packages=packages, **kwargs)
219 |             username = self._services.store.get_account_info()["username"]
    |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
220 |             emit.message(f"Logged in as {username!r}.")
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `AppService | type[AppService]` has no attribute `logout`
   --> charmcraft/application/commands/store.py:244:13
    |
242 |         """Run the command."""
243 |         try:
244 |             self._services.store.logout()
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
245 |             emit.message("Charmhub token cleared.")
246 |         except CredentialsUnavailable:
    |
info: rule `unresolved-attribute` is enabled by default

error[not-iterable]: Object of type `IO[str] | None` may not be iterable
   --> charmcraft/charm_builder.py:423:17
    |
422 |     # https://github.com/microsoft/pylance-release/issues/2385
423 |     for line in proc.stdout:  # pyright: ignore[reportOptionalIterable]
    |                 ^^^^^^^^^^^
424 |         print(f"   :: {line.rstrip()}")
425 |     retcode = proc.wait()
    |
info: It may not have an `__iter__` method and it doesn't have a `__getitem__` method
info: rule `not-iterable` is enabled by default

warning[possibly-missing-attribute]: Attribute `split` may be missing on object of type `str | None`
   --> charmcraft/linters.py:238:23
    |
236 |                     yield name.name.split(".")
237 |             elif isinstance(node, ast.ImportFrom):
238 |                 yield node.module.split(".")
    |                       ^^^^^^^^^^^^^^^^^
239 |
240 |     def _check_operator(self, basedir: pathlib.Path) -> bool:
    |
info: rule `possibly-missing-attribute` is enabled by default

error[invalid-argument-type]: Argument to function `quote` is incorrect
   --> charmcraft/parts/plugins/_charm.py:289:42
    |
287 |             build_cmd.extend(self._get_legacy_dependencies_parameters())
288 |
289 |         commands = [" ".join(shlex.quote(i) for i in build_cmd)]
    |                                          ^ Expected `str`, found `Unknown | str | None`
290 |
291 |         # hook a callback after the BUILD happened (to collect metrics left by charm builder)
    |
info: Element `None` of this union is not assignable to `str`
info: Function defined here
  --> stdlib/shlex.pyi:34:5
   |
32 |     """Return a shell-escaped string from *split_command*."""
33 |
34 | def quote(s: str) -> str:
   |     ^^^^^ ------ Parameter declared here
35 |     """Return a shell-escaped version of the string *s*."""
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `merge_from` is incorrect
   --> charmcraft/parts/plugins/_charm.py:341:28
    |
339 |     def post_build_callback(self, step_info):
340 |         """Collect metrics left by charm_builder.py."""
341 |         instrum.merge_from(env.get_charm_builder_metrics_path())
    |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str`, found `Path`
342 |
343 |     def _get_os_special_priority_paths(self) -> str | None:
    |
info: Method defined here
  --> charmcraft/instrum.py:77:9
   |
75 |             json.dump(measurements, fh, indent=4)
76 |
77 |     def merge_from(self, filename: str) -> None:
   |         ^^^^^^^^^^       ------------- Parameter declared here
78 |         """Merge measurements from a file to the current ongoing structure."""
79 |         with open(filename) as fh:
   |
info: rule `invalid-argument-type` is enabled by default

warning[possibly-missing-attribute]: Attribute `login` may be missing on object of type `Unknown | Client | AnonymousClient`
   --> charmcraft/store/store.py:227:27
    |
226 |         try:
227 |             credentials = self._client.login(**kwargs)
    |                           ^^^^^^^^^^^^^^^^^^
228 |         except CredentialsAlreadyAvailable as exc:
229 |             raise CraftError(
    |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `logout` may be missing on object of type `Unknown | Client | AnonymousClient`
   --> charmcraft/store/store.py:241:9
    |
239 |         There's no action really in the Store to logout, we just remove local credentials.
240 |         """
241 |         self._client.logout()
    |         ^^^^^^^^^^^^^^^^^^^
242 |
243 |     @_store_client_wrapper(auto_login=False)
    |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `whoami` may be missing on object of type `Unknown | Client | AnonymousClient`
   --> charmcraft/store/store.py:246:20
    |
244 |     def whoami(self):
245 |         """Return authenticated user details."""
246 |         response = self._client.whoami()
    |                    ^^^^^^^^^^^^^^^^^^^
247 |
248 |         acc = response["account"]
    |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `whoami` may be missing on object of type `Unknown | Client | AnonymousClient`
   --> charmcraft/store/store.py:268:9
    |
266 |     def _check_authorized(self) -> None:
267 |         """Check if current credentials authenticated."""
268 |         self._client.whoami()
    |         ^^^^^^^^^^^^^^^^^^^
269 |
270 |     @_store_client_wrapper()
    |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `unregister_name` may be missing on object of type `Unknown | Client | AnonymousClient`
   --> charmcraft/store/store.py:285:9
    |
283 |         :raises: error messages from craft-store
284 |         """
285 |         self._client.unregister_name(name)
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
286 |
287 |     @_store_client_wrapper()
    |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `push_file` may be missing on object of type `Unknown | Client | AnonymousClient`
   --> charmcraft/store/store.py:311:21
    |
309 |         self._check_authorized()
310 |
311 |         upload_id = self._client.push_file(filepath)
    |                     ^^^^^^^^^^^^^^^^^^^^^^
312 |         payload = {"upload-id": upload_id}
313 |         if extra_fields is not None:
    |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `list_resource_revisions` may be missing on object of type `Unknown | Client | AnonymousClient`
   --> charmcraft/store/store.py:506:16
    |
504 |     ) -> list[CharmResourceRevision]:
505 |         """Return revisions for the indicated charm resource."""
506 |         return self._client.list_resource_revisions(charm_name, resource_name)
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
507 |
508 |     @_store_client_wrapper()
    |
info: rule `possibly-missing-attribute` is enabled by default

error[invalid-argument-type]: Argument to function `__new__` is incorrect
   --> docs/conf.py:242:38
    |
240 | # Setup libraries documentation snippets for use in charmcraft docs.
241 | common_docs_path = pathlib.Path(__file__).parent / "common"
242 | craft_parts_docs_path = pathlib.Path(craft_parts_docs.__file__).parent / "craft-parts"
    |                                      ^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str | PathLike[str]`, found `str | None`
243 | (common_docs_path / "craft-parts").unlink(missing_ok=True)
244 | (common_docs_path / "craft-parts").symlink_to(craft_parts_docs_path, target_is_directory=True)
    |
info: Element `None` of this union is not assignable to `str | PathLike[str]`
info: Function defined here
   --> stdlib/pathlib/__init__.pyi:299:13
    |
297 |         def __new__(cls, *args: StrPath, **kwargs: Unused) -> Self: ...  # pyright: ignore[reportInconsistentConstructor]
298 |     else:
299 |         def __new__(cls, *args: StrPath, **kwargs: Unused) -> Self: ...
    |             ^^^^^^^      -------------- Parameter declared here
300 |
301 |     @classmethod
    |
info: rule `invalid-argument-type` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> docs/howto/code/custom-action-clearsession/clearsession_action_charm.py:10:8
   |
 8 | import typing
 9 |
10 | import ops
   |        ^^^
11 |
12 | import paas_charm.django
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `paas_charm.django`
  --> docs/howto/code/custom-action-clearsession/clearsession_action_charm.py:12:8
   |
10 | import ops
11 |
12 | import paas_charm.django
   |        ^^^^^^^^^^^^^^^^^
13 |
14 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `flask`
 --> docs/howto/code/custom-action-updatelogfile/app.py:3:8
  |
1 | # initial hello world Flask app
2 |
3 | import flask
  |        ^^^^^
4 |
5 | app = flask.Flask(__name__)
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> docs/howto/code/custom-action-updatelogfile/updatelogfile_action_charm.py:10:8
   |
 8 | import typing
 9 |
10 | import ops
   |        ^^^
11 |
12 | import paas_charm.flask
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `paas_charm.flask`
  --> docs/howto/code/custom-action-updatelogfile/updatelogfile_action_charm.py:12:8
   |
10 | import ops
11 |
12 | import paas_charm.flask
   |        ^^^^^^^^^^^^^^^^
13 |
14 | import requests
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `flask`
 --> docs/howto/code/flask-async/app.py:3:8
  |
1 | from time import sleep
2 |
3 | import flask
  |        ^^^^^
4 |
5 | app = flask.Flask(__name__)
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `django.contrib`
  --> docs/tutorial/code/django/urls_django_hello_world.py:17:6
   |
15 |     2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
16 | """
17 | from django.contrib import admin
   |      ^^^^^^^^^^^^^^
18 | from django.urls import include, path
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `django.urls`
  --> docs/tutorial/code/django/urls_django_hello_world.py:18:6
   |
16 | """
17 | from django.contrib import admin
18 | from django.urls import include, path
   |      ^^^^^^^^^^^
19 |
20 | urlpatterns = [
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `django.urls`
 --> docs/tutorial/code/django/urls_greeting.py:1:6
  |
1 | from django.urls import path
  |      ^^^^^^^^^^^
2 |
3 | from . import views
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Module `docs.tutorial.code.django` has no member `views`
 --> docs/tutorial/code/django/urls_greeting.py:3:15
  |
1 | from django.urls import path
2 |
3 | from . import views
  |               ^^^^^
4 |
5 | urlpatterns = [
  |
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `django.http`
 --> docs/tutorial/code/django/views_greeting.py:1:6
  |
1 | from django.http import HttpResponse
  |      ^^^^^^^^^^^
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `django.http`
 --> docs/tutorial/code/django/views_greeting_configuration.py:3:6
  |
1 | import os
2 |
3 | from django.http import HttpResponse
  |      ^^^^^^^^^^^
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `fastapi`
 --> docs/tutorial/code/fastapi/app.py:1:6
  |
1 | from fastapi import FastAPI
  |      ^^^^^^^
2 |
3 | app = FastAPI()
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `fastapi`
 --> docs/tutorial/code/fastapi/greeting_app.py:3:6
  |
1 | import os
2 |
3 | from fastapi import FastAPI
  |      ^^^^^^^
4 |
5 | app = FastAPI()
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `fastapi`
 --> docs/tutorial/code/fastapi/visitors_app.py:7:6
  |
5 | from typing import Annotated
6 |
7 | from fastapi import FastAPI, Header
  |      ^^^^^^^
8 | import psycopg2
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `psycopg2`
  --> docs/tutorial/code/fastapi/visitors_app.py:8:8
   |
 7 | from fastapi import FastAPI, Header
 8 | import psycopg2
   |        ^^^^^^^^
 9 |
10 | app = FastAPI()
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `psycopg2`
 --> docs/tutorial/code/fastapi/visitors_migrate.py:5:8
  |
3 | import os
4 |
5 | import psycopg2
  |        ^^^^^^^^
6 |
7 | DATABASE_URI = os.environ["POSTGRESQL_DB_CONNECT_STRING"]
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `flask`
 --> docs/tutorial/code/flask/app.py:3:8
  |
1 | # initial hello world Flask app
2 |
3 | import flask
  |        ^^^^^
4 |
5 | app = flask.Flask(__name__)
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `flask`
 --> docs/tutorial/code/flask/greeting_app.py:3:8
  |
1 | # Flask app with a greeting configuration
2 |
3 | import flask
  |        ^^^^^
4 |
5 | app = flask.Flask(__name__)
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `flask`
 --> docs/tutorial/code/flask/visitors_app.py:6:8
  |
4 | import os
5 |
6 | import flask
  |        ^^^^^
7 | import psycopg2
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `psycopg2`
 --> docs/tutorial/code/flask/visitors_app.py:7:8
  |
6 | import flask
7 | import psycopg2
  |        ^^^^^^^^
8 |
9 | app = flask.Flask(__name__)
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `psycopg2`
 --> docs/tutorial/code/flask/visitors_migrate.py:5:8
  |
3 | import os
4 |
5 | import psycopg2
  |        ^^^^^^^^
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `list[ResponseCharmResourceBase]`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `datetime`, and 2 more union elements, are not assignable to `list[ResponseCharmResourceBase]`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `datetime`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `datetime`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `str`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `str`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `int`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `int`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `str`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `str`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `str`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `str`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `str`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `str`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `str`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `str`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `ByteSize`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 3 more union elements, are not assignable to `ByteSize`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `str`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `str`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `datetime | None`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `datetime | None`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `str | None`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `str | None`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
    --> tests/commands/test_store_api.py:1628:13
     |
1626 |     expected = {
1627 |         (test_lib_id, test_api): Library(
1628 |             api=test_api,
     |             ^^^^^^^^^^^^ Expected `int`, found `Literal["test-api-version"]`
1629 |             content=test_content,
1630 |             content_hash=test_hash,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
    --> tests/commands/test_store_api.py:1634:13
     |
1632 |             lib_name=test_lib_name,
1633 |             charm_name=test_charm_name,
1634 |             patch=test_patch,
     |             ^^^^^^^^^^^^^^^^ Expected `int`, found `Literal["test-patch-version"]`
1635 |         ),
1636 |     }
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
    --> tests/commands/test_store_api.py:1718:13
     |
1716 |     expected = {
1717 |         (test_lib_id_1, test_api_1): Library(
1718 |             api=test_api_1,
     |             ^^^^^^^^^^^^^^ Expected `int`, found `Literal["test-api-version-1"]`
1719 |             content=test_content_1,
1720 |             content_hash=test_hash_1,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
    --> tests/commands/test_store_api.py:1724:13
     |
1722 |             lib_name=test_lib_name_1,
1723 |             charm_name=test_charm_name_1,
1724 |             patch=test_patch_1,
     |             ^^^^^^^^^^^^^^^^^^ Expected `int`, found `Literal["test-patch-version-1"]`
1725 |         ),
1726 |         (test_lib_id_2, test_api_2): Library(
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
    --> tests/commands/test_store_api.py:1727:13
     |
1725 |         ),
1726 |         (test_lib_id_2, test_api_2): Library(
1727 |             api=test_api_2,
     |             ^^^^^^^^^^^^^^ Expected `int`, found `Literal["test-api-version-2"]`
1728 |             content=test_content_2,
1729 |             content_hash=test_hash_2,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
    --> tests/commands/test_store_api.py:1733:13
     |
1731 |             lib_name=test_lib_name_2,
1732 |             charm_name=test_charm_name_2,
1733 |             patch=test_patch_2,
     |             ^^^^^^^^^^^^^^^^^^ Expected `int`, found `Literal["test-patch-version-2"]`
1734 |         ),
1735 |     }
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-method-override]: Invalid override of method `json`
   --> tests/commands/test_store_client.py:77:9
    |
 75 |           return self.status_code == 200
 76 |
 77 |       def json(self):
    |           ^^^^^^^^^^ Definition is incompatible with `Response.json`
 78 |           try:
 79 |               return json.loads(self._content)  # type: ignore
    |
   ::: .venv/lib/python3.12/site-packages/requests-stubs/models.pyi:155:9
    |
153 |       @property
154 |       def text(self) -> str: ...
155 |       def json(
    |  _________-
156 | |         self,
157 | |         *,
158 | |         cls: type[JSONDecoder] | None = ...,
159 | |         object_hook: Callable[[dict[Any, Any]], Any] | None = ...,
160 | |         parse_float: Callable[[str], Any] | None = ...,
161 | |         parse_int: Callable[[str], Any] | None = ...,
162 | |         parse_constant: Callable[[str], Any] | None = ...,
163 | |         object_pairs_hook: Callable[[list[tuple[Any, Any]]], Any] | None = ...,
164 | |         **kwds: Any,
165 | |     ) -> Any: ...
    | |____________- `Response.json` defined here
166 |       @property
167 |       def links(self) -> dict[Incomplete, Incomplete]: ...
    |
info: This violates the Liskov Substitution Principle
info: rule `invalid-method-override` is enabled by default

error[missing-argument]: No argument provided for required parameter `cls`
   --> tests/conftest.py:146:14
    |
145 |     if request.param == "bases":
146 |         with pytest.MonkeyPatch.context() as monkeypatch:
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
147 |             # Add the current system to legacy bases so we can test legacy bases.
148 |             monkeypatch.setattr(const, "LEGACY_BASES", (*const.LEGACY_BASES, base_str))
    |
info: Union variant `(cls) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((cls) -> _GeneratorContextManager[Unknown, None, None]) | ((cls) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `missing-argument` is enabled by default

error[missing-argument]: No argument provided for required parameter `cls`
   --> tests/conftest.py:146:14
    |
145 |     if request.param == "bases":
146 |         with pytest.MonkeyPatch.context() as monkeypatch:
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
147 |             # Add the current system to legacy bases so we can test legacy bases.
148 |             monkeypatch.setattr(const, "LEGACY_BASES", (*const.LEGACY_BASES, base_str))
    |
info: Union variant `(cls) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((cls) -> _GeneratorContextManager[Unknown, None, None]) | ((cls) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `missing-argument` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/conftest.py:226:9
    |
224 |         build_base=craft_platforms.DistroBase("ubuntu", "22.04"),
225 |         build_on=arch,
226 |         build_for="arm64",
    |         ^^^^^^^^^^^^^^^^^ Expected `DebianArchitecture | Literal["all"]`, found `Literal["arm64"]`
227 |         platform="distro-1-test64",
228 |     )
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-method-override]: Invalid override of method `get_supported_bases`
  --> tests/extensions/test_extensions.py:33:9
   |
32 |     @classmethod
33 |     def get_supported_bases(cls) -> list[tuple[str, ...]]:
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Definition is incompatible with `Extension.get_supported_bases`
34 |         """Return a list of tuple of supported bases."""
35 |         return cls.bases
   |
  ::: charmcraft/extensions/extension.py:52:9
   |
50 |     @staticmethod
51 |     @abc.abstractmethod
52 |     def get_supported_bases() -> list[tuple[str, str]]:
   |         ---------------------------------------------- `Extension.get_supported_bases` defined here
53 |         """Return a list of tuple of supported bases."""
   |
info: `FakeExtension.get_supported_bases` is a classmethod but `Extension.get_supported_bases` is a staticmethod
info: This violates the Liskov Substitution Principle
info: rule `invalid-method-override` is enabled by default

error[invalid-method-override]: Invalid override of method `is_experimental`
  --> tests/extensions/test_extensions.py:38:9
   |
37 |     @staticmethod
38 |     def is_experimental(_base: tuple[str, ...] | None) -> bool:
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Definition is incompatible with `Extension.is_experimental`
39 |         """Return whether or not this extension is unstable for given base."""
40 |         return False
   |
  ::: charmcraft/extensions/extension.py:57:9
   |
55 |     @staticmethod
56 |     @abc.abstractmethod
57 |     def is_experimental(base: tuple[str, str] | None) -> bool:
   |         ----------------------------------------------------- `Extension.is_experimental` defined here
58 |         """Return whether or not this extension is unstable for given base."""
   |
info: This violates the Liskov Substitution Principle
info: rule `invalid-method-override` is enabled by default

error[invalid-method-override]: Invalid override of method `is_experimental`
  --> tests/extensions/test_extensions.py:62:9
   |
61 |     @staticmethod
62 |     def is_experimental(_base: str | None) -> bool:
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Definition is incompatible with `FakeExtension.is_experimental`
63 |         return True
   |
  ::: tests/extensions/test_extensions.py:38:9
   |
37 |     @staticmethod
38 |     def is_experimental(_base: tuple[str, ...] | None) -> bool:
   |         ------------------------------------------------------ `FakeExtension.is_experimental` defined here
39 |         """Return whether or not this extension is unstable for given base."""
40 |         return False
   |
info: This violates the Liskov Substitution Principle
info: rule `invalid-method-override` is enabled by default

error[invalid-method-override]: Invalid override of method `is_experimental`
  --> tests/extensions/test_registry.py:34:9
   |
33 |     @staticmethod
34 |     def is_experimental(_base: tuple[str, str] | None) -> bool:
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Definition is incompatible with `Extension.is_experimental`
35 |         return False
   |
  ::: charmcraft/extensions/extension.py:57:9
   |
55 |     @staticmethod
56 |     @abc.abstractmethod
57 |     def is_experimental(base: tuple[str, str] | None) -> bool:
   |         ----------------------------------------------------- `Extension.is_experimental` defined here
58 |         """Return whether or not this extension is unstable for given base."""
   |
info: This violates the Liskov Substitution Principle
info: rule `invalid-method-override` is enabled by default

warning[possibly-missing-attribute]: Submodule `application` may not be available as an attribute on module `charmcraft`
  --> tests/integration/commands/test_init.py:75:17
   |
73 | def init_command():
74 |     return init.InitCommand(
75 |         {"app": charmcraft.application.APP_METADATA, "services": None}
   |                 ^^^^^^^^^^^^^^^^^^^^^^
76 |     )
   |
help: Consider explicitly importing `charmcraft.application`
info: rule `possibly-missing-attribute` is enabled by default

error[unresolved-attribute]: Object of type `RecordingEmitter` has no attribute `assert_json_output`
   --> tests/integration/commands/test_store_commands.py:225:9
    |
223 |             },
224 |         ]
225 |         emitter.assert_json_output(  # pyright: ignore[reportAttributeAccessIssue]
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^
226 |             expected
227 |         )
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Unresolved attribute `client` on type `AppService`.
  --> tests/integration/conftest.py:45:5
   |
43 |     services.register_services()
44 |     factory = craft_application.ServiceFactory(app=application.APP_METADATA)
45 |     factory.get("store").client = mock.Mock(spec_set=craft_store.StoreClient)  # pyright: ignore[reportAttributeAccessIssue]
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
46 |     factory.update_kwargs(
47 |         "charm_libs",
   |
info: rule `unresolved-attribute` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
  --> tests/integration/services/test_image.py:28:9
   |
26 |     service = ImageService(
27 |         app=application.APP_METADATA,
28 |         services=None,  # pyright: ignore[reportArgumentType]
   |         ^^^^^^^^^^^^^ Expected `ServiceFactory`, found `None`
29 |     )
30 |     service.setup()
   |
info: Method defined here
  --> .venv/lib/python3.12/site-packages/craft_application/services/base.py:44:9
   |
42 |     """
43 |
44 |     def __init__(self, app: AppMetadata, services: ServiceFactory) -> None:
   |         ^^^^^^^^                         ------------------------ Parameter declared here
45 |         self._app = app
46 |         self._services = services
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/integration/services/test_lifecycle.py:40:17
   |
38 |                 platform="something",
39 |                 build_on=craft_platforms.DebianArchitecture.from_host(),
40 |                 build_for="invalid",  # pyright: ignore[reportArgumentType]
   |                 ^^^^^^^^^^^^^^^^^^^ Expected `DebianArchitecture | Literal["all"]`, found `Literal["invalid"]`
41 |                 build_base=craft_platforms.DistroBase(distro.id(), distro.version()),
42 |             )
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/integration/services/test_lifecycle.py:88:17
   |
86 |                 platform="something",
87 |                 build_on=host_arch,
88 |                 build_for=f"{foreign_arch}-{host_arch}",  # pyright: ignore[reportArgumentType]
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `DebianArchitecture | Literal["all"]`, found `str`
89 |                 build_base=craft_platforms.DistroBase(distro.id(), distro.version()),
90 |             )
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/integration/services/test_provider.py:56:28
   |
54 |     assert not lock_file.exists()
55 |
56 |     with provider.instance(**provider_kwargs):
   |                            ^^^^^^^^^^^^^^^^^ Expected `BuildInfo`, found `Unknown | BuildInfo | Path`
57 |         # Test that the cache lock gets created
58 |         assert lock_file.is_file()
   |
info: Element `Path` of this union is not assignable to `BuildInfo`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/integration/services/test_provider.py:56:28
   |
54 |     assert not lock_file.exists()
55 |
56 |     with provider.instance(**provider_kwargs):
   |                            ^^^^^^^^^^^^^^^^^ Expected `Path`, found `Unknown | BuildInfo | Path`
57 |         # Test that the cache lock gets created
58 |         assert lock_file.is_file()
   |
info: Element `BuildInfo` of this union is not assignable to `Path`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/integration/services/test_provider.py:56:28
   |
54 |     assert not lock_file.exists()
55 |
56 |     with provider.instance(**provider_kwargs):
   |                            ^^^^^^^^^^^^^^^^^ Expected `bool`, found `Unknown | BuildInfo | Path`
57 |         # Test that the cache lock gets created
58 |         assert lock_file.is_file()
   |
info: Union elements `BuildInfo` and `Path` are not assignable to `bool`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/integration/services/test_provider.py:56:28
   |
54 |     assert not lock_file.exists()
55 |
56 |     with provider.instance(**provider_kwargs):
   |                            ^^^^^^^^^^^^^^^^^ Expected `bool`, found `Unknown | BuildInfo | Path`
57 |         # Test that the cache lock gets created
58 |         assert lock_file.is_file()
   |
info: Union elements `BuildInfo` and `Path` are not assignable to `bool`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/integration/services/test_provider.py:56:28
   |
54 |     assert not lock_file.exists()
55 |
56 |     with provider.instance(**provider_kwargs):
   |                            ^^^^^^^^^^^^^^^^^ Expected `bool`, found `Unknown | BuildInfo | Path`
57 |         # Test that the cache lock gets created
58 |         assert lock_file.is_file()
   |
info: Union elements `BuildInfo` and `Path` are not assignable to `bool`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/integration/services/test_provider.py:56:28
   |
54 |     assert not lock_file.exists()
55 |
56 |     with provider.instance(**provider_kwargs):
   |                            ^^^^^^^^^^^^^^^^^ Expected `str | None`, found `Unknown | BuildInfo | Path`
57 |         # Test that the cache lock gets created
58 |         assert lock_file.is_file()
   |
info: Union elements `BuildInfo` and `Path` are not assignable to `str | None`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/integration/services/test_provider.py:56:28
   |
54 |     assert not lock_file.exists()
55 |
56 |     with provider.instance(**provider_kwargs):
   |                            ^^^^^^^^^^^^^^^^^ Expected `((Executor, /) -> None) | None`, found `Unknown | BuildInfo | Path`
57 |         # Test that the cache lock gets created
58 |         assert lock_file.is_file()
   |
info: Union elements `BuildInfo` and `Path` are not assignable to `((Executor, /) -> None) | None`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/integration/services/test_provider.py:56:28
   |
54 |     assert not lock_file.exists()
55 |
56 |     with provider.instance(**provider_kwargs):
   |                            ^^^^^^^^^^^^^^^^^ Expected `bool | str | None`, found `Unknown | BuildInfo | Path`
57 |         # Test that the cache lock gets created
58 |         assert lock_file.is_file()
   |
info: Union elements `BuildInfo` and `Path` are not assignable to `bool | str | None`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:101:28
    |
 99 |     }
100 |
101 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `BuildInfo`, found `Unknown | BuildInfo | Path`
102 |         # Create a file in the cache and ensure it's not visible in the outer fs
103 |         instance.execute_run(["touch", "/root/.cache/cache_cached"])
    |
info: Element `Path` of this union is not assignable to `BuildInfo`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:101:28
    |
 99 |     }
100 |
101 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `Path`, found `Unknown | BuildInfo | Path`
102 |         # Create a file in the cache and ensure it's not visible in the outer fs
103 |         instance.execute_run(["touch", "/root/.cache/cache_cached"])
    |
info: Element `BuildInfo` of this union is not assignable to `Path`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:101:28
    |
 99 |     }
100 |
101 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `bool`, found `Unknown | BuildInfo | Path`
102 |         # Create a file in the cache and ensure it's not visible in the outer fs
103 |         instance.execute_run(["touch", "/root/.cache/cache_cached"])
    |
info: Union elements `BuildInfo` and `Path` are not assignable to `bool`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:101:28
    |
 99 |     }
100 |
101 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `bool`, found `Unknown | BuildInfo | Path`
102 |         # Create a file in the cache and ensure it's not visible in the outer fs
103 |         instance.execute_run(["touch", "/root/.cache/cache_cached"])
    |
info: Union elements `BuildInfo` and `Path` are not assignable to `bool`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:101:28
    |
 99 |     }
100 |
101 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `bool`, found `Unknown | BuildInfo | Path`
102 |         # Create a file in the cache and ensure it's not visible in the outer fs
103 |         instance.execute_run(["touch", "/root/.cache/cache_cached"])
    |
info: Union elements `BuildInfo` and `Path` are not assignable to `bool`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:101:28
    |
 99 |     }
100 |
101 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `str | None`, found `Unknown | BuildInfo | Path`
102 |         # Create a file in the cache and ensure it's not visible in the outer fs
103 |         instance.execute_run(["touch", "/root/.cache/cache_cached"])
    |
info: Union elements `BuildInfo` and `Path` are not assignable to `str | None`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:101:28
    |
 99 |     }
100 |
101 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `((Executor, /) -> None) | None`, found `Unknown | BuildInfo | Path`
102 |         # Create a file in the cache and ensure it's not visible in the outer fs
103 |         instance.execute_run(["touch", "/root/.cache/cache_cached"])
    |
info: Union elements `BuildInfo` and `Path` are not assignable to `((Executor, /) -> None) | None`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:101:28
    |
 99 |     }
100 |
101 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `bool | str | None`, found `Unknown | BuildInfo | Path`
102 |         # Create a file in the cache and ensure it's not visible in the outer fs
103 |         instance.execute_run(["touch", "/root/.cache/cache_cached"])
    |
info: Union elements `BuildInfo` and `Path` are not assignable to `bool | str | None`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:134:28
    |
132 |         "cache_path": cache_path,
133 |     }
134 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `BuildInfo`, found `Unknown | BuildInfo | Path`
135 |         instance.execute_run(["test", "-d", "/root/.cache"], check=True)
136 |         instance.execute_run(
    |
info: Element `Path` of this union is not assignable to `BuildInfo`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:134:28
    |
132 |         "cache_path": cache_path,
133 |     }
134 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `Path`, found `Unknown | BuildInfo | Path`
135 |         instance.execute_run(["test", "-d", "/root/.cache"], check=True)
136 |         instance.execute_run(
    |
info: Element `BuildInfo` of this union is not assignable to `Path`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:134:28
    |
132 |         "cache_path": cache_path,
133 |     }
134 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `bool`, found `Unknown | BuildInfo | Path`
135 |         instance.execute_run(["test", "-d", "/root/.cache"], check=True)
136 |         instance.execute_run(
    |
info: Union elements `BuildInfo` and `Path` are not assignable to `bool`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:134:28
    |
132 |         "cache_path": cache_path,
133 |     }
134 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `bool`, found `Unknown | BuildInfo | Path`
135 |         instance.execute_run(["test", "-d", "/root/.cache"], check=True)
136 |         instance.execute_run(
    |
info: Union elements `BuildInfo` and `Path` are not assignable to `bool`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:134:28
    |
132 |         "cache_path": cache_path,
133 |     }
134 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `bool`, found `Unknown | BuildInfo | Path`
135 |         instance.execute_run(["test", "-d", "/root/.cache"], check=True)
136 |         instance.execute_run(
    |
info: Union elements `BuildInfo` and `Path` are not assignable to `bool`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:134:28
    |
132 |         "cache_path": cache_path,
133 |     }
134 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `str | None`, found `Unknown | BuildInfo | Path`
135 |         instance.execute_run(["test", "-d", "/root/.cache"], check=True)
136 |         instance.execute_run(
    |
info: Union elements `BuildInfo` and `Path` are not assignable to `str | None`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:134:28
    |
132 |         "cache_path": cache_path,
133 |     }
134 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `((Executor, /) -> None) | None`, found `Unknown | BuildInfo | Path`
135 |         instance.execute_run(["test", "-d", "/root/.cache"], check=True)
136 |         instance.execute_run(
    |
info: Union elements `BuildInfo` and `Path` are not assignable to `((Executor, /) -> None) | None`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:134:28
    |
132 |         "cache_path": cache_path,
133 |     }
134 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `bool | str | None`, found `Unknown | BuildInfo | Path`
135 |         instance.execute_run(["test", "-d", "/root/.cache"], check=True)
136 |         instance.execute_run(
    |
info: Union elements `BuildInfo` and `Path` are not assignable to `bool | str | None`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[unresolved-import]: Cannot resolve imported module `charm`
  --> tests/spread/commands/init-extensions/tests/unit/test_charm.py:9:8
   |
 7 | import pathlib
 8 |
 9 | import charm
   |        ^^^^^
10 | import scenario
11 | import scenario.errors
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `scenario`
  --> tests/spread/commands/init-extensions/tests/unit/test_charm.py:10:8
   |
 9 | import charm
10 | import scenario
   |        ^^^^^^^^
11 | import scenario.errors
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `scenario.errors`
  --> tests/spread/commands/init-extensions/tests/unit/test_charm.py:11:8
   |
 9 | import charm
10 | import scenario
11 | import scenario.errors
   |        ^^^^^^^^^^^^^^^
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/dependencies/setuptools-scm-python/src/charm.py:9:8
   |
 7 | import logging
 8 |
 9 | import ops
   |        ^^^
10 |
11 | # A standalone module for workload-specific logic (no charming concerns):
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `setuptools_scm_python`
  --> tests/spread/dependencies/setuptools-scm-python/src/charm.py:12:8
   |
11 | # A standalone module for workload-specific logic (no charming concerns):
12 | import setuptools_scm_python
   |        ^^^^^^^^^^^^^^^^^^^^^
13 |
14 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/dependencies/strict-dependencies-errors/extra-binary-packages/src/charm.py:17:8
   |
15 | import logging
16 |
17 | import ops
   |        ^^^
18 |
19 | # Log messages can be retrieved using juju debug-log
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/dependencies/strict-dependencies-errors/extra-packages/src/charm.py:17:8
   |
15 | import logging
16 |
17 | import ops
   |        ^^^
18 |
19 | # Log messages can be retrieved using juju debug-log
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/dependencies/strict-dependencies-errors/missing-packages/src/charm.py:17:8
   |
15 | import logging
16 |
17 | import ops
   |        ^^^
18 |
19 | # Log messages can be retrieved using juju debug-log
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/dependencies/strict-dependencies-errors/no-requirements/src/charm.py:17:8
   |
15 | import logging
16 |
17 | import ops
   |        ^^^
18 |
19 | # Log messages can be retrieved using juju debug-log
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/dependencies/strict-dependencies/charm/src/charm.py:17:8
   |
15 | import logging
16 |
17 | import ops
   |        ^^^
18 |
19 | # Log messages can be retrieved using juju debug-log
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `charms.reactive`
 --> tests/spread/smoketests/reactive/reactivecharm/reactive/reactivecharm.py:1:6
  |
1 | from charms.reactive import set_flag, when_not
  |      ^^^^^^^^^^^^^^^
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/ubuntu-20.04/charm/bases/src/charm.py:18:8
   |
16 | from typing import cast
17 |
18 | import ops
   |        ^^^
19 |
20 | # Log messages can be retrieved using juju debug-log
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/ubuntu-20.04/charm/platforms/src/charm.py:9:8
   |
 7 | import logging
 8 |
 9 | import ops
   |        ^^^
10 |
11 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/ubuntu-22.04/charm/bases/src/charm.py:18:8
   |
16 | from typing import cast
17 |
18 | import ops
   |        ^^^
19 |
20 | # Log messages can be retrieved using juju debug-log
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/ubuntu-22.04/charm/platforms/src/charm.py:9:8
   |
 7 | import logging
 8 |
 9 | import ops
   |        ^^^
10 |
11 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/ubuntu-24.04/charm/platforms/src/charm.py:9:8
   |
 7 | import logging
 8 |
 9 | import ops
   |        ^^^
10 |
11 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
 --> tests/spread/ubuntu-24.04/test-cmd/src/charm.py:6:8
  |
4 | import logging
5 |
6 | import ops
  |        ^^^
7 |
8 | # A standalone module for workload-specific logic (no charming concerns):
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `test_cmd`
  --> tests/spread/ubuntu-24.04/test-cmd/src/charm.py:9:8
   |
 8 | # A standalone module for workload-specific logic (no charming concerns):
 9 | import test_cmd
   |        ^^^^^^^^
10 |
11 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `pytest_operator.plugin`
 --> tests/spread/ubuntu-24.04/test-cmd/tests/integration/test_charm.py:7:6
  |
5 | import pytest
6 | import yaml
7 | from pytest_operator.plugin import OpsTest
  |      ^^^^^^^^^^^^^^^^^^^^^^
8 |
9 | logger = logging.getLogger(__name__)
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
 --> tests/spread/ubuntu-24.04/test-cmd/tests/unit/test_charm.py:2:6
  |
1 | import pytest
2 | from ops import testing
  |      ^^^
3 |
4 | from charm import TestCmdCharm
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `charm`
 --> tests/spread/ubuntu-24.04/test-cmd/tests/unit/test_charm.py:4:6
  |
2 | from ops import testing
3 |
4 | from charm import TestCmdCharm
  |      ^^^^^
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/ubuntu-25.10/charm/platforms/src/charm.py:9:8
   |
 7 | import logging
 8 |
 9 | import ops
   |        ^^^
10 |
11 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
 --> tests/spread/ubuntu-25.10/test-cmd/src/charm.py:6:8
  |
4 | import logging
5 |
6 | import ops
  |        ^^^
7 |
8 | # A standalone module for workload-specific logic (no charming concerns):
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `test_cmd`
  --> tests/spread/ubuntu-25.10/test-cmd/src/charm.py:9:8
   |
 8 | # A standalone module for workload-specific logic (no charming concerns):
 9 | import test_cmd
   |        ^^^^^^^^
10 |
11 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `pytest_operator.plugin`
 --> tests/spread/ubuntu-25.10/test-cmd/tests/integration/test_charm.py:7:6
  |
5 | import pytest
6 | import yaml
7 | from pytest_operator.plugin import OpsTest
  |      ^^^^^^^^^^^^^^^^^^^^^^
8 |
9 | logger = logging.getLogger(__name__)
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
 --> tests/spread/ubuntu-25.10/test-cmd/tests/unit/test_charm.py:2:6
  |
1 | import pytest
2 | from ops import testing
  |      ^^^
3 |
4 | from charm import TestCmdCharm
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `charm`
 --> tests/spread/ubuntu-25.10/test-cmd/tests/unit/test_charm.py:4:6
  |
2 | from ops import testing
3 |
4 | from charm import TestCmdCharm
  |      ^^^^^
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/ubuntu-26.04/charm/platforms/src/charm.py:9:8
   |
 7 | import logging
 8 |
 9 | import ops
   |        ^^^
10 |
11 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
 --> tests/spread/ubuntu-26.04/test-cmd/src/charm.py:6:8
  |
4 | import logging
5 |
6 | import ops
  |        ^^^
7 |
8 | # A standalone module for workload-specific logic (no charming concerns):
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `test_cmd`
  --> tests/spread/ubuntu-26.04/test-cmd/src/charm.py:9:8
   |
 8 | # A standalone module for workload-specific logic (no charming concerns):
 9 | import test_cmd
   |        ^^^^^^^^
10 |
11 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `pytest_operator.plugin`
 --> tests/spread/ubuntu-26.04/test-cmd/tests/integration/test_charm.py:7:6
  |
5 | import pytest
6 | import yaml
7 | from pytest_operator.plugin import OpsTest
  |      ^^^^^^^^^^^^^^^^^^^^^^
8 |
9 | logger = logging.getLogger(__name__)
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
 --> tests/spread/ubuntu-26.04/test-cmd/tests/unit/test_charm.py:2:6
  |
1 | import pytest
2 | from ops import testing
  |      ^^^
3 |
4 | from charm import TestCmdCharm
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `charm`
 --> tests/spread/ubuntu-26.04/test-cmd/tests/unit/test_charm.py:4:6
  |
2 | from ops import testing
3 |
4 | from charm import TestCmdCharm
  |      ^^^^^
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
   --> tests/test_instrum.py:256:32
    |
254 |     assert measurements.measurements == {}
255 |
256 |     with Timer("test message", foo=42):
    |                                ^^^^^^ Expected `dict[str, Any]`, found `Literal[42]`
257 |         pass
    |
info: Method defined here
   --> charmcraft/instrum.py:129:9
    |
127 |     """
128 |
129 |     def __init__(self, msg: str, **extra_info: dict[str, Any]):
    |         ^^^^^^^^                 ---------------------------- Parameter declared here
130 |         self.msg = msg
131 |         self.extra_info = extra_info
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
   --> tests/test_instrum.py:274:28
    |
272 |     monkeypatch.setattr(instrum, "_measurements", measurements)
273 |
274 |     @Timer("test message", foo=42)
    |                            ^^^^^^ Expected `dict[str, Any]`, found `Literal[42]`
275 |     def test_function(a, b):
276 |         assert a == 17
    |
info: Method defined here
   --> charmcraft/instrum.py:129:9
    |
127 |     """
128 |
129 |     def __init__(self, msg: str, **extra_info: dict[str, Any]):
    |         ^^^^^^^^                 ---------------------------- Parameter declared here
130 |         self.msg = msg
131 |         self.extra_info = extra_info
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
   --> tests/test_instrum.py:298:32
    |
296 |     assert measurements.measurements == {}
297 |
298 |     with Timer("test message", foo=42) as timer:
    |                                ^^^^^^ Expected `dict[str, Any]`, found `Literal[42]`
299 |         timer.mark("middle 1")
300 |         timer.mark("middle 2")
    |
info: Method defined here
   --> charmcraft/instrum.py:129:9
    |
127 |     """
128 |
129 |     def __init__(self, msg: str, **extra_info: dict[str, Any]):
    |         ^^^^^^^^                 ---------------------------- Parameter declared here
130 |         self.msg = msg
131 |         self.extra_info = extra_info
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-assignment]: Implicit shadowing of function `write`
  --> tests/unit/commands/test_lifecycle.py:91:5
   |
90 |     libs_service = cast("CharmLibsService", service_factory.get("charm_libs"))
91 |     libs_service.write = mock.Mock(wraps=libs_service.write)
   |     ^^^^^^^^^^^^^^^^^^
92 |
93 |     pack._update_charm_libs()
   |
info: Annotate to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[unresolved-attribute]: Object of type `bound method CharmLibsService.write(library: Library) -> None` has no attribute `assert_called_once_with`
  --> tests/unit/commands/test_lifecycle.py:95:5
   |
93 |     pack._update_charm_libs()
94 |
95 |     libs_service.write.assert_called_once_with(store_lib)
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
96 |
97 |     with check():
   |
info: rule `unresolved-attribute` is enabled by default

error[non-subscriptable]: Cannot subscript object of type `None` with no `__getitem__` method
  --> tests/unit/models/test_config.py:75:23
   |
73 |     config = JujuConfig(options={"my-opt": option})
74 |
75 |     assert isinstance(config.options["my-opt"], type_)
   |                       ^^^^^^^^^^^^^^^^^^^^^^^^
   |
info: rule `non-subscriptable` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/unit/models/test_project.py:812:13
    |
810 |             description="",
811 |             base=base,
812 |             platforms={"amd64": None},
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `PlatformsDict`, found `dict[Unknown | str, Unknown | None]`
813 |             parts={"charm": {"plugin": "charm"}},
814 |         )
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `__new__` is incorrect
  --> tests/unit/parts/plugins/test_charm.py:97:22
   |
96 |     pip_constraint_file = (
97 |         pathlib.Path(parts.plugins.__file__).parent / "charm-constraints.txt"
   |                      ^^^^^^^^^^^^^^^^^^^^^^ Expected `str | PathLike[str]`, found `str | None`
98 |     )
   |
info: Element `None` of this union is not assignable to `str | PathLike[str]`
info: Function defined here
   --> stdlib/pathlib/__init__.pyi:299:13
    |
297 |         def __new__(cls, *args: StrPath, **kwargs: Unused) -> Self: ...  # pyright: ignore[reportInconsistentConstructor]
298 |     else:
299 |         def __new__(cls, *args: StrPath, **kwargs: Unused) -> Self: ...
    |             ^^^^^^^      -------------- Parameter declared here
300 |
301 |     @classmethod
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-assignment]: Implicit shadowing of function `_get_pip`
  --> tests/unit/parts/plugins/test_poetry.py:40:5
   |
39 | def test_get_pip_install_commands(poetry_plugin: plugins.PoetryPlugin):
40 |     poetry_plugin._get_pip = lambda: "/python -m pip"
   |     ^^^^^^^^^^^^^^^^^^^^^^
41 |
42 |     assert poetry_plugin._get_pip_install_commands(
   |
info: Annotate to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Implicit shadowing of function `_get_pip`
  --> tests/unit/parts/plugins/test_python.py:62:5
   |
60 |     }
61 |     python_plugin._options = plugins.PythonPluginProperties.unmarshal(spec)
62 |     python_plugin._get_pip = lambda: "/python -m pip"
   |     ^^^^^^^^^^^^^^^^^^^^^^
63 |     copy_src_cmd = (
64 |         f"cp --archive --recursive --reflink=auto {build_path}/src {install_path}"
   |
info: Annotate to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
   --> tests/unit/services/test_analysis.py:112:67
    |
110 | @pytest.fixture
111 | def analysis_service():
112 |     return analysis.AnalysisService(app=application.APP_METADATA, services=None)
    |                                                                   ^^^^^^^^^^^^^ Expected `ServiceFactory`, found `None`
    |
info: Method defined here
  --> charmcraft/services/analysis.py:37:9
   |
35 |     _project: models.CharmcraftProject  # type: ignore[assignment]
36 |
37 |     def __init__(  # (too many arguments)
   |         ^^^^^^^^
38 |         self,
39 |         app: craft_application.AppMetadata,
40 |         services: craft_application.ServiceFactory,
   |         ------------------------------------------ Parameter declared here
41 |     ) -> None:
42 |         super().__init__(app, services)
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/unit/services/test_lifecycle.py:55:17
   |
53 |                 platform="something",
54 |                 build_on=HOST_ARCH,
55 |                 build_for=plan_build_for,  # pyright: ignore[reportArgumentType]
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^ Expected `DebianArchitecture | Literal["all"]`, found `str`
56 |             )
57 |         ]
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/unit/services/test_lifecycle.py:94:17
   |
92 |                 platform="something",
93 |                 build_on=HOST_ARCH,
94 |                 build_for=f"{HOST_ARCH}-foreign",  # pyright: ignore[reportArgumentType]
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `DebianArchitecture | Literal["all"]`, found `str`
95 |             )
96 |         ]
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
  --> tests/unit/services/test_project.py:34:45
   |
32 | @pytest.fixture
33 | def service(project_path):
34 |     return ProjectService(app=APP_METADATA, services=None, project_dir=project_path)
   |                                             ^^^^^^^^^^^^^ Expected `ServiceFactory`, found `None`
   |
info: Method defined here
  --> .venv/lib/python3.12/site-packages/craft_application/services/project.py:57:9
   |
55 |     _project_model: models.Project | None
56 |
57 |     def __init__(
   |         ^^^^^^^^
58 |         self, app: AppMetadata, services: ServiceFactory, *, project_dir: pathlib.Path
   |                                 ------------------------ Parameter declared here
59 |     ) -> None:
60 |         super().__init__(app, services)
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
   --> tests/unit/services/test_provider.py:123:9
    |
121 |     provider_service = ProviderService(
122 |         app=APP_METADATA,
123 |         services=None,  # pyright: ignore[reportArgumentType]
    |         ^^^^^^^^^^^^^ Expected `ServiceFactory`, found `None`
124 |         work_dir=tmp_path,
125 |     )
    |
info: Method defined here
  --> charmcraft/services/provider.py:43:9
   |
41 |     """Business logic for getting providers."""
42 |
43 |     def __init__(
   |         ^^^^^^^^
44 |         self,
45 |         app: craft_application.AppMetadata,
46 |         services: craft_application.ServiceFactory,
   |         ------------------------------------------ Parameter declared here
47 |         *,
48 |         work_dir: pathlib.Path,
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
  --> tests/unit/services/test_store.py:50:56
   |
48 | @pytest.fixture(scope="module")
49 | def reusable_store():
50 |     store = StoreService(app=application.APP_METADATA, services=None)
   |                                                        ^^^^^^^^^^^^^ Expected `ServiceFactory`, found `None`
51 |     store.client = mock.Mock(spec_set=craft_store.StoreClient)
52 |     store._publisher = mock.Mock(spec_set=craft_store.PublisherGateway)
   |
info: Method defined here
  --> .venv/lib/python3.12/site-packages/craft_application/services/base.py:44:9
   |
42 |     """
43 |
44 |     def __init__(self, app: AppMetadata, services: ServiceFactory) -> None:
   |         ^^^^^^^^                         ------------------------ Parameter declared here
45 |         self._app = app
46 |         self._services = services
   |
info: rule `invalid-argument-type` is enabled by default

warning[possibly-missing-attribute]: Attribute `group` may be missing on object of type `Match[str] | None`
  --> tests/unit/test_linters.py:43:12
   |
41 | )
42 | def test_fuzz_python_name_regex(name, next_char, further_garbage):
43 |     assert linters.PYTHON_NAME_REGEX.match(name).group(0) == name
   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
44 |     assert linters.PYTHON_NAME_REGEX.match(f"{name}{next_char}").group(0) == name
45 |     assert (
   |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `group` may be missing on object of type `Match[str] | None`
  --> tests/unit/test_linters.py:44:12
   |
42 | def test_fuzz_python_name_regex(name, next_char, further_garbage):
43 |     assert linters.PYTHON_NAME_REGEX.match(name).group(0) == name
44 |     assert linters.PYTHON_NAME_REGEX.match(f"{name}{next_char}").group(0) == name
   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
45 |     assert (
46 |         linters.PYTHON_NAME_REGEX.match(f"{name}{next_char}{further_garbage}").group(0)
   |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `group` may be missing on object of type `Match[str] | None`
  --> tests/unit/test_linters.py:46:9
   |
44 |     assert linters.PYTHON_NAME_REGEX.match(f"{name}{next_char}").group(0) == name
45 |     assert (
46 |         linters.PYTHON_NAME_REGEX.match(f"{name}{next_char}{further_garbage}").group(0)
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
47 |         == name
48 |     )
   |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `group` may be missing on object of type `Match[str] | None`
  --> tests/unit/test_linters.py:62:12
   |
60 | )
61 | def test_min_version_regex_matches(string, expected):
62 |     assert linters.MIN_VERSION_REGEX.search(string).group(1) == expected
   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `group` may be missing on object of type `Match[str] | None`
  --> tests/unit/test_linters.py:76:24
   |
74 | )
75 | def test_approx_version_regex_matches(string, expected):
76 |     assert expected in linters.APPROX_VERSION_REGEX.search(string).group(1, 2)
   |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `group` may be missing on object of type `Match[str] | None`
  --> tests/unit/test_linters.py:84:12
   |
82 | )
83 | def test_exact_version_regex_matches(string, expected):
84 |     assert linters.EXACT_VERSION_REGEX.search(string).group(1) == expected
   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
info: rule `possibly-missing-attribute` is enabled by default

error[no-matching-overload]: No overload of function `format_content` matches arguments
   --> tests/unit/utils/test_cli.py:285:9
    |
283 | def test_format_content_invalid(fmt):
284 |     with pytest.raises(ValueError, match="^Unknown output format "):
285 |         format_content(None, fmt)
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^
    |
info: First overload defined here
   --> charmcraft/utils/cli.py:185:5
    |
184 |   @overload
185 |   def format_content(
    |  _____^
186 | |     content: dict[str, Any] | list[dict[str, Any]], fmt: OutputFormat | str | None
187 | | ) -> str: ...
    | |________^
    |
info: Possible overloads for function `format_content`:
info:   (content: dict[str, Any] | list[dict[str, Any]], fmt: OutputFormat | str | None) -> str
info:   (content: str | Real | list[Unknown] | dict[Unknown, Unknown], fmt: OutputFormat | str | None) -> str
info: Overload implementation defined here
   --> charmcraft/utils/cli.py:196:5
    |
196 | def format_content(content, fmt=None):
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
197 |     """Format command output."""
198 |     if not isinstance(fmt, OutputFormat):
    |
info: rule `no-matching-overload` is enabled by default

Found 151 diagnostics

1 similar comment
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Dec 8, 2025

Type checking with ty failed. This is a notification only and does not require action.

Command output
warning[possibly-missing-attribute]: Attribute `bases` may be missing on object of type `PlatformCharm | BasesCharm`
   --> charmcraft/application/commands/lifecycle.py:119:36
    |
118 |         msg = "Bases index '{}' is invalid (must be >= 0 and fit in configured bases)."
119 |         len_configured_bases = len(project.bases)
    |                                    ^^^^^^^^^^^^^
120 |         for bases_index in bases_indices:
121 |             if bases_index < 0:
    |
info: rule `possibly-missing-attribute` is enabled by default

error[unresolved-attribute]: Object of type `AppService | type[AppService]` has no attribute `get_credentials`
   --> charmcraft/application/commands/store.py:210:27
    |
209 |         if parsed_args.export:
210 |             credentials = self._services.store.get_credentials(
    |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
211 |                 packages=packages, **kwargs
212 |             )
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `AppService | type[AppService]` has no attribute `login`
   --> charmcraft/application/commands/store.py:218:13
    |
216 |             )
217 |         else:
218 |             self._services.store.login(packages=packages, **kwargs)
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^
219 |             username = self._services.store.get_account_info()["username"]
220 |             emit.message(f"Logged in as {username!r}.")
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `AppService | type[AppService]` has no attribute `get_account_info`
   --> charmcraft/application/commands/store.py:219:24
    |
217 |         else:
218 |             self._services.store.login(packages=packages, **kwargs)
219 |             username = self._services.store.get_account_info()["username"]
    |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
220 |             emit.message(f"Logged in as {username!r}.")
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `AppService | type[AppService]` has no attribute `logout`
   --> charmcraft/application/commands/store.py:244:13
    |
242 |         """Run the command."""
243 |         try:
244 |             self._services.store.logout()
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
245 |             emit.message("Charmhub token cleared.")
246 |         except CredentialsUnavailable:
    |
info: rule `unresolved-attribute` is enabled by default

error[not-iterable]: Object of type `IO[str] | None` may not be iterable
   --> charmcraft/charm_builder.py:423:17
    |
422 |     # https://github.com/microsoft/pylance-release/issues/2385
423 |     for line in proc.stdout:  # pyright: ignore[reportOptionalIterable]
    |                 ^^^^^^^^^^^
424 |         print(f"   :: {line.rstrip()}")
425 |     retcode = proc.wait()
    |
info: It may not have an `__iter__` method and it doesn't have a `__getitem__` method
info: rule `not-iterable` is enabled by default

warning[possibly-missing-attribute]: Attribute `split` may be missing on object of type `str | None`
   --> charmcraft/linters.py:238:23
    |
236 |                     yield name.name.split(".")
237 |             elif isinstance(node, ast.ImportFrom):
238 |                 yield node.module.split(".")
    |                       ^^^^^^^^^^^^^^^^^
239 |
240 |     def _check_operator(self, basedir: pathlib.Path) -> bool:
    |
info: rule `possibly-missing-attribute` is enabled by default

error[invalid-argument-type]: Argument to function `quote` is incorrect
   --> charmcraft/parts/plugins/_charm.py:289:42
    |
287 |             build_cmd.extend(self._get_legacy_dependencies_parameters())
288 |
289 |         commands = [" ".join(shlex.quote(i) for i in build_cmd)]
    |                                          ^ Expected `str`, found `Unknown | str | None`
290 |
291 |         # hook a callback after the BUILD happened (to collect metrics left by charm builder)
    |
info: Element `None` of this union is not assignable to `str`
info: Function defined here
  --> stdlib/shlex.pyi:34:5
   |
32 |     """Return a shell-escaped string from *split_command*."""
33 |
34 | def quote(s: str) -> str:
   |     ^^^^^ ------ Parameter declared here
35 |     """Return a shell-escaped version of the string *s*."""
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `merge_from` is incorrect
   --> charmcraft/parts/plugins/_charm.py:341:28
    |
339 |     def post_build_callback(self, step_info):
340 |         """Collect metrics left by charm_builder.py."""
341 |         instrum.merge_from(env.get_charm_builder_metrics_path())
    |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str`, found `Path`
342 |
343 |     def _get_os_special_priority_paths(self) -> str | None:
    |
info: Method defined here
  --> charmcraft/instrum.py:77:9
   |
75 |             json.dump(measurements, fh, indent=4)
76 |
77 |     def merge_from(self, filename: str) -> None:
   |         ^^^^^^^^^^       ------------- Parameter declared here
78 |         """Merge measurements from a file to the current ongoing structure."""
79 |         with open(filename) as fh:
   |
info: rule `invalid-argument-type` is enabled by default

warning[possibly-missing-attribute]: Attribute `login` may be missing on object of type `Unknown | Client | AnonymousClient`
   --> charmcraft/store/store.py:227:27
    |
226 |         try:
227 |             credentials = self._client.login(**kwargs)
    |                           ^^^^^^^^^^^^^^^^^^
228 |         except CredentialsAlreadyAvailable as exc:
229 |             raise CraftError(
    |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `logout` may be missing on object of type `Unknown | Client | AnonymousClient`
   --> charmcraft/store/store.py:241:9
    |
239 |         There's no action really in the Store to logout, we just remove local credentials.
240 |         """
241 |         self._client.logout()
    |         ^^^^^^^^^^^^^^^^^^^
242 |
243 |     @_store_client_wrapper(auto_login=False)
    |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `whoami` may be missing on object of type `Unknown | Client | AnonymousClient`
   --> charmcraft/store/store.py:246:20
    |
244 |     def whoami(self):
245 |         """Return authenticated user details."""
246 |         response = self._client.whoami()
    |                    ^^^^^^^^^^^^^^^^^^^
247 |
248 |         acc = response["account"]
    |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `whoami` may be missing on object of type `Unknown | Client | AnonymousClient`
   --> charmcraft/store/store.py:268:9
    |
266 |     def _check_authorized(self) -> None:
267 |         """Check if current credentials authenticated."""
268 |         self._client.whoami()
    |         ^^^^^^^^^^^^^^^^^^^
269 |
270 |     @_store_client_wrapper()
    |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `unregister_name` may be missing on object of type `Unknown | Client | AnonymousClient`
   --> charmcraft/store/store.py:285:9
    |
283 |         :raises: error messages from craft-store
284 |         """
285 |         self._client.unregister_name(name)
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
286 |
287 |     @_store_client_wrapper()
    |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `push_file` may be missing on object of type `Unknown | Client | AnonymousClient`
   --> charmcraft/store/store.py:311:21
    |
309 |         self._check_authorized()
310 |
311 |         upload_id = self._client.push_file(filepath)
    |                     ^^^^^^^^^^^^^^^^^^^^^^
312 |         payload = {"upload-id": upload_id}
313 |         if extra_fields is not None:
    |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `list_resource_revisions` may be missing on object of type `Unknown | Client | AnonymousClient`
   --> charmcraft/store/store.py:506:16
    |
504 |     ) -> list[CharmResourceRevision]:
505 |         """Return revisions for the indicated charm resource."""
506 |         return self._client.list_resource_revisions(charm_name, resource_name)
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
507 |
508 |     @_store_client_wrapper()
    |
info: rule `possibly-missing-attribute` is enabled by default

error[invalid-argument-type]: Argument to function `__new__` is incorrect
   --> docs/conf.py:242:38
    |
240 | # Setup libraries documentation snippets for use in charmcraft docs.
241 | common_docs_path = pathlib.Path(__file__).parent / "common"
242 | craft_parts_docs_path = pathlib.Path(craft_parts_docs.__file__).parent / "craft-parts"
    |                                      ^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str | PathLike[str]`, found `str | None`
243 | (common_docs_path / "craft-parts").unlink(missing_ok=True)
244 | (common_docs_path / "craft-parts").symlink_to(craft_parts_docs_path, target_is_directory=True)
    |
info: Element `None` of this union is not assignable to `str | PathLike[str]`
info: Function defined here
   --> stdlib/pathlib/__init__.pyi:299:13
    |
297 |         def __new__(cls, *args: StrPath, **kwargs: Unused) -> Self: ...  # pyright: ignore[reportInconsistentConstructor]
298 |     else:
299 |         def __new__(cls, *args: StrPath, **kwargs: Unused) -> Self: ...
    |             ^^^^^^^      -------------- Parameter declared here
300 |
301 |     @classmethod
    |
info: rule `invalid-argument-type` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> docs/howto/code/custom-action-clearsession/clearsession_action_charm.py:10:8
   |
 8 | import typing
 9 |
10 | import ops
   |        ^^^
11 |
12 | import paas_charm.django
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `paas_charm.django`
  --> docs/howto/code/custom-action-clearsession/clearsession_action_charm.py:12:8
   |
10 | import ops
11 |
12 | import paas_charm.django
   |        ^^^^^^^^^^^^^^^^^
13 |
14 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `flask`
 --> docs/howto/code/custom-action-updatelogfile/app.py:3:8
  |
1 | # initial hello world Flask app
2 |
3 | import flask
  |        ^^^^^
4 |
5 | app = flask.Flask(__name__)
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> docs/howto/code/custom-action-updatelogfile/updatelogfile_action_charm.py:10:8
   |
 8 | import typing
 9 |
10 | import ops
   |        ^^^
11 |
12 | import paas_charm.flask
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `paas_charm.flask`
  --> docs/howto/code/custom-action-updatelogfile/updatelogfile_action_charm.py:12:8
   |
10 | import ops
11 |
12 | import paas_charm.flask
   |        ^^^^^^^^^^^^^^^^
13 |
14 | import requests
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `flask`
 --> docs/howto/code/flask-async/app.py:3:8
  |
1 | from time import sleep
2 |
3 | import flask
  |        ^^^^^
4 |
5 | app = flask.Flask(__name__)
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `django.contrib`
  --> docs/tutorial/code/django/urls_django_hello_world.py:17:6
   |
15 |     2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
16 | """
17 | from django.contrib import admin
   |      ^^^^^^^^^^^^^^
18 | from django.urls import include, path
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `django.urls`
  --> docs/tutorial/code/django/urls_django_hello_world.py:18:6
   |
16 | """
17 | from django.contrib import admin
18 | from django.urls import include, path
   |      ^^^^^^^^^^^
19 |
20 | urlpatterns = [
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `django.urls`
 --> docs/tutorial/code/django/urls_greeting.py:1:6
  |
1 | from django.urls import path
  |      ^^^^^^^^^^^
2 |
3 | from . import views
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Module `docs.tutorial.code.django` has no member `views`
 --> docs/tutorial/code/django/urls_greeting.py:3:15
  |
1 | from django.urls import path
2 |
3 | from . import views
  |               ^^^^^
4 |
5 | urlpatterns = [
  |
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `django.http`
 --> docs/tutorial/code/django/views_greeting.py:1:6
  |
1 | from django.http import HttpResponse
  |      ^^^^^^^^^^^
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `django.http`
 --> docs/tutorial/code/django/views_greeting_configuration.py:3:6
  |
1 | import os
2 |
3 | from django.http import HttpResponse
  |      ^^^^^^^^^^^
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `fastapi`
 --> docs/tutorial/code/fastapi/app.py:1:6
  |
1 | from fastapi import FastAPI
  |      ^^^^^^^
2 |
3 | app = FastAPI()
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `fastapi`
 --> docs/tutorial/code/fastapi/greeting_app.py:3:6
  |
1 | import os
2 |
3 | from fastapi import FastAPI
  |      ^^^^^^^
4 |
5 | app = FastAPI()
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `fastapi`
 --> docs/tutorial/code/fastapi/visitors_app.py:7:6
  |
5 | from typing import Annotated
6 |
7 | from fastapi import FastAPI, Header
  |      ^^^^^^^
8 | import psycopg2
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `psycopg2`
  --> docs/tutorial/code/fastapi/visitors_app.py:8:8
   |
 7 | from fastapi import FastAPI, Header
 8 | import psycopg2
   |        ^^^^^^^^
 9 |
10 | app = FastAPI()
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `psycopg2`
 --> docs/tutorial/code/fastapi/visitors_migrate.py:5:8
  |
3 | import os
4 |
5 | import psycopg2
  |        ^^^^^^^^
6 |
7 | DATABASE_URI = os.environ["POSTGRESQL_DB_CONNECT_STRING"]
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `flask`
 --> docs/tutorial/code/flask/app.py:3:8
  |
1 | # initial hello world Flask app
2 |
3 | import flask
  |        ^^^^^
4 |
5 | app = flask.Flask(__name__)
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `flask`
 --> docs/tutorial/code/flask/greeting_app.py:3:8
  |
1 | # Flask app with a greeting configuration
2 |
3 | import flask
  |        ^^^^^
4 |
5 | app = flask.Flask(__name__)
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `flask`
 --> docs/tutorial/code/flask/visitors_app.py:6:8
  |
4 | import os
5 |
6 | import flask
  |        ^^^^^
7 | import psycopg2
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `psycopg2`
 --> docs/tutorial/code/flask/visitors_app.py:7:8
  |
6 | import flask
7 | import psycopg2
  |        ^^^^^^^^
8 |
9 | app = flask.Flask(__name__)
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `psycopg2`
 --> docs/tutorial/code/flask/visitors_migrate.py:5:8
  |
3 | import os
4 |
5 | import psycopg2
  |        ^^^^^^^^
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `list[ResponseCharmResourceBase]`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `datetime`, and 2 more union elements, are not assignable to `list[ResponseCharmResourceBase]`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `datetime`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `datetime`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `str`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `str`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `int`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `int`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `str`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `str`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `str`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `str`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `str`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `str`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `str`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `str`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `ByteSize`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 3 more union elements, are not assignable to `ByteSize`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `str`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `str`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `datetime | None`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `datetime | None`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `str | None`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `str | None`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
    --> tests/commands/test_store_api.py:1628:13
     |
1626 |     expected = {
1627 |         (test_lib_id, test_api): Library(
1628 |             api=test_api,
     |             ^^^^^^^^^^^^ Expected `int`, found `Literal["test-api-version"]`
1629 |             content=test_content,
1630 |             content_hash=test_hash,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
    --> tests/commands/test_store_api.py:1634:13
     |
1632 |             lib_name=test_lib_name,
1633 |             charm_name=test_charm_name,
1634 |             patch=test_patch,
     |             ^^^^^^^^^^^^^^^^ Expected `int`, found `Literal["test-patch-version"]`
1635 |         ),
1636 |     }
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
    --> tests/commands/test_store_api.py:1718:13
     |
1716 |     expected = {
1717 |         (test_lib_id_1, test_api_1): Library(
1718 |             api=test_api_1,
     |             ^^^^^^^^^^^^^^ Expected `int`, found `Literal["test-api-version-1"]`
1719 |             content=test_content_1,
1720 |             content_hash=test_hash_1,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
    --> tests/commands/test_store_api.py:1724:13
     |
1722 |             lib_name=test_lib_name_1,
1723 |             charm_name=test_charm_name_1,
1724 |             patch=test_patch_1,
     |             ^^^^^^^^^^^^^^^^^^ Expected `int`, found `Literal["test-patch-version-1"]`
1725 |         ),
1726 |         (test_lib_id_2, test_api_2): Library(
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
    --> tests/commands/test_store_api.py:1727:13
     |
1725 |         ),
1726 |         (test_lib_id_2, test_api_2): Library(
1727 |             api=test_api_2,
     |             ^^^^^^^^^^^^^^ Expected `int`, found `Literal["test-api-version-2"]`
1728 |             content=test_content_2,
1729 |             content_hash=test_hash_2,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
    --> tests/commands/test_store_api.py:1733:13
     |
1731 |             lib_name=test_lib_name_2,
1732 |             charm_name=test_charm_name_2,
1733 |             patch=test_patch_2,
     |             ^^^^^^^^^^^^^^^^^^ Expected `int`, found `Literal["test-patch-version-2"]`
1734 |         ),
1735 |     }
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-method-override]: Invalid override of method `json`
   --> tests/commands/test_store_client.py:77:9
    |
 75 |           return self.status_code == 200
 76 |
 77 |       def json(self):
    |           ^^^^^^^^^^ Definition is incompatible with `Response.json`
 78 |           try:
 79 |               return json.loads(self._content)  # type: ignore
    |
   ::: .venv/lib/python3.12/site-packages/requests-stubs/models.pyi:155:9
    |
153 |       @property
154 |       def text(self) -> str: ...
155 |       def json(
    |  _________-
156 | |         self,
157 | |         *,
158 | |         cls: type[JSONDecoder] | None = ...,
159 | |         object_hook: Callable[[dict[Any, Any]], Any] | None = ...,
160 | |         parse_float: Callable[[str], Any] | None = ...,
161 | |         parse_int: Callable[[str], Any] | None = ...,
162 | |         parse_constant: Callable[[str], Any] | None = ...,
163 | |         object_pairs_hook: Callable[[list[tuple[Any, Any]]], Any] | None = ...,
164 | |         **kwds: Any,
165 | |     ) -> Any: ...
    | |____________- `Response.json` defined here
166 |       @property
167 |       def links(self) -> dict[Incomplete, Incomplete]: ...
    |
info: This violates the Liskov Substitution Principle
info: rule `invalid-method-override` is enabled by default

error[missing-argument]: No argument provided for required parameter `cls`
   --> tests/conftest.py:146:14
    |
145 |     if request.param == "bases":
146 |         with pytest.MonkeyPatch.context() as monkeypatch:
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
147 |             # Add the current system to legacy bases so we can test legacy bases.
148 |             monkeypatch.setattr(const, "LEGACY_BASES", (*const.LEGACY_BASES, base_str))
    |
info: Union variant `(cls) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((cls) -> _GeneratorContextManager[Unknown, None, None]) | ((cls) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `missing-argument` is enabled by default

error[missing-argument]: No argument provided for required parameter `cls`
   --> tests/conftest.py:146:14
    |
145 |     if request.param == "bases":
146 |         with pytest.MonkeyPatch.context() as monkeypatch:
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
147 |             # Add the current system to legacy bases so we can test legacy bases.
148 |             monkeypatch.setattr(const, "LEGACY_BASES", (*const.LEGACY_BASES, base_str))
    |
info: Union variant `(cls) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((cls) -> _GeneratorContextManager[Unknown, None, None]) | ((cls) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `missing-argument` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/conftest.py:226:9
    |
224 |         build_base=craft_platforms.DistroBase("ubuntu", "22.04"),
225 |         build_on=arch,
226 |         build_for="arm64",
    |         ^^^^^^^^^^^^^^^^^ Expected `DebianArchitecture | Literal["all"]`, found `Literal["arm64"]`
227 |         platform="distro-1-test64",
228 |     )
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-method-override]: Invalid override of method `get_supported_bases`
  --> tests/extensions/test_extensions.py:33:9
   |
32 |     @classmethod
33 |     def get_supported_bases(cls) -> list[tuple[str, ...]]:
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Definition is incompatible with `Extension.get_supported_bases`
34 |         """Return a list of tuple of supported bases."""
35 |         return cls.bases
   |
  ::: charmcraft/extensions/extension.py:52:9
   |
50 |     @staticmethod
51 |     @abc.abstractmethod
52 |     def get_supported_bases() -> list[tuple[str, str]]:
   |         ---------------------------------------------- `Extension.get_supported_bases` defined here
53 |         """Return a list of tuple of supported bases."""
   |
info: `FakeExtension.get_supported_bases` is a classmethod but `Extension.get_supported_bases` is a staticmethod
info: This violates the Liskov Substitution Principle
info: rule `invalid-method-override` is enabled by default

error[invalid-method-override]: Invalid override of method `is_experimental`
  --> tests/extensions/test_extensions.py:38:9
   |
37 |     @staticmethod
38 |     def is_experimental(_base: tuple[str, ...] | None) -> bool:
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Definition is incompatible with `Extension.is_experimental`
39 |         """Return whether or not this extension is unstable for given base."""
40 |         return False
   |
  ::: charmcraft/extensions/extension.py:57:9
   |
55 |     @staticmethod
56 |     @abc.abstractmethod
57 |     def is_experimental(base: tuple[str, str] | None) -> bool:
   |         ----------------------------------------------------- `Extension.is_experimental` defined here
58 |         """Return whether or not this extension is unstable for given base."""
   |
info: This violates the Liskov Substitution Principle
info: rule `invalid-method-override` is enabled by default

error[invalid-method-override]: Invalid override of method `is_experimental`
  --> tests/extensions/test_extensions.py:62:9
   |
61 |     @staticmethod
62 |     def is_experimental(_base: str | None) -> bool:
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Definition is incompatible with `FakeExtension.is_experimental`
63 |         return True
   |
  ::: tests/extensions/test_extensions.py:38:9
   |
37 |     @staticmethod
38 |     def is_experimental(_base: tuple[str, ...] | None) -> bool:
   |         ------------------------------------------------------ `FakeExtension.is_experimental` defined here
39 |         """Return whether or not this extension is unstable for given base."""
40 |         return False
   |
info: This violates the Liskov Substitution Principle
info: rule `invalid-method-override` is enabled by default

error[invalid-method-override]: Invalid override of method `is_experimental`
  --> tests/extensions/test_registry.py:34:9
   |
33 |     @staticmethod
34 |     def is_experimental(_base: tuple[str, str] | None) -> bool:
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Definition is incompatible with `Extension.is_experimental`
35 |         return False
   |
  ::: charmcraft/extensions/extension.py:57:9
   |
55 |     @staticmethod
56 |     @abc.abstractmethod
57 |     def is_experimental(base: tuple[str, str] | None) -> bool:
   |         ----------------------------------------------------- `Extension.is_experimental` defined here
58 |         """Return whether or not this extension is unstable for given base."""
   |
info: This violates the Liskov Substitution Principle
info: rule `invalid-method-override` is enabled by default

warning[possibly-missing-attribute]: Submodule `application` may not be available as an attribute on module `charmcraft`
  --> tests/integration/commands/test_init.py:75:17
   |
73 | def init_command():
74 |     return init.InitCommand(
75 |         {"app": charmcraft.application.APP_METADATA, "services": None}
   |                 ^^^^^^^^^^^^^^^^^^^^^^
76 |     )
   |
help: Consider explicitly importing `charmcraft.application`
info: rule `possibly-missing-attribute` is enabled by default

error[unresolved-attribute]: Object of type `RecordingEmitter` has no attribute `assert_json_output`
   --> tests/integration/commands/test_store_commands.py:225:9
    |
223 |             },
224 |         ]
225 |         emitter.assert_json_output(  # pyright: ignore[reportAttributeAccessIssue]
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^
226 |             expected
227 |         )
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Unresolved attribute `client` on type `AppService`.
  --> tests/integration/conftest.py:45:5
   |
43 |     services.register_services()
44 |     factory = craft_application.ServiceFactory(app=application.APP_METADATA)
45 |     factory.get("store").client = mock.Mock(spec_set=craft_store.StoreClient)  # pyright: ignore[reportAttributeAccessIssue]
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
46 |     factory.update_kwargs(
47 |         "charm_libs",
   |
info: rule `unresolved-attribute` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
  --> tests/integration/services/test_image.py:28:9
   |
26 |     service = ImageService(
27 |         app=application.APP_METADATA,
28 |         services=None,  # pyright: ignore[reportArgumentType]
   |         ^^^^^^^^^^^^^ Expected `ServiceFactory`, found `None`
29 |     )
30 |     service.setup()
   |
info: Method defined here
  --> .venv/lib/python3.12/site-packages/craft_application/services/base.py:44:9
   |
42 |     """
43 |
44 |     def __init__(self, app: AppMetadata, services: ServiceFactory) -> None:
   |         ^^^^^^^^                         ------------------------ Parameter declared here
45 |         self._app = app
46 |         self._services = services
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/integration/services/test_lifecycle.py:40:17
   |
38 |                 platform="something",
39 |                 build_on=craft_platforms.DebianArchitecture.from_host(),
40 |                 build_for="invalid",  # pyright: ignore[reportArgumentType]
   |                 ^^^^^^^^^^^^^^^^^^^ Expected `DebianArchitecture | Literal["all"]`, found `Literal["invalid"]`
41 |                 build_base=craft_platforms.DistroBase(distro.id(), distro.version()),
42 |             )
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/integration/services/test_lifecycle.py:88:17
   |
86 |                 platform="something",
87 |                 build_on=host_arch,
88 |                 build_for=f"{foreign_arch}-{host_arch}",  # pyright: ignore[reportArgumentType]
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `DebianArchitecture | Literal["all"]`, found `str`
89 |                 build_base=craft_platforms.DistroBase(distro.id(), distro.version()),
90 |             )
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/integration/services/test_provider.py:56:28
   |
54 |     assert not lock_file.exists()
55 |
56 |     with provider.instance(**provider_kwargs):
   |                            ^^^^^^^^^^^^^^^^^ Expected `BuildInfo`, found `Unknown | BuildInfo | Path`
57 |         # Test that the cache lock gets created
58 |         assert lock_file.is_file()
   |
info: Element `Path` of this union is not assignable to `BuildInfo`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/integration/services/test_provider.py:56:28
   |
54 |     assert not lock_file.exists()
55 |
56 |     with provider.instance(**provider_kwargs):
   |                            ^^^^^^^^^^^^^^^^^ Expected `Path`, found `Unknown | BuildInfo | Path`
57 |         # Test that the cache lock gets created
58 |         assert lock_file.is_file()
   |
info: Element `BuildInfo` of this union is not assignable to `Path`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/integration/services/test_provider.py:56:28
   |
54 |     assert not lock_file.exists()
55 |
56 |     with provider.instance(**provider_kwargs):
   |                            ^^^^^^^^^^^^^^^^^ Expected `bool`, found `Unknown | BuildInfo | Path`
57 |         # Test that the cache lock gets created
58 |         assert lock_file.is_file()
   |
info: Union elements `BuildInfo` and `Path` are not assignable to `bool`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/integration/services/test_provider.py:56:28
   |
54 |     assert not lock_file.exists()
55 |
56 |     with provider.instance(**provider_kwargs):
   |                            ^^^^^^^^^^^^^^^^^ Expected `bool`, found `Unknown | BuildInfo | Path`
57 |         # Test that the cache lock gets created
58 |         assert lock_file.is_file()
   |
info: Union elements `BuildInfo` and `Path` are not assignable to `bool`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/integration/services/test_provider.py:56:28
   |
54 |     assert not lock_file.exists()
55 |
56 |     with provider.instance(**provider_kwargs):
   |                            ^^^^^^^^^^^^^^^^^ Expected `bool`, found `Unknown | BuildInfo | Path`
57 |         # Test that the cache lock gets created
58 |         assert lock_file.is_file()
   |
info: Union elements `BuildInfo` and `Path` are not assignable to `bool`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/integration/services/test_provider.py:56:28
   |
54 |     assert not lock_file.exists()
55 |
56 |     with provider.instance(**provider_kwargs):
   |                            ^^^^^^^^^^^^^^^^^ Expected `str | None`, found `Unknown | BuildInfo | Path`
57 |         # Test that the cache lock gets created
58 |         assert lock_file.is_file()
   |
info: Union elements `BuildInfo` and `Path` are not assignable to `str | None`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/integration/services/test_provider.py:56:28
   |
54 |     assert not lock_file.exists()
55 |
56 |     with provider.instance(**provider_kwargs):
   |                            ^^^^^^^^^^^^^^^^^ Expected `((Executor, /) -> None) | None`, found `Unknown | BuildInfo | Path`
57 |         # Test that the cache lock gets created
58 |         assert lock_file.is_file()
   |
info: Union elements `BuildInfo` and `Path` are not assignable to `((Executor, /) -> None) | None`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/integration/services/test_provider.py:56:28
   |
54 |     assert not lock_file.exists()
55 |
56 |     with provider.instance(**provider_kwargs):
   |                            ^^^^^^^^^^^^^^^^^ Expected `bool | str | None`, found `Unknown | BuildInfo | Path`
57 |         # Test that the cache lock gets created
58 |         assert lock_file.is_file()
   |
info: Union elements `BuildInfo` and `Path` are not assignable to `bool | str | None`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:101:28
    |
 99 |     }
100 |
101 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `BuildInfo`, found `Unknown | BuildInfo | Path`
102 |         # Create a file in the cache and ensure it's not visible in the outer fs
103 |         instance.execute_run(["touch", "/root/.cache/cache_cached"])
    |
info: Element `Path` of this union is not assignable to `BuildInfo`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:101:28
    |
 99 |     }
100 |
101 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `Path`, found `Unknown | BuildInfo | Path`
102 |         # Create a file in the cache and ensure it's not visible in the outer fs
103 |         instance.execute_run(["touch", "/root/.cache/cache_cached"])
    |
info: Element `BuildInfo` of this union is not assignable to `Path`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:101:28
    |
 99 |     }
100 |
101 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `bool`, found `Unknown | BuildInfo | Path`
102 |         # Create a file in the cache and ensure it's not visible in the outer fs
103 |         instance.execute_run(["touch", "/root/.cache/cache_cached"])
    |
info: Union elements `BuildInfo` and `Path` are not assignable to `bool`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:101:28
    |
 99 |     }
100 |
101 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `bool`, found `Unknown | BuildInfo | Path`
102 |         # Create a file in the cache and ensure it's not visible in the outer fs
103 |         instance.execute_run(["touch", "/root/.cache/cache_cached"])
    |
info: Union elements `BuildInfo` and `Path` are not assignable to `bool`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:101:28
    |
 99 |     }
100 |
101 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `bool`, found `Unknown | BuildInfo | Path`
102 |         # Create a file in the cache and ensure it's not visible in the outer fs
103 |         instance.execute_run(["touch", "/root/.cache/cache_cached"])
    |
info: Union elements `BuildInfo` and `Path` are not assignable to `bool`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:101:28
    |
 99 |     }
100 |
101 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `str | None`, found `Unknown | BuildInfo | Path`
102 |         # Create a file in the cache and ensure it's not visible in the outer fs
103 |         instance.execute_run(["touch", "/root/.cache/cache_cached"])
    |
info: Union elements `BuildInfo` and `Path` are not assignable to `str | None`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:101:28
    |
 99 |     }
100 |
101 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `((Executor, /) -> None) | None`, found `Unknown | BuildInfo | Path`
102 |         # Create a file in the cache and ensure it's not visible in the outer fs
103 |         instance.execute_run(["touch", "/root/.cache/cache_cached"])
    |
info: Union elements `BuildInfo` and `Path` are not assignable to `((Executor, /) -> None) | None`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:101:28
    |
 99 |     }
100 |
101 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `bool | str | None`, found `Unknown | BuildInfo | Path`
102 |         # Create a file in the cache and ensure it's not visible in the outer fs
103 |         instance.execute_run(["touch", "/root/.cache/cache_cached"])
    |
info: Union elements `BuildInfo` and `Path` are not assignable to `bool | str | None`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:134:28
    |
132 |         "cache_path": cache_path,
133 |     }
134 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `BuildInfo`, found `Unknown | BuildInfo | Path`
135 |         instance.execute_run(["test", "-d", "/root/.cache"], check=True)
136 |         instance.execute_run(
    |
info: Element `Path` of this union is not assignable to `BuildInfo`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:134:28
    |
132 |         "cache_path": cache_path,
133 |     }
134 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `Path`, found `Unknown | BuildInfo | Path`
135 |         instance.execute_run(["test", "-d", "/root/.cache"], check=True)
136 |         instance.execute_run(
    |
info: Element `BuildInfo` of this union is not assignable to `Path`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:134:28
    |
132 |         "cache_path": cache_path,
133 |     }
134 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `bool`, found `Unknown | BuildInfo | Path`
135 |         instance.execute_run(["test", "-d", "/root/.cache"], check=True)
136 |         instance.execute_run(
    |
info: Union elements `BuildInfo` and `Path` are not assignable to `bool`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:134:28
    |
132 |         "cache_path": cache_path,
133 |     }
134 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `bool`, found `Unknown | BuildInfo | Path`
135 |         instance.execute_run(["test", "-d", "/root/.cache"], check=True)
136 |         instance.execute_run(
    |
info: Union elements `BuildInfo` and `Path` are not assignable to `bool`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:134:28
    |
132 |         "cache_path": cache_path,
133 |     }
134 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `bool`, found `Unknown | BuildInfo | Path`
135 |         instance.execute_run(["test", "-d", "/root/.cache"], check=True)
136 |         instance.execute_run(
    |
info: Union elements `BuildInfo` and `Path` are not assignable to `bool`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:134:28
    |
132 |         "cache_path": cache_path,
133 |     }
134 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `str | None`, found `Unknown | BuildInfo | Path`
135 |         instance.execute_run(["test", "-d", "/root/.cache"], check=True)
136 |         instance.execute_run(
    |
info: Union elements `BuildInfo` and `Path` are not assignable to `str | None`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:134:28
    |
132 |         "cache_path": cache_path,
133 |     }
134 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `((Executor, /) -> None) | None`, found `Unknown | BuildInfo | Path`
135 |         instance.execute_run(["test", "-d", "/root/.cache"], check=True)
136 |         instance.execute_run(
    |
info: Union elements `BuildInfo` and `Path` are not assignable to `((Executor, /) -> None) | None`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:134:28
    |
132 |         "cache_path": cache_path,
133 |     }
134 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `bool | str | None`, found `Unknown | BuildInfo | Path`
135 |         instance.execute_run(["test", "-d", "/root/.cache"], check=True)
136 |         instance.execute_run(
    |
info: Union elements `BuildInfo` and `Path` are not assignable to `bool | str | None`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[unresolved-import]: Cannot resolve imported module `charm`
  --> tests/spread/commands/init-extensions/tests/unit/test_charm.py:9:8
   |
 7 | import pathlib
 8 |
 9 | import charm
   |        ^^^^^
10 | import scenario
11 | import scenario.errors
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `scenario`
  --> tests/spread/commands/init-extensions/tests/unit/test_charm.py:10:8
   |
 9 | import charm
10 | import scenario
   |        ^^^^^^^^
11 | import scenario.errors
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `scenario.errors`
  --> tests/spread/commands/init-extensions/tests/unit/test_charm.py:11:8
   |
 9 | import charm
10 | import scenario
11 | import scenario.errors
   |        ^^^^^^^^^^^^^^^
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/dependencies/setuptools-scm-python/src/charm.py:9:8
   |
 7 | import logging
 8 |
 9 | import ops
   |        ^^^
10 |
11 | # A standalone module for workload-specific logic (no charming concerns):
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `setuptools_scm_python`
  --> tests/spread/dependencies/setuptools-scm-python/src/charm.py:12:8
   |
11 | # A standalone module for workload-specific logic (no charming concerns):
12 | import setuptools_scm_python
   |        ^^^^^^^^^^^^^^^^^^^^^
13 |
14 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/dependencies/strict-dependencies-errors/extra-binary-packages/src/charm.py:17:8
   |
15 | import logging
16 |
17 | import ops
   |        ^^^
18 |
19 | # Log messages can be retrieved using juju debug-log
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/dependencies/strict-dependencies-errors/extra-packages/src/charm.py:17:8
   |
15 | import logging
16 |
17 | import ops
   |        ^^^
18 |
19 | # Log messages can be retrieved using juju debug-log
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/dependencies/strict-dependencies-errors/missing-packages/src/charm.py:17:8
   |
15 | import logging
16 |
17 | import ops
   |        ^^^
18 |
19 | # Log messages can be retrieved using juju debug-log
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/dependencies/strict-dependencies-errors/no-requirements/src/charm.py:17:8
   |
15 | import logging
16 |
17 | import ops
   |        ^^^
18 |
19 | # Log messages can be retrieved using juju debug-log
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/dependencies/strict-dependencies/charm/src/charm.py:17:8
   |
15 | import logging
16 |
17 | import ops
   |        ^^^
18 |
19 | # Log messages can be retrieved using juju debug-log
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `charms.reactive`
 --> tests/spread/smoketests/reactive/reactivecharm/reactive/reactivecharm.py:1:6
  |
1 | from charms.reactive import set_flag, when_not
  |      ^^^^^^^^^^^^^^^
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/ubuntu-20.04/charm/bases/src/charm.py:18:8
   |
16 | from typing import cast
17 |
18 | import ops
   |        ^^^
19 |
20 | # Log messages can be retrieved using juju debug-log
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/ubuntu-20.04/charm/platforms/src/charm.py:9:8
   |
 7 | import logging
 8 |
 9 | import ops
   |        ^^^
10 |
11 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/ubuntu-22.04/charm/bases/src/charm.py:18:8
   |
16 | from typing import cast
17 |
18 | import ops
   |        ^^^
19 |
20 | # Log messages can be retrieved using juju debug-log
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/ubuntu-22.04/charm/platforms/src/charm.py:9:8
   |
 7 | import logging
 8 |
 9 | import ops
   |        ^^^
10 |
11 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/ubuntu-24.04/charm/platforms/src/charm.py:9:8
   |
 7 | import logging
 8 |
 9 | import ops
   |        ^^^
10 |
11 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
 --> tests/spread/ubuntu-24.04/test-cmd/src/charm.py:6:8
  |
4 | import logging
5 |
6 | import ops
  |        ^^^
7 |
8 | # A standalone module for workload-specific logic (no charming concerns):
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `test_cmd`
  --> tests/spread/ubuntu-24.04/test-cmd/src/charm.py:9:8
   |
 8 | # A standalone module for workload-specific logic (no charming concerns):
 9 | import test_cmd
   |        ^^^^^^^^
10 |
11 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `pytest_operator.plugin`
 --> tests/spread/ubuntu-24.04/test-cmd/tests/integration/test_charm.py:7:6
  |
5 | import pytest
6 | import yaml
7 | from pytest_operator.plugin import OpsTest
  |      ^^^^^^^^^^^^^^^^^^^^^^
8 |
9 | logger = logging.getLogger(__name__)
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
 --> tests/spread/ubuntu-24.04/test-cmd/tests/unit/test_charm.py:2:6
  |
1 | import pytest
2 | from ops import testing
  |      ^^^
3 |
4 | from charm import TestCmdCharm
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `charm`
 --> tests/spread/ubuntu-24.04/test-cmd/tests/unit/test_charm.py:4:6
  |
2 | from ops import testing
3 |
4 | from charm import TestCmdCharm
  |      ^^^^^
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/ubuntu-25.10/charm/platforms/src/charm.py:9:8
   |
 7 | import logging
 8 |
 9 | import ops
   |        ^^^
10 |
11 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
 --> tests/spread/ubuntu-25.10/test-cmd/src/charm.py:6:8
  |
4 | import logging
5 |
6 | import ops
  |        ^^^
7 |
8 | # A standalone module for workload-specific logic (no charming concerns):
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `test_cmd`
  --> tests/spread/ubuntu-25.10/test-cmd/src/charm.py:9:8
   |
 8 | # A standalone module for workload-specific logic (no charming concerns):
 9 | import test_cmd
   |        ^^^^^^^^
10 |
11 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `pytest_operator.plugin`
 --> tests/spread/ubuntu-25.10/test-cmd/tests/integration/test_charm.py:7:6
  |
5 | import pytest
6 | import yaml
7 | from pytest_operator.plugin import OpsTest
  |      ^^^^^^^^^^^^^^^^^^^^^^
8 |
9 | logger = logging.getLogger(__name__)
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
 --> tests/spread/ubuntu-25.10/test-cmd/tests/unit/test_charm.py:2:6
  |
1 | import pytest
2 | from ops import testing
  |      ^^^
3 |
4 | from charm import TestCmdCharm
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `charm`
 --> tests/spread/ubuntu-25.10/test-cmd/tests/unit/test_charm.py:4:6
  |
2 | from ops import testing
3 |
4 | from charm import TestCmdCharm
  |      ^^^^^
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/ubuntu-26.04/charm/platforms/src/charm.py:9:8
   |
 7 | import logging
 8 |
 9 | import ops
   |        ^^^
10 |
11 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
 --> tests/spread/ubuntu-26.04/test-cmd/src/charm.py:6:8
  |
4 | import logging
5 |
6 | import ops
  |        ^^^
7 |
8 | # A standalone module for workload-specific logic (no charming concerns):
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `test_cmd`
  --> tests/spread/ubuntu-26.04/test-cmd/src/charm.py:9:8
   |
 8 | # A standalone module for workload-specific logic (no charming concerns):
 9 | import test_cmd
   |        ^^^^^^^^
10 |
11 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `pytest_operator.plugin`
 --> tests/spread/ubuntu-26.04/test-cmd/tests/integration/test_charm.py:7:6
  |
5 | import pytest
6 | import yaml
7 | from pytest_operator.plugin import OpsTest
  |      ^^^^^^^^^^^^^^^^^^^^^^
8 |
9 | logger = logging.getLogger(__name__)
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
 --> tests/spread/ubuntu-26.04/test-cmd/tests/unit/test_charm.py:2:6
  |
1 | import pytest
2 | from ops import testing
  |      ^^^
3 |
4 | from charm import TestCmdCharm
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `charm`
 --> tests/spread/ubuntu-26.04/test-cmd/tests/unit/test_charm.py:4:6
  |
2 | from ops import testing
3 |
4 | from charm import TestCmdCharm
  |      ^^^^^
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
   --> tests/test_instrum.py:256:32
    |
254 |     assert measurements.measurements == {}
255 |
256 |     with Timer("test message", foo=42):
    |                                ^^^^^^ Expected `dict[str, Any]`, found `Literal[42]`
257 |         pass
    |
info: Method defined here
   --> charmcraft/instrum.py:129:9
    |
127 |     """
128 |
129 |     def __init__(self, msg: str, **extra_info: dict[str, Any]):
    |         ^^^^^^^^                 ---------------------------- Parameter declared here
130 |         self.msg = msg
131 |         self.extra_info = extra_info
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
   --> tests/test_instrum.py:274:28
    |
272 |     monkeypatch.setattr(instrum, "_measurements", measurements)
273 |
274 |     @Timer("test message", foo=42)
    |                            ^^^^^^ Expected `dict[str, Any]`, found `Literal[42]`
275 |     def test_function(a, b):
276 |         assert a == 17
    |
info: Method defined here
   --> charmcraft/instrum.py:129:9
    |
127 |     """
128 |
129 |     def __init__(self, msg: str, **extra_info: dict[str, Any]):
    |         ^^^^^^^^                 ---------------------------- Parameter declared here
130 |         self.msg = msg
131 |         self.extra_info = extra_info
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
   --> tests/test_instrum.py:298:32
    |
296 |     assert measurements.measurements == {}
297 |
298 |     with Timer("test message", foo=42) as timer:
    |                                ^^^^^^ Expected `dict[str, Any]`, found `Literal[42]`
299 |         timer.mark("middle 1")
300 |         timer.mark("middle 2")
    |
info: Method defined here
   --> charmcraft/instrum.py:129:9
    |
127 |     """
128 |
129 |     def __init__(self, msg: str, **extra_info: dict[str, Any]):
    |         ^^^^^^^^                 ---------------------------- Parameter declared here
130 |         self.msg = msg
131 |         self.extra_info = extra_info
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-assignment]: Implicit shadowing of function `write`
  --> tests/unit/commands/test_lifecycle.py:91:5
   |
90 |     libs_service = cast("CharmLibsService", service_factory.get("charm_libs"))
91 |     libs_service.write = mock.Mock(wraps=libs_service.write)
   |     ^^^^^^^^^^^^^^^^^^
92 |
93 |     pack._update_charm_libs()
   |
info: Annotate to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[unresolved-attribute]: Object of type `bound method CharmLibsService.write(library: Library) -> None` has no attribute `assert_called_once_with`
  --> tests/unit/commands/test_lifecycle.py:95:5
   |
93 |     pack._update_charm_libs()
94 |
95 |     libs_service.write.assert_called_once_with(store_lib)
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
96 |
97 |     with check():
   |
info: rule `unresolved-attribute` is enabled by default

error[non-subscriptable]: Cannot subscript object of type `None` with no `__getitem__` method
  --> tests/unit/models/test_config.py:75:23
   |
73 |     config = JujuConfig(options={"my-opt": option})
74 |
75 |     assert isinstance(config.options["my-opt"], type_)
   |                       ^^^^^^^^^^^^^^^^^^^^^^^^
   |
info: rule `non-subscriptable` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/unit/models/test_project.py:812:13
    |
810 |             description="",
811 |             base=base,
812 |             platforms={"amd64": None},
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `PlatformsDict`, found `dict[Unknown | str, Unknown | None]`
813 |             parts={"charm": {"plugin": "charm"}},
814 |         )
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `__new__` is incorrect
  --> tests/unit/parts/plugins/test_charm.py:97:22
   |
96 |     pip_constraint_file = (
97 |         pathlib.Path(parts.plugins.__file__).parent / "charm-constraints.txt"
   |                      ^^^^^^^^^^^^^^^^^^^^^^ Expected `str | PathLike[str]`, found `str | None`
98 |     )
   |
info: Element `None` of this union is not assignable to `str | PathLike[str]`
info: Function defined here
   --> stdlib/pathlib/__init__.pyi:299:13
    |
297 |         def __new__(cls, *args: StrPath, **kwargs: Unused) -> Self: ...  # pyright: ignore[reportInconsistentConstructor]
298 |     else:
299 |         def __new__(cls, *args: StrPath, **kwargs: Unused) -> Self: ...
    |             ^^^^^^^      -------------- Parameter declared here
300 |
301 |     @classmethod
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-assignment]: Implicit shadowing of function `_get_pip`
  --> tests/unit/parts/plugins/test_poetry.py:40:5
   |
39 | def test_get_pip_install_commands(poetry_plugin: plugins.PoetryPlugin):
40 |     poetry_plugin._get_pip = lambda: "/python -m pip"
   |     ^^^^^^^^^^^^^^^^^^^^^^
41 |
42 |     assert poetry_plugin._get_pip_install_commands(
   |
info: Annotate to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Implicit shadowing of function `_get_pip`
  --> tests/unit/parts/plugins/test_python.py:62:5
   |
60 |     }
61 |     python_plugin._options = plugins.PythonPluginProperties.unmarshal(spec)
62 |     python_plugin._get_pip = lambda: "/python -m pip"
   |     ^^^^^^^^^^^^^^^^^^^^^^
63 |     copy_src_cmd = (
64 |         f"cp --archive --recursive --reflink=auto {build_path}/src {install_path}"
   |
info: Annotate to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
   --> tests/unit/services/test_analysis.py:112:67
    |
110 | @pytest.fixture
111 | def analysis_service():
112 |     return analysis.AnalysisService(app=application.APP_METADATA, services=None)
    |                                                                   ^^^^^^^^^^^^^ Expected `ServiceFactory`, found `None`
    |
info: Method defined here
  --> charmcraft/services/analysis.py:37:9
   |
35 |     _project: models.CharmcraftProject  # type: ignore[assignment]
36 |
37 |     def __init__(  # (too many arguments)
   |         ^^^^^^^^
38 |         self,
39 |         app: craft_application.AppMetadata,
40 |         services: craft_application.ServiceFactory,
   |         ------------------------------------------ Parameter declared here
41 |     ) -> None:
42 |         super().__init__(app, services)
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/unit/services/test_lifecycle.py:55:17
   |
53 |                 platform="something",
54 |                 build_on=HOST_ARCH,
55 |                 build_for=plan_build_for,  # pyright: ignore[reportArgumentType]
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^ Expected `DebianArchitecture | Literal["all"]`, found `str`
56 |             )
57 |         ]
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/unit/services/test_lifecycle.py:94:17
   |
92 |                 platform="something",
93 |                 build_on=HOST_ARCH,
94 |                 build_for=f"{HOST_ARCH}-foreign",  # pyright: ignore[reportArgumentType]
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `DebianArchitecture | Literal["all"]`, found `str`
95 |             )
96 |         ]
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
  --> tests/unit/services/test_project.py:34:45
   |
32 | @pytest.fixture
33 | def service(project_path):
34 |     return ProjectService(app=APP_METADATA, services=None, project_dir=project_path)
   |                                             ^^^^^^^^^^^^^ Expected `ServiceFactory`, found `None`
   |
info: Method defined here
  --> .venv/lib/python3.12/site-packages/craft_application/services/project.py:57:9
   |
55 |     _project_model: models.Project | None
56 |
57 |     def __init__(
   |         ^^^^^^^^
58 |         self, app: AppMetadata, services: ServiceFactory, *, project_dir: pathlib.Path
   |                                 ------------------------ Parameter declared here
59 |     ) -> None:
60 |         super().__init__(app, services)
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
   --> tests/unit/services/test_provider.py:123:9
    |
121 |     provider_service = ProviderService(
122 |         app=APP_METADATA,
123 |         services=None,  # pyright: ignore[reportArgumentType]
    |         ^^^^^^^^^^^^^ Expected `ServiceFactory`, found `None`
124 |         work_dir=tmp_path,
125 |     )
    |
info: Method defined here
  --> charmcraft/services/provider.py:43:9
   |
41 |     """Business logic for getting providers."""
42 |
43 |     def __init__(
   |         ^^^^^^^^
44 |         self,
45 |         app: craft_application.AppMetadata,
46 |         services: craft_application.ServiceFactory,
   |         ------------------------------------------ Parameter declared here
47 |         *,
48 |         work_dir: pathlib.Path,
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
  --> tests/unit/services/test_store.py:50:56
   |
48 | @pytest.fixture(scope="module")
49 | def reusable_store():
50 |     store = StoreService(app=application.APP_METADATA, services=None)
   |                                                        ^^^^^^^^^^^^^ Expected `ServiceFactory`, found `None`
51 |     store.client = mock.Mock(spec_set=craft_store.StoreClient)
52 |     store._publisher = mock.Mock(spec_set=craft_store.PublisherGateway)
   |
info: Method defined here
  --> .venv/lib/python3.12/site-packages/craft_application/services/base.py:44:9
   |
42 |     """
43 |
44 |     def __init__(self, app: AppMetadata, services: ServiceFactory) -> None:
   |         ^^^^^^^^                         ------------------------ Parameter declared here
45 |         self._app = app
46 |         self._services = services
   |
info: rule `invalid-argument-type` is enabled by default

warning[possibly-missing-attribute]: Attribute `group` may be missing on object of type `Match[str] | None`
  --> tests/unit/test_linters.py:43:12
   |
41 | )
42 | def test_fuzz_python_name_regex(name, next_char, further_garbage):
43 |     assert linters.PYTHON_NAME_REGEX.match(name).group(0) == name
   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
44 |     assert linters.PYTHON_NAME_REGEX.match(f"{name}{next_char}").group(0) == name
45 |     assert (
   |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `group` may be missing on object of type `Match[str] | None`
  --> tests/unit/test_linters.py:44:12
   |
42 | def test_fuzz_python_name_regex(name, next_char, further_garbage):
43 |     assert linters.PYTHON_NAME_REGEX.match(name).group(0) == name
44 |     assert linters.PYTHON_NAME_REGEX.match(f"{name}{next_char}").group(0) == name
   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
45 |     assert (
46 |         linters.PYTHON_NAME_REGEX.match(f"{name}{next_char}{further_garbage}").group(0)
   |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `group` may be missing on object of type `Match[str] | None`
  --> tests/unit/test_linters.py:46:9
   |
44 |     assert linters.PYTHON_NAME_REGEX.match(f"{name}{next_char}").group(0) == name
45 |     assert (
46 |         linters.PYTHON_NAME_REGEX.match(f"{name}{next_char}{further_garbage}").group(0)
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
47 |         == name
48 |     )
   |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `group` may be missing on object of type `Match[str] | None`
  --> tests/unit/test_linters.py:62:12
   |
60 | )
61 | def test_min_version_regex_matches(string, expected):
62 |     assert linters.MIN_VERSION_REGEX.search(string).group(1) == expected
   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `group` may be missing on object of type `Match[str] | None`
  --> tests/unit/test_linters.py:76:24
   |
74 | )
75 | def test_approx_version_regex_matches(string, expected):
76 |     assert expected in linters.APPROX_VERSION_REGEX.search(string).group(1, 2)
   |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `group` may be missing on object of type `Match[str] | None`
  --> tests/unit/test_linters.py:84:12
   |
82 | )
83 | def test_exact_version_regex_matches(string, expected):
84 |     assert linters.EXACT_VERSION_REGEX.search(string).group(1) == expected
   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
info: rule `possibly-missing-attribute` is enabled by default

error[no-matching-overload]: No overload of function `format_content` matches arguments
   --> tests/unit/utils/test_cli.py:285:9
    |
283 | def test_format_content_invalid(fmt):
284 |     with pytest.raises(ValueError, match="^Unknown output format "):
285 |         format_content(None, fmt)
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^
    |
info: First overload defined here
   --> charmcraft/utils/cli.py:185:5
    |
184 |   @overload
185 |   def format_content(
    |  _____^
186 | |     content: dict[str, Any] | list[dict[str, Any]], fmt: OutputFormat | str | None
187 | | ) -> str: ...
    | |________^
    |
info: Possible overloads for function `format_content`:
info:   (content: dict[str, Any] | list[dict[str, Any]], fmt: OutputFormat | str | None) -> str
info:   (content: str | Real | list[Unknown] | dict[Unknown, Unknown], fmt: OutputFormat | str | None) -> str
info: Overload implementation defined here
   --> charmcraft/utils/cli.py:196:5
    |
196 | def format_content(content, fmt=None):
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
197 |     """Format command output."""
198 |     if not isinstance(fmt, OutputFormat):
    |
info: rule `no-matching-overload` is enabled by default

Found 151 diagnostics

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Dec 8, 2025

Type checking with ty failed. This is a notification only and does not require action.

Command output
warning[possibly-missing-attribute]: Attribute `bases` may be missing on object of type `PlatformCharm | BasesCharm`
   --> charmcraft/application/commands/lifecycle.py:119:36
    |
118 |         msg = "Bases index '{}' is invalid (must be >= 0 and fit in configured bases)."
119 |         len_configured_bases = len(project.bases)
    |                                    ^^^^^^^^^^^^^
120 |         for bases_index in bases_indices:
121 |             if bases_index < 0:
    |
info: rule `possibly-missing-attribute` is enabled by default

error[unresolved-attribute]: Object of type `AppService | type[AppService]` has no attribute `get_credentials`
   --> charmcraft/application/commands/store.py:210:27
    |
209 |         if parsed_args.export:
210 |             credentials = self._services.store.get_credentials(
    |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
211 |                 packages=packages, **kwargs
212 |             )
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `AppService | type[AppService]` has no attribute `login`
   --> charmcraft/application/commands/store.py:218:13
    |
216 |             )
217 |         else:
218 |             self._services.store.login(packages=packages, **kwargs)
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^
219 |             username = self._services.store.get_account_info()["username"]
220 |             emit.message(f"Logged in as {username!r}.")
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `AppService | type[AppService]` has no attribute `get_account_info`
   --> charmcraft/application/commands/store.py:219:24
    |
217 |         else:
218 |             self._services.store.login(packages=packages, **kwargs)
219 |             username = self._services.store.get_account_info()["username"]
    |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
220 |             emit.message(f"Logged in as {username!r}.")
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `AppService | type[AppService]` has no attribute `logout`
   --> charmcraft/application/commands/store.py:244:13
    |
242 |         """Run the command."""
243 |         try:
244 |             self._services.store.logout()
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
245 |             emit.message("Charmhub token cleared.")
246 |         except CredentialsUnavailable:
    |
info: rule `unresolved-attribute` is enabled by default

error[not-iterable]: Object of type `IO[str] | None` may not be iterable
   --> charmcraft/charm_builder.py:423:17
    |
422 |     # https://github.com/microsoft/pylance-release/issues/2385
423 |     for line in proc.stdout:  # pyright: ignore[reportOptionalIterable]
    |                 ^^^^^^^^^^^
424 |         print(f"   :: {line.rstrip()}")
425 |     retcode = proc.wait()
    |
info: It may not have an `__iter__` method and it doesn't have a `__getitem__` method
info: rule `not-iterable` is enabled by default

warning[possibly-missing-attribute]: Attribute `split` may be missing on object of type `str | None`
   --> charmcraft/linters.py:238:23
    |
236 |                     yield name.name.split(".")
237 |             elif isinstance(node, ast.ImportFrom):
238 |                 yield node.module.split(".")
    |                       ^^^^^^^^^^^^^^^^^
239 |
240 |     def _check_operator(self, basedir: pathlib.Path) -> bool:
    |
info: rule `possibly-missing-attribute` is enabled by default

error[invalid-argument-type]: Argument to function `quote` is incorrect
   --> charmcraft/parts/plugins/_charm.py:289:42
    |
287 |             build_cmd.extend(self._get_legacy_dependencies_parameters())
288 |
289 |         commands = [" ".join(shlex.quote(i) for i in build_cmd)]
    |                                          ^ Expected `str`, found `Unknown | str | None`
290 |
291 |         # hook a callback after the BUILD happened (to collect metrics left by charm builder)
    |
info: Element `None` of this union is not assignable to `str`
info: Function defined here
  --> stdlib/shlex.pyi:34:5
   |
32 |     """Return a shell-escaped string from *split_command*."""
33 |
34 | def quote(s: str) -> str:
   |     ^^^^^ ------ Parameter declared here
35 |     """Return a shell-escaped version of the string *s*."""
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `merge_from` is incorrect
   --> charmcraft/parts/plugins/_charm.py:341:28
    |
339 |     def post_build_callback(self, step_info):
340 |         """Collect metrics left by charm_builder.py."""
341 |         instrum.merge_from(env.get_charm_builder_metrics_path())
    |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str`, found `Path`
342 |
343 |     def _get_os_special_priority_paths(self) -> str | None:
    |
info: Method defined here
  --> charmcraft/instrum.py:77:9
   |
75 |             json.dump(measurements, fh, indent=4)
76 |
77 |     def merge_from(self, filename: str) -> None:
   |         ^^^^^^^^^^       ------------- Parameter declared here
78 |         """Merge measurements from a file to the current ongoing structure."""
79 |         with open(filename) as fh:
   |
info: rule `invalid-argument-type` is enabled by default

warning[possibly-missing-attribute]: Attribute `login` may be missing on object of type `Unknown | Client | AnonymousClient`
   --> charmcraft/store/store.py:227:27
    |
226 |         try:
227 |             credentials = self._client.login(**kwargs)
    |                           ^^^^^^^^^^^^^^^^^^
228 |         except CredentialsAlreadyAvailable as exc:
229 |             raise CraftError(
    |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `logout` may be missing on object of type `Unknown | Client | AnonymousClient`
   --> charmcraft/store/store.py:241:9
    |
239 |         There's no action really in the Store to logout, we just remove local credentials.
240 |         """
241 |         self._client.logout()
    |         ^^^^^^^^^^^^^^^^^^^
242 |
243 |     @_store_client_wrapper(auto_login=False)
    |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `whoami` may be missing on object of type `Unknown | Client | AnonymousClient`
   --> charmcraft/store/store.py:246:20
    |
244 |     def whoami(self):
245 |         """Return authenticated user details."""
246 |         response = self._client.whoami()
    |                    ^^^^^^^^^^^^^^^^^^^
247 |
248 |         acc = response["account"]
    |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `whoami` may be missing on object of type `Unknown | Client | AnonymousClient`
   --> charmcraft/store/store.py:268:9
    |
266 |     def _check_authorized(self) -> None:
267 |         """Check if current credentials authenticated."""
268 |         self._client.whoami()
    |         ^^^^^^^^^^^^^^^^^^^
269 |
270 |     @_store_client_wrapper()
    |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `unregister_name` may be missing on object of type `Unknown | Client | AnonymousClient`
   --> charmcraft/store/store.py:285:9
    |
283 |         :raises: error messages from craft-store
284 |         """
285 |         self._client.unregister_name(name)
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
286 |
287 |     @_store_client_wrapper()
    |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `push_file` may be missing on object of type `Unknown | Client | AnonymousClient`
   --> charmcraft/store/store.py:311:21
    |
309 |         self._check_authorized()
310 |
311 |         upload_id = self._client.push_file(filepath)
    |                     ^^^^^^^^^^^^^^^^^^^^^^
312 |         payload = {"upload-id": upload_id}
313 |         if extra_fields is not None:
    |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `list_resource_revisions` may be missing on object of type `Unknown | Client | AnonymousClient`
   --> charmcraft/store/store.py:506:16
    |
504 |     ) -> list[CharmResourceRevision]:
505 |         """Return revisions for the indicated charm resource."""
506 |         return self._client.list_resource_revisions(charm_name, resource_name)
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
507 |
508 |     @_store_client_wrapper()
    |
info: rule `possibly-missing-attribute` is enabled by default

error[invalid-argument-type]: Argument to function `__new__` is incorrect
   --> docs/conf.py:242:38
    |
240 | # Setup libraries documentation snippets for use in charmcraft docs.
241 | common_docs_path = pathlib.Path(__file__).parent / "common"
242 | craft_parts_docs_path = pathlib.Path(craft_parts_docs.__file__).parent / "craft-parts"
    |                                      ^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str | PathLike[str]`, found `str | None`
243 | (common_docs_path / "craft-parts").unlink(missing_ok=True)
244 | (common_docs_path / "craft-parts").symlink_to(craft_parts_docs_path, target_is_directory=True)
    |
info: Element `None` of this union is not assignable to `str | PathLike[str]`
info: Function defined here
   --> stdlib/pathlib/__init__.pyi:299:13
    |
297 |         def __new__(cls, *args: StrPath, **kwargs: Unused) -> Self: ...  # pyright: ignore[reportInconsistentConstructor]
298 |     else:
299 |         def __new__(cls, *args: StrPath, **kwargs: Unused) -> Self: ...
    |             ^^^^^^^      -------------- Parameter declared here
300 |
301 |     @classmethod
    |
info: rule `invalid-argument-type` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> docs/howto/code/custom-action-clearsession/clearsession_action_charm.py:10:8
   |
 8 | import typing
 9 |
10 | import ops
   |        ^^^
11 |
12 | import paas_charm.django
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `paas_charm.django`
  --> docs/howto/code/custom-action-clearsession/clearsession_action_charm.py:12:8
   |
10 | import ops
11 |
12 | import paas_charm.django
   |        ^^^^^^^^^^^^^^^^^
13 |
14 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `flask`
 --> docs/howto/code/custom-action-updatelogfile/app.py:3:8
  |
1 | # initial hello world Flask app
2 |
3 | import flask
  |        ^^^^^
4 |
5 | app = flask.Flask(__name__)
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> docs/howto/code/custom-action-updatelogfile/updatelogfile_action_charm.py:10:8
   |
 8 | import typing
 9 |
10 | import ops
   |        ^^^
11 |
12 | import paas_charm.flask
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `paas_charm.flask`
  --> docs/howto/code/custom-action-updatelogfile/updatelogfile_action_charm.py:12:8
   |
10 | import ops
11 |
12 | import paas_charm.flask
   |        ^^^^^^^^^^^^^^^^
13 |
14 | import requests
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `flask`
 --> docs/howto/code/flask-async/app.py:3:8
  |
1 | from time import sleep
2 |
3 | import flask
  |        ^^^^^
4 |
5 | app = flask.Flask(__name__)
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `django.contrib`
  --> docs/tutorial/code/django/urls_django_hello_world.py:17:6
   |
15 |     2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
16 | """
17 | from django.contrib import admin
   |      ^^^^^^^^^^^^^^
18 | from django.urls import include, path
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `django.urls`
  --> docs/tutorial/code/django/urls_django_hello_world.py:18:6
   |
16 | """
17 | from django.contrib import admin
18 | from django.urls import include, path
   |      ^^^^^^^^^^^
19 |
20 | urlpatterns = [
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `django.urls`
 --> docs/tutorial/code/django/urls_greeting.py:1:6
  |
1 | from django.urls import path
  |      ^^^^^^^^^^^
2 |
3 | from . import views
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Module `docs.tutorial.code.django` has no member `views`
 --> docs/tutorial/code/django/urls_greeting.py:3:15
  |
1 | from django.urls import path
2 |
3 | from . import views
  |               ^^^^^
4 |
5 | urlpatterns = [
  |
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `django.http`
 --> docs/tutorial/code/django/views_greeting.py:1:6
  |
1 | from django.http import HttpResponse
  |      ^^^^^^^^^^^
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `django.http`
 --> docs/tutorial/code/django/views_greeting_configuration.py:3:6
  |
1 | import os
2 |
3 | from django.http import HttpResponse
  |      ^^^^^^^^^^^
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `fastapi`
 --> docs/tutorial/code/fastapi/app.py:1:6
  |
1 | from fastapi import FastAPI
  |      ^^^^^^^
2 |
3 | app = FastAPI()
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `fastapi`
 --> docs/tutorial/code/fastapi/greeting_app.py:3:6
  |
1 | import os
2 |
3 | from fastapi import FastAPI
  |      ^^^^^^^
4 |
5 | app = FastAPI()
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `fastapi`
 --> docs/tutorial/code/fastapi/visitors_app.py:7:6
  |
5 | from typing import Annotated
6 |
7 | from fastapi import FastAPI, Header
  |      ^^^^^^^
8 | import psycopg2
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `psycopg2`
  --> docs/tutorial/code/fastapi/visitors_app.py:8:8
   |
 7 | from fastapi import FastAPI, Header
 8 | import psycopg2
   |        ^^^^^^^^
 9 |
10 | app = FastAPI()
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `psycopg2`
 --> docs/tutorial/code/fastapi/visitors_migrate.py:5:8
  |
3 | import os
4 |
5 | import psycopg2
  |        ^^^^^^^^
6 |
7 | DATABASE_URI = os.environ["POSTGRESQL_DB_CONNECT_STRING"]
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `flask`
 --> docs/tutorial/code/flask/app.py:3:8
  |
1 | # initial hello world Flask app
2 |
3 | import flask
  |        ^^^^^
4 |
5 | app = flask.Flask(__name__)
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `flask`
 --> docs/tutorial/code/flask/greeting_app.py:3:8
  |
1 | # Flask app with a greeting configuration
2 |
3 | import flask
  |        ^^^^^
4 |
5 | app = flask.Flask(__name__)
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `flask`
 --> docs/tutorial/code/flask/visitors_app.py:6:8
  |
4 | import os
5 |
6 | import flask
  |        ^^^^^
7 | import psycopg2
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `psycopg2`
 --> docs/tutorial/code/flask/visitors_app.py:7:8
  |
6 | import flask
7 | import psycopg2
  |        ^^^^^^^^
8 |
9 | app = flask.Flask(__name__)
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `psycopg2`
 --> docs/tutorial/code/flask/visitors_migrate.py:5:8
  |
3 | import os
4 |
5 | import psycopg2
  |        ^^^^^^^^
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `list[ResponseCharmResourceBase]`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `datetime`, and 2 more union elements, are not assignable to `list[ResponseCharmResourceBase]`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `datetime`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `datetime`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `str`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `str`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `int`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `int`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `str`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `str`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `str`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `str`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `str`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `str`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `str`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `str`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `ByteSize`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 3 more union elements, are not assignable to `ByteSize`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `str`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `str`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `datetime | None`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `datetime | None`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/__init__.py:36:65
   |
34 |     }
35 |     data.update(kwargs)
36 |     return models.resource_revision_model.CharmResourceRevision(**data)
   |                                                                 ^^^^^^ Expected `str | None`, found `Unknown | list[Unknown] | datetime | str | int`
   |
info: Union element `list[Unknown]`, and 2 more union elements, are not assignable to `str | None`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
    --> tests/commands/test_store_api.py:1628:13
     |
1626 |     expected = {
1627 |         (test_lib_id, test_api): Library(
1628 |             api=test_api,
     |             ^^^^^^^^^^^^ Expected `int`, found `Literal["test-api-version"]`
1629 |             content=test_content,
1630 |             content_hash=test_hash,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
    --> tests/commands/test_store_api.py:1634:13
     |
1632 |             lib_name=test_lib_name,
1633 |             charm_name=test_charm_name,
1634 |             patch=test_patch,
     |             ^^^^^^^^^^^^^^^^ Expected `int`, found `Literal["test-patch-version"]`
1635 |         ),
1636 |     }
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
    --> tests/commands/test_store_api.py:1718:13
     |
1716 |     expected = {
1717 |         (test_lib_id_1, test_api_1): Library(
1718 |             api=test_api_1,
     |             ^^^^^^^^^^^^^^ Expected `int`, found `Literal["test-api-version-1"]`
1719 |             content=test_content_1,
1720 |             content_hash=test_hash_1,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
    --> tests/commands/test_store_api.py:1724:13
     |
1722 |             lib_name=test_lib_name_1,
1723 |             charm_name=test_charm_name_1,
1724 |             patch=test_patch_1,
     |             ^^^^^^^^^^^^^^^^^^ Expected `int`, found `Literal["test-patch-version-1"]`
1725 |         ),
1726 |         (test_lib_id_2, test_api_2): Library(
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
    --> tests/commands/test_store_api.py:1727:13
     |
1725 |         ),
1726 |         (test_lib_id_2, test_api_2): Library(
1727 |             api=test_api_2,
     |             ^^^^^^^^^^^^^^ Expected `int`, found `Literal["test-api-version-2"]`
1728 |             content=test_content_2,
1729 |             content_hash=test_hash_2,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
    --> tests/commands/test_store_api.py:1733:13
     |
1731 |             lib_name=test_lib_name_2,
1732 |             charm_name=test_charm_name_2,
1733 |             patch=test_patch_2,
     |             ^^^^^^^^^^^^^^^^^^ Expected `int`, found `Literal["test-patch-version-2"]`
1734 |         ),
1735 |     }
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-method-override]: Invalid override of method `json`
   --> tests/commands/test_store_client.py:77:9
    |
 75 |           return self.status_code == 200
 76 |
 77 |       def json(self):
    |           ^^^^^^^^^^ Definition is incompatible with `Response.json`
 78 |           try:
 79 |               return json.loads(self._content)  # type: ignore
    |
   ::: .venv/lib/python3.12/site-packages/requests-stubs/models.pyi:155:9
    |
153 |       @property
154 |       def text(self) -> str: ...
155 |       def json(
    |  _________-
156 | |         self,
157 | |         *,
158 | |         cls: type[JSONDecoder] | None = ...,
159 | |         object_hook: Callable[[dict[Any, Any]], Any] | None = ...,
160 | |         parse_float: Callable[[str], Any] | None = ...,
161 | |         parse_int: Callable[[str], Any] | None = ...,
162 | |         parse_constant: Callable[[str], Any] | None = ...,
163 | |         object_pairs_hook: Callable[[list[tuple[Any, Any]]], Any] | None = ...,
164 | |         **kwds: Any,
165 | |     ) -> Any: ...
    | |____________- `Response.json` defined here
166 |       @property
167 |       def links(self) -> dict[Incomplete, Incomplete]: ...
    |
info: This violates the Liskov Substitution Principle
info: rule `invalid-method-override` is enabled by default

error[missing-argument]: No argument provided for required parameter `cls`
   --> tests/conftest.py:146:14
    |
145 |     if request.param == "bases":
146 |         with pytest.MonkeyPatch.context() as monkeypatch:
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
147 |             # Add the current system to legacy bases so we can test legacy bases.
148 |             monkeypatch.setattr(const, "LEGACY_BASES", (*const.LEGACY_BASES, base_str))
    |
info: Union variant `(cls) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((cls) -> _GeneratorContextManager[Unknown, None, None]) | ((cls) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `missing-argument` is enabled by default

error[missing-argument]: No argument provided for required parameter `cls`
   --> tests/conftest.py:146:14
    |
145 |     if request.param == "bases":
146 |         with pytest.MonkeyPatch.context() as monkeypatch:
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
147 |             # Add the current system to legacy bases so we can test legacy bases.
148 |             monkeypatch.setattr(const, "LEGACY_BASES", (*const.LEGACY_BASES, base_str))
    |
info: Union variant `(cls) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((cls) -> _GeneratorContextManager[Unknown, None, None]) | ((cls) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `missing-argument` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/conftest.py:226:9
    |
224 |         build_base=craft_platforms.DistroBase("ubuntu", "22.04"),
225 |         build_on=arch,
226 |         build_for="arm64",
    |         ^^^^^^^^^^^^^^^^^ Expected `DebianArchitecture | Literal["all"]`, found `Literal["arm64"]`
227 |         platform="distro-1-test64",
228 |     )
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-method-override]: Invalid override of method `get_supported_bases`
  --> tests/extensions/test_extensions.py:33:9
   |
32 |     @classmethod
33 |     def get_supported_bases(cls) -> list[tuple[str, ...]]:
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Definition is incompatible with `Extension.get_supported_bases`
34 |         """Return a list of tuple of supported bases."""
35 |         return cls.bases
   |
  ::: charmcraft/extensions/extension.py:52:9
   |
50 |     @staticmethod
51 |     @abc.abstractmethod
52 |     def get_supported_bases() -> list[tuple[str, str]]:
   |         ---------------------------------------------- `Extension.get_supported_bases` defined here
53 |         """Return a list of tuple of supported bases."""
   |
info: `FakeExtension.get_supported_bases` is a classmethod but `Extension.get_supported_bases` is a staticmethod
info: This violates the Liskov Substitution Principle
info: rule `invalid-method-override` is enabled by default

error[invalid-method-override]: Invalid override of method `is_experimental`
  --> tests/extensions/test_extensions.py:38:9
   |
37 |     @staticmethod
38 |     def is_experimental(_base: tuple[str, ...] | None) -> bool:
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Definition is incompatible with `Extension.is_experimental`
39 |         """Return whether or not this extension is unstable for given base."""
40 |         return False
   |
  ::: charmcraft/extensions/extension.py:57:9
   |
55 |     @staticmethod
56 |     @abc.abstractmethod
57 |     def is_experimental(base: tuple[str, str] | None) -> bool:
   |         ----------------------------------------------------- `Extension.is_experimental` defined here
58 |         """Return whether or not this extension is unstable for given base."""
   |
info: This violates the Liskov Substitution Principle
info: rule `invalid-method-override` is enabled by default

error[invalid-method-override]: Invalid override of method `is_experimental`
  --> tests/extensions/test_extensions.py:62:9
   |
61 |     @staticmethod
62 |     def is_experimental(_base: str | None) -> bool:
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Definition is incompatible with `FakeExtension.is_experimental`
63 |         return True
   |
  ::: tests/extensions/test_extensions.py:38:9
   |
37 |     @staticmethod
38 |     def is_experimental(_base: tuple[str, ...] | None) -> bool:
   |         ------------------------------------------------------ `FakeExtension.is_experimental` defined here
39 |         """Return whether or not this extension is unstable for given base."""
40 |         return False
   |
info: This violates the Liskov Substitution Principle
info: rule `invalid-method-override` is enabled by default

error[invalid-method-override]: Invalid override of method `is_experimental`
  --> tests/extensions/test_registry.py:34:9
   |
33 |     @staticmethod
34 |     def is_experimental(_base: tuple[str, str] | None) -> bool:
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Definition is incompatible with `Extension.is_experimental`
35 |         return False
   |
  ::: charmcraft/extensions/extension.py:57:9
   |
55 |     @staticmethod
56 |     @abc.abstractmethod
57 |     def is_experimental(base: tuple[str, str] | None) -> bool:
   |         ----------------------------------------------------- `Extension.is_experimental` defined here
58 |         """Return whether or not this extension is unstable for given base."""
   |
info: This violates the Liskov Substitution Principle
info: rule `invalid-method-override` is enabled by default

warning[possibly-missing-attribute]: Submodule `application` may not be available as an attribute on module `charmcraft`
  --> tests/integration/commands/test_init.py:75:17
   |
73 | def init_command():
74 |     return init.InitCommand(
75 |         {"app": charmcraft.application.APP_METADATA, "services": None}
   |                 ^^^^^^^^^^^^^^^^^^^^^^
76 |     )
   |
help: Consider explicitly importing `charmcraft.application`
info: rule `possibly-missing-attribute` is enabled by default

error[unresolved-attribute]: Object of type `RecordingEmitter` has no attribute `assert_json_output`
   --> tests/integration/commands/test_store_commands.py:225:9
    |
223 |             },
224 |         ]
225 |         emitter.assert_json_output(  # pyright: ignore[reportAttributeAccessIssue]
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^
226 |             expected
227 |         )
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Unresolved attribute `client` on type `AppService`.
  --> tests/integration/conftest.py:45:5
   |
43 |     services.register_services()
44 |     factory = craft_application.ServiceFactory(app=application.APP_METADATA)
45 |     factory.get("store").client = mock.Mock(spec_set=craft_store.StoreClient)  # pyright: ignore[reportAttributeAccessIssue]
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
46 |     factory.update_kwargs(
47 |         "charm_libs",
   |
info: rule `unresolved-attribute` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
  --> tests/integration/services/test_image.py:28:9
   |
26 |     service = ImageService(
27 |         app=application.APP_METADATA,
28 |         services=None,  # pyright: ignore[reportArgumentType]
   |         ^^^^^^^^^^^^^ Expected `ServiceFactory`, found `None`
29 |     )
30 |     service.setup()
   |
info: Method defined here
  --> .venv/lib/python3.12/site-packages/craft_application/services/base.py:44:9
   |
42 |     """
43 |
44 |     def __init__(self, app: AppMetadata, services: ServiceFactory) -> None:
   |         ^^^^^^^^                         ------------------------ Parameter declared here
45 |         self._app = app
46 |         self._services = services
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/integration/services/test_lifecycle.py:40:17
   |
38 |                 platform="something",
39 |                 build_on=craft_platforms.DebianArchitecture.from_host(),
40 |                 build_for="invalid",  # pyright: ignore[reportArgumentType]
   |                 ^^^^^^^^^^^^^^^^^^^ Expected `DebianArchitecture | Literal["all"]`, found `Literal["invalid"]`
41 |                 build_base=craft_platforms.DistroBase(distro.id(), distro.version()),
42 |             )
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/integration/services/test_lifecycle.py:88:17
   |
86 |                 platform="something",
87 |                 build_on=host_arch,
88 |                 build_for=f"{foreign_arch}-{host_arch}",  # pyright: ignore[reportArgumentType]
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `DebianArchitecture | Literal["all"]`, found `str`
89 |                 build_base=craft_platforms.DistroBase(distro.id(), distro.version()),
90 |             )
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/integration/services/test_provider.py:56:28
   |
54 |     assert not lock_file.exists()
55 |
56 |     with provider.instance(**provider_kwargs):
   |                            ^^^^^^^^^^^^^^^^^ Expected `BuildInfo`, found `Unknown | BuildInfo | Path`
57 |         # Test that the cache lock gets created
58 |         assert lock_file.is_file()
   |
info: Element `Path` of this union is not assignable to `BuildInfo`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/integration/services/test_provider.py:56:28
   |
54 |     assert not lock_file.exists()
55 |
56 |     with provider.instance(**provider_kwargs):
   |                            ^^^^^^^^^^^^^^^^^ Expected `Path`, found `Unknown | BuildInfo | Path`
57 |         # Test that the cache lock gets created
58 |         assert lock_file.is_file()
   |
info: Element `BuildInfo` of this union is not assignable to `Path`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/integration/services/test_provider.py:56:28
   |
54 |     assert not lock_file.exists()
55 |
56 |     with provider.instance(**provider_kwargs):
   |                            ^^^^^^^^^^^^^^^^^ Expected `bool`, found `Unknown | BuildInfo | Path`
57 |         # Test that the cache lock gets created
58 |         assert lock_file.is_file()
   |
info: Union elements `BuildInfo` and `Path` are not assignable to `bool`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/integration/services/test_provider.py:56:28
   |
54 |     assert not lock_file.exists()
55 |
56 |     with provider.instance(**provider_kwargs):
   |                            ^^^^^^^^^^^^^^^^^ Expected `bool`, found `Unknown | BuildInfo | Path`
57 |         # Test that the cache lock gets created
58 |         assert lock_file.is_file()
   |
info: Union elements `BuildInfo` and `Path` are not assignable to `bool`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/integration/services/test_provider.py:56:28
   |
54 |     assert not lock_file.exists()
55 |
56 |     with provider.instance(**provider_kwargs):
   |                            ^^^^^^^^^^^^^^^^^ Expected `bool`, found `Unknown | BuildInfo | Path`
57 |         # Test that the cache lock gets created
58 |         assert lock_file.is_file()
   |
info: Union elements `BuildInfo` and `Path` are not assignable to `bool`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/integration/services/test_provider.py:56:28
   |
54 |     assert not lock_file.exists()
55 |
56 |     with provider.instance(**provider_kwargs):
   |                            ^^^^^^^^^^^^^^^^^ Expected `str | None`, found `Unknown | BuildInfo | Path`
57 |         # Test that the cache lock gets created
58 |         assert lock_file.is_file()
   |
info: Union elements `BuildInfo` and `Path` are not assignable to `str | None`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/integration/services/test_provider.py:56:28
   |
54 |     assert not lock_file.exists()
55 |
56 |     with provider.instance(**provider_kwargs):
   |                            ^^^^^^^^^^^^^^^^^ Expected `((Executor, /) -> None) | None`, found `Unknown | BuildInfo | Path`
57 |         # Test that the cache lock gets created
58 |         assert lock_file.is_file()
   |
info: Union elements `BuildInfo` and `Path` are not assignable to `((Executor, /) -> None) | None`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/integration/services/test_provider.py:56:28
   |
54 |     assert not lock_file.exists()
55 |
56 |     with provider.instance(**provider_kwargs):
   |                            ^^^^^^^^^^^^^^^^^ Expected `bool | str | None`, found `Unknown | BuildInfo | Path`
57 |         # Test that the cache lock gets created
58 |         assert lock_file.is_file()
   |
info: Union elements `BuildInfo` and `Path` are not assignable to `bool | str | None`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:101:28
    |
 99 |     }
100 |
101 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `BuildInfo`, found `Unknown | BuildInfo | Path`
102 |         # Create a file in the cache and ensure it's not visible in the outer fs
103 |         instance.execute_run(["touch", "/root/.cache/cache_cached"])
    |
info: Element `Path` of this union is not assignable to `BuildInfo`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:101:28
    |
 99 |     }
100 |
101 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `Path`, found `Unknown | BuildInfo | Path`
102 |         # Create a file in the cache and ensure it's not visible in the outer fs
103 |         instance.execute_run(["touch", "/root/.cache/cache_cached"])
    |
info: Element `BuildInfo` of this union is not assignable to `Path`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:101:28
    |
 99 |     }
100 |
101 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `bool`, found `Unknown | BuildInfo | Path`
102 |         # Create a file in the cache and ensure it's not visible in the outer fs
103 |         instance.execute_run(["touch", "/root/.cache/cache_cached"])
    |
info: Union elements `BuildInfo` and `Path` are not assignable to `bool`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:101:28
    |
 99 |     }
100 |
101 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `bool`, found `Unknown | BuildInfo | Path`
102 |         # Create a file in the cache and ensure it's not visible in the outer fs
103 |         instance.execute_run(["touch", "/root/.cache/cache_cached"])
    |
info: Union elements `BuildInfo` and `Path` are not assignable to `bool`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:101:28
    |
 99 |     }
100 |
101 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `bool`, found `Unknown | BuildInfo | Path`
102 |         # Create a file in the cache and ensure it's not visible in the outer fs
103 |         instance.execute_run(["touch", "/root/.cache/cache_cached"])
    |
info: Union elements `BuildInfo` and `Path` are not assignable to `bool`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:101:28
    |
 99 |     }
100 |
101 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `str | None`, found `Unknown | BuildInfo | Path`
102 |         # Create a file in the cache and ensure it's not visible in the outer fs
103 |         instance.execute_run(["touch", "/root/.cache/cache_cached"])
    |
info: Union elements `BuildInfo` and `Path` are not assignable to `str | None`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:101:28
    |
 99 |     }
100 |
101 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `((Executor, /) -> None) | None`, found `Unknown | BuildInfo | Path`
102 |         # Create a file in the cache and ensure it's not visible in the outer fs
103 |         instance.execute_run(["touch", "/root/.cache/cache_cached"])
    |
info: Union elements `BuildInfo` and `Path` are not assignable to `((Executor, /) -> None) | None`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:101:28
    |
 99 |     }
100 |
101 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `bool | str | None`, found `Unknown | BuildInfo | Path`
102 |         # Create a file in the cache and ensure it's not visible in the outer fs
103 |         instance.execute_run(["touch", "/root/.cache/cache_cached"])
    |
info: Union elements `BuildInfo` and `Path` are not assignable to `bool | str | None`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:134:28
    |
132 |         "cache_path": cache_path,
133 |     }
134 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `BuildInfo`, found `Unknown | BuildInfo | Path`
135 |         instance.execute_run(["test", "-d", "/root/.cache"], check=True)
136 |         instance.execute_run(
    |
info: Element `Path` of this union is not assignable to `BuildInfo`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:134:28
    |
132 |         "cache_path": cache_path,
133 |     }
134 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `Path`, found `Unknown | BuildInfo | Path`
135 |         instance.execute_run(["test", "-d", "/root/.cache"], check=True)
136 |         instance.execute_run(
    |
info: Element `BuildInfo` of this union is not assignable to `Path`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:134:28
    |
132 |         "cache_path": cache_path,
133 |     }
134 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `bool`, found `Unknown | BuildInfo | Path`
135 |         instance.execute_run(["test", "-d", "/root/.cache"], check=True)
136 |         instance.execute_run(
    |
info: Union elements `BuildInfo` and `Path` are not assignable to `bool`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:134:28
    |
132 |         "cache_path": cache_path,
133 |     }
134 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `bool`, found `Unknown | BuildInfo | Path`
135 |         instance.execute_run(["test", "-d", "/root/.cache"], check=True)
136 |         instance.execute_run(
    |
info: Union elements `BuildInfo` and `Path` are not assignable to `bool`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:134:28
    |
132 |         "cache_path": cache_path,
133 |     }
134 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `bool`, found `Unknown | BuildInfo | Path`
135 |         instance.execute_run(["test", "-d", "/root/.cache"], check=True)
136 |         instance.execute_run(
    |
info: Union elements `BuildInfo` and `Path` are not assignable to `bool`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:134:28
    |
132 |         "cache_path": cache_path,
133 |     }
134 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `str | None`, found `Unknown | BuildInfo | Path`
135 |         instance.execute_run(["test", "-d", "/root/.cache"], check=True)
136 |         instance.execute_run(
    |
info: Union elements `BuildInfo` and `Path` are not assignable to `str | None`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:134:28
    |
132 |         "cache_path": cache_path,
133 |     }
134 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `((Executor, /) -> None) | None`, found `Unknown | BuildInfo | Path`
135 |         instance.execute_run(["test", "-d", "/root/.cache"], check=True)
136 |         instance.execute_run(
    |
info: Union elements `BuildInfo` and `Path` are not assignable to `((Executor, /) -> None) | None`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/integration/services/test_provider.py:134:28
    |
132 |         "cache_path": cache_path,
133 |     }
134 |     with provider.instance(**provider_kwargs) as instance:
    |                            ^^^^^^^^^^^^^^^^^ Expected `bool | str | None`, found `Unknown | BuildInfo | Path`
135 |         instance.execute_run(["test", "-d", "/root/.cache"], check=True)
136 |         instance.execute_run(
    |
info: Union elements `BuildInfo` and `Path` are not assignable to `bool | str | None`
info: Union variant `(build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]` is incompatible with this call site
info: Attempted to call union type `((build_info: BuildInfo, *, work_dir: Path, allow_unstable: bool = Literal[True], clean_existing: bool = Literal[False], use_base_instance: bool = Literal[True], project_name: str | None = None, prepare_instance: ((Executor, /) -> None) | None = None, **kwargs: bool | str | None) -> _GeneratorContextManager[Unknown, None, None]) | ((build_info: Divergent, *, work_dir: Divergent, allow_unstable: Divergent = Divergent, clean_existing: Divergent = Divergent, use_base_instance: Divergent = Divergent, project_name: Divergent = Divergent, prepare_instance: Divergent = Divergent, **kwargs: Divergent) -> _GeneratorContextManager[Unknown, None, None])`
info: rule `invalid-argument-type` is enabled by default

error[unresolved-import]: Cannot resolve imported module `charm`
  --> tests/spread/commands/init-extensions/tests/unit/test_charm.py:9:8
   |
 7 | import pathlib
 8 |
 9 | import charm
   |        ^^^^^
10 | import scenario
11 | import scenario.errors
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `scenario`
  --> tests/spread/commands/init-extensions/tests/unit/test_charm.py:10:8
   |
 9 | import charm
10 | import scenario
   |        ^^^^^^^^
11 | import scenario.errors
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `scenario.errors`
  --> tests/spread/commands/init-extensions/tests/unit/test_charm.py:11:8
   |
 9 | import charm
10 | import scenario
11 | import scenario.errors
   |        ^^^^^^^^^^^^^^^
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/dependencies/setuptools-scm-python/src/charm.py:9:8
   |
 7 | import logging
 8 |
 9 | import ops
   |        ^^^
10 |
11 | # A standalone module for workload-specific logic (no charming concerns):
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `setuptools_scm_python`
  --> tests/spread/dependencies/setuptools-scm-python/src/charm.py:12:8
   |
11 | # A standalone module for workload-specific logic (no charming concerns):
12 | import setuptools_scm_python
   |        ^^^^^^^^^^^^^^^^^^^^^
13 |
14 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/dependencies/strict-dependencies-errors/extra-binary-packages/src/charm.py:17:8
   |
15 | import logging
16 |
17 | import ops
   |        ^^^
18 |
19 | # Log messages can be retrieved using juju debug-log
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/dependencies/strict-dependencies-errors/extra-packages/src/charm.py:17:8
   |
15 | import logging
16 |
17 | import ops
   |        ^^^
18 |
19 | # Log messages can be retrieved using juju debug-log
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/dependencies/strict-dependencies-errors/missing-packages/src/charm.py:17:8
   |
15 | import logging
16 |
17 | import ops
   |        ^^^
18 |
19 | # Log messages can be retrieved using juju debug-log
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/dependencies/strict-dependencies-errors/no-requirements/src/charm.py:17:8
   |
15 | import logging
16 |
17 | import ops
   |        ^^^
18 |
19 | # Log messages can be retrieved using juju debug-log
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/dependencies/strict-dependencies/charm/src/charm.py:17:8
   |
15 | import logging
16 |
17 | import ops
   |        ^^^
18 |
19 | # Log messages can be retrieved using juju debug-log
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `charms.reactive`
 --> tests/spread/smoketests/reactive/reactivecharm/reactive/reactivecharm.py:1:6
  |
1 | from charms.reactive import set_flag, when_not
  |      ^^^^^^^^^^^^^^^
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/ubuntu-20.04/charm/bases/src/charm.py:18:8
   |
16 | from typing import cast
17 |
18 | import ops
   |        ^^^
19 |
20 | # Log messages can be retrieved using juju debug-log
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/ubuntu-20.04/charm/platforms/src/charm.py:9:8
   |
 7 | import logging
 8 |
 9 | import ops
   |        ^^^
10 |
11 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/ubuntu-22.04/charm/bases/src/charm.py:18:8
   |
16 | from typing import cast
17 |
18 | import ops
   |        ^^^
19 |
20 | # Log messages can be retrieved using juju debug-log
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/ubuntu-22.04/charm/platforms/src/charm.py:9:8
   |
 7 | import logging
 8 |
 9 | import ops
   |        ^^^
10 |
11 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/ubuntu-24.04/charm/platforms/src/charm.py:9:8
   |
 7 | import logging
 8 |
 9 | import ops
   |        ^^^
10 |
11 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
 --> tests/spread/ubuntu-24.04/test-cmd/src/charm.py:6:8
  |
4 | import logging
5 |
6 | import ops
  |        ^^^
7 |
8 | # A standalone module for workload-specific logic (no charming concerns):
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `test_cmd`
  --> tests/spread/ubuntu-24.04/test-cmd/src/charm.py:9:8
   |
 8 | # A standalone module for workload-specific logic (no charming concerns):
 9 | import test_cmd
   |        ^^^^^^^^
10 |
11 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `pytest_operator.plugin`
 --> tests/spread/ubuntu-24.04/test-cmd/tests/integration/test_charm.py:7:6
  |
5 | import pytest
6 | import yaml
7 | from pytest_operator.plugin import OpsTest
  |      ^^^^^^^^^^^^^^^^^^^^^^
8 |
9 | logger = logging.getLogger(__name__)
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
 --> tests/spread/ubuntu-24.04/test-cmd/tests/unit/test_charm.py:2:6
  |
1 | import pytest
2 | from ops import testing
  |      ^^^
3 |
4 | from charm import TestCmdCharm
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `charm`
 --> tests/spread/ubuntu-24.04/test-cmd/tests/unit/test_charm.py:4:6
  |
2 | from ops import testing
3 |
4 | from charm import TestCmdCharm
  |      ^^^^^
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/ubuntu-25.10/charm/platforms/src/charm.py:9:8
   |
 7 | import logging
 8 |
 9 | import ops
   |        ^^^
10 |
11 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
 --> tests/spread/ubuntu-25.10/test-cmd/src/charm.py:6:8
  |
4 | import logging
5 |
6 | import ops
  |        ^^^
7 |
8 | # A standalone module for workload-specific logic (no charming concerns):
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `test_cmd`
  --> tests/spread/ubuntu-25.10/test-cmd/src/charm.py:9:8
   |
 8 | # A standalone module for workload-specific logic (no charming concerns):
 9 | import test_cmd
   |        ^^^^^^^^
10 |
11 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `pytest_operator.plugin`
 --> tests/spread/ubuntu-25.10/test-cmd/tests/integration/test_charm.py:7:6
  |
5 | import pytest
6 | import yaml
7 | from pytest_operator.plugin import OpsTest
  |      ^^^^^^^^^^^^^^^^^^^^^^
8 |
9 | logger = logging.getLogger(__name__)
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
 --> tests/spread/ubuntu-25.10/test-cmd/tests/unit/test_charm.py:2:6
  |
1 | import pytest
2 | from ops import testing
  |      ^^^
3 |
4 | from charm import TestCmdCharm
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `charm`
 --> tests/spread/ubuntu-25.10/test-cmd/tests/unit/test_charm.py:4:6
  |
2 | from ops import testing
3 |
4 | from charm import TestCmdCharm
  |      ^^^^^
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/ubuntu-26.04/charm/platforms/src/charm.py:9:8
   |
 7 | import logging
 8 |
 9 | import ops
   |        ^^^
10 |
11 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
 --> tests/spread/ubuntu-26.04/test-cmd/src/charm.py:6:8
  |
4 | import logging
5 |
6 | import ops
  |        ^^^
7 |
8 | # A standalone module for workload-specific logic (no charming concerns):
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `test_cmd`
  --> tests/spread/ubuntu-26.04/test-cmd/src/charm.py:9:8
   |
 8 | # A standalone module for workload-specific logic (no charming concerns):
 9 | import test_cmd
   |        ^^^^^^^^
10 |
11 | logger = logging.getLogger(__name__)
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `pytest_operator.plugin`
 --> tests/spread/ubuntu-26.04/test-cmd/tests/integration/test_charm.py:7:6
  |
5 | import pytest
6 | import yaml
7 | from pytest_operator.plugin import OpsTest
  |      ^^^^^^^^^^^^^^^^^^^^^^
8 |
9 | logger = logging.getLogger(__name__)
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
 --> tests/spread/ubuntu-26.04/test-cmd/tests/unit/test_charm.py:2:6
  |
1 | import pytest
2 | from ops import testing
  |      ^^^
3 |
4 | from charm import TestCmdCharm
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `charm`
 --> tests/spread/ubuntu-26.04/test-cmd/tests/unit/test_charm.py:4:6
  |
2 | from ops import testing
3 |
4 | from charm import TestCmdCharm
  |      ^^^^^
  |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/577/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/577/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
   --> tests/test_instrum.py:256:32
    |
254 |     assert measurements.measurements == {}
255 |
256 |     with Timer("test message", foo=42):
    |                                ^^^^^^ Expected `dict[str, Any]`, found `Literal[42]`
257 |         pass
    |
info: Method defined here
   --> charmcraft/instrum.py:129:9
    |
127 |     """
128 |
129 |     def __init__(self, msg: str, **extra_info: dict[str, Any]):
    |         ^^^^^^^^                 ---------------------------- Parameter declared here
130 |         self.msg = msg
131 |         self.extra_info = extra_info
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
   --> tests/test_instrum.py:274:28
    |
272 |     monkeypatch.setattr(instrum, "_measurements", measurements)
273 |
274 |     @Timer("test message", foo=42)
    |                            ^^^^^^ Expected `dict[str, Any]`, found `Literal[42]`
275 |     def test_function(a, b):
276 |         assert a == 17
    |
info: Method defined here
   --> charmcraft/instrum.py:129:9
    |
127 |     """
128 |
129 |     def __init__(self, msg: str, **extra_info: dict[str, Any]):
    |         ^^^^^^^^                 ---------------------------- Parameter declared here
130 |         self.msg = msg
131 |         self.extra_info = extra_info
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
   --> tests/test_instrum.py:298:32
    |
296 |     assert measurements.measurements == {}
297 |
298 |     with Timer("test message", foo=42) as timer:
    |                                ^^^^^^ Expected `dict[str, Any]`, found `Literal[42]`
299 |         timer.mark("middle 1")
300 |         timer.mark("middle 2")
    |
info: Method defined here
   --> charmcraft/instrum.py:129:9
    |
127 |     """
128 |
129 |     def __init__(self, msg: str, **extra_info: dict[str, Any]):
    |         ^^^^^^^^                 ---------------------------- Parameter declared here
130 |         self.msg = msg
131 |         self.extra_info = extra_info
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-assignment]: Implicit shadowing of function `write`
  --> tests/unit/commands/test_lifecycle.py:91:5
   |
90 |     libs_service = cast("CharmLibsService", service_factory.get("charm_libs"))
91 |     libs_service.write = mock.Mock(wraps=libs_service.write)
   |     ^^^^^^^^^^^^^^^^^^
92 |
93 |     pack._update_charm_libs()
   |
info: Annotate to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[unresolved-attribute]: Object of type `bound method CharmLibsService.write(library: Library) -> None` has no attribute `assert_called_once_with`
  --> tests/unit/commands/test_lifecycle.py:95:5
   |
93 |     pack._update_charm_libs()
94 |
95 |     libs_service.write.assert_called_once_with(store_lib)
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
96 |
97 |     with check():
   |
info: rule `unresolved-attribute` is enabled by default

error[non-subscriptable]: Cannot subscript object of type `None` with no `__getitem__` method
  --> tests/unit/models/test_config.py:75:23
   |
73 |     config = JujuConfig(options={"my-opt": option})
74 |
75 |     assert isinstance(config.options["my-opt"], type_)
   |                       ^^^^^^^^^^^^^^^^^^^^^^^^
   |
info: rule `non-subscriptable` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/unit/models/test_project.py:812:13
    |
810 |             description="",
811 |             base=base,
812 |             platforms={"amd64": None},
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `PlatformsDict`, found `dict[Unknown | str, Unknown | None]`
813 |             parts={"charm": {"plugin": "charm"}},
814 |         )
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `__new__` is incorrect
  --> tests/unit/parts/plugins/test_charm.py:97:22
   |
96 |     pip_constraint_file = (
97 |         pathlib.Path(parts.plugins.__file__).parent / "charm-constraints.txt"
   |                      ^^^^^^^^^^^^^^^^^^^^^^ Expected `str | PathLike[str]`, found `str | None`
98 |     )
   |
info: Element `None` of this union is not assignable to `str | PathLike[str]`
info: Function defined here
   --> stdlib/pathlib/__init__.pyi:299:13
    |
297 |         def __new__(cls, *args: StrPath, **kwargs: Unused) -> Self: ...  # pyright: ignore[reportInconsistentConstructor]
298 |     else:
299 |         def __new__(cls, *args: StrPath, **kwargs: Unused) -> Self: ...
    |             ^^^^^^^      -------------- Parameter declared here
300 |
301 |     @classmethod
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-assignment]: Implicit shadowing of function `_get_pip`
  --> tests/unit/parts/plugins/test_poetry.py:40:5
   |
39 | def test_get_pip_install_commands(poetry_plugin: plugins.PoetryPlugin):
40 |     poetry_plugin._get_pip = lambda: "/python -m pip"
   |     ^^^^^^^^^^^^^^^^^^^^^^
41 |
42 |     assert poetry_plugin._get_pip_install_commands(
   |
info: Annotate to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Implicit shadowing of function `_get_pip`
  --> tests/unit/parts/plugins/test_python.py:62:5
   |
60 |     }
61 |     python_plugin._options = plugins.PythonPluginProperties.unmarshal(spec)
62 |     python_plugin._get_pip = lambda: "/python -m pip"
   |     ^^^^^^^^^^^^^^^^^^^^^^
63 |     copy_src_cmd = (
64 |         f"cp --archive --recursive --reflink=auto {build_path}/src {install_path}"
   |
info: Annotate to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
   --> tests/unit/services/test_analysis.py:112:67
    |
110 | @pytest.fixture
111 | def analysis_service():
112 |     return analysis.AnalysisService(app=application.APP_METADATA, services=None)
    |                                                                   ^^^^^^^^^^^^^ Expected `ServiceFactory`, found `None`
    |
info: Method defined here
  --> charmcraft/services/analysis.py:37:9
   |
35 |     _project: models.CharmcraftProject  # type: ignore[assignment]
36 |
37 |     def __init__(  # (too many arguments)
   |         ^^^^^^^^
38 |         self,
39 |         app: craft_application.AppMetadata,
40 |         services: craft_application.ServiceFactory,
   |         ------------------------------------------ Parameter declared here
41 |     ) -> None:
42 |         super().__init__(app, services)
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/unit/services/test_lifecycle.py:55:17
   |
53 |                 platform="something",
54 |                 build_on=HOST_ARCH,
55 |                 build_for=plan_build_for,  # pyright: ignore[reportArgumentType]
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^ Expected `DebianArchitecture | Literal["all"]`, found `str`
56 |             )
57 |         ]
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> tests/unit/services/test_lifecycle.py:94:17
   |
92 |                 platform="something",
93 |                 build_on=HOST_ARCH,
94 |                 build_for=f"{HOST_ARCH}-foreign",  # pyright: ignore[reportArgumentType]
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `DebianArchitecture | Literal["all"]`, found `str`
95 |             )
96 |         ]
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
  --> tests/unit/services/test_project.py:34:45
   |
32 | @pytest.fixture
33 | def service(project_path):
34 |     return ProjectService(app=APP_METADATA, services=None, project_dir=project_path)
   |                                             ^^^^^^^^^^^^^ Expected `ServiceFactory`, found `None`
   |
info: Method defined here
  --> .venv/lib/python3.12/site-packages/craft_application/services/project.py:57:9
   |
55 |     _project_model: models.Project | None
56 |
57 |     def __init__(
   |         ^^^^^^^^
58 |         self, app: AppMetadata, services: ServiceFactory, *, project_dir: pathlib.Path
   |                                 ------------------------ Parameter declared here
59 |     ) -> None:
60 |         super().__init__(app, services)
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
   --> tests/unit/services/test_provider.py:123:9
    |
121 |     provider_service = ProviderService(
122 |         app=APP_METADATA,
123 |         services=None,  # pyright: ignore[reportArgumentType]
    |         ^^^^^^^^^^^^^ Expected `ServiceFactory`, found `None`
124 |         work_dir=tmp_path,
125 |     )
    |
info: Method defined here
  --> charmcraft/services/provider.py:43:9
   |
41 |     """Business logic for getting providers."""
42 |
43 |     def __init__(
   |         ^^^^^^^^
44 |         self,
45 |         app: craft_application.AppMetadata,
46 |         services: craft_application.ServiceFactory,
   |         ------------------------------------------ Parameter declared here
47 |         *,
48 |         work_dir: pathlib.Path,
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
  --> tests/unit/services/test_store.py:50:56
   |
48 | @pytest.fixture(scope="module")
49 | def reusable_store():
50 |     store = StoreService(app=application.APP_METADATA, services=None)
   |                                                        ^^^^^^^^^^^^^ Expected `ServiceFactory`, found `None`
51 |     store.client = mock.Mock(spec_set=craft_store.StoreClient)
52 |     store._publisher = mock.Mock(spec_set=craft_store.PublisherGateway)
   |
info: Method defined here
  --> .venv/lib/python3.12/site-packages/craft_application/services/base.py:44:9
   |
42 |     """
43 |
44 |     def __init__(self, app: AppMetadata, services: ServiceFactory) -> None:
   |         ^^^^^^^^                         ------------------------ Parameter declared here
45 |         self._app = app
46 |         self._services = services
   |
info: rule `invalid-argument-type` is enabled by default

warning[possibly-missing-attribute]: Attribute `group` may be missing on object of type `Match[str] | None`
  --> tests/unit/test_linters.py:43:12
   |
41 | )
42 | def test_fuzz_python_name_regex(name, next_char, further_garbage):
43 |     assert linters.PYTHON_NAME_REGEX.match(name).group(0) == name
   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
44 |     assert linters.PYTHON_NAME_REGEX.match(f"{name}{next_char}").group(0) == name
45 |     assert (
   |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `group` may be missing on object of type `Match[str] | None`
  --> tests/unit/test_linters.py:44:12
   |
42 | def test_fuzz_python_name_regex(name, next_char, further_garbage):
43 |     assert linters.PYTHON_NAME_REGEX.match(name).group(0) == name
44 |     assert linters.PYTHON_NAME_REGEX.match(f"{name}{next_char}").group(0) == name
   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
45 |     assert (
46 |         linters.PYTHON_NAME_REGEX.match(f"{name}{next_char}{further_garbage}").group(0)
   |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `group` may be missing on object of type `Match[str] | None`
  --> tests/unit/test_linters.py:46:9
   |
44 |     assert linters.PYTHON_NAME_REGEX.match(f"{name}{next_char}").group(0) == name
45 |     assert (
46 |         linters.PYTHON_NAME_REGEX.match(f"{name}{next_char}{further_garbage}").group(0)
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
47 |         == name
48 |     )
   |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `group` may be missing on object of type `Match[str] | None`
  --> tests/unit/test_linters.py:62:12
   |
60 | )
61 | def test_min_version_regex_matches(string, expected):
62 |     assert linters.MIN_VERSION_REGEX.search(string).group(1) == expected
   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `group` may be missing on object of type `Match[str] | None`
  --> tests/unit/test_linters.py:76:24
   |
74 | )
75 | def test_approx_version_regex_matches(string, expected):
76 |     assert expected in linters.APPROX_VERSION_REGEX.search(string).group(1, 2)
   |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
info: rule `possibly-missing-attribute` is enabled by default

warning[possibly-missing-attribute]: Attribute `group` may be missing on object of type `Match[str] | None`
  --> tests/unit/test_linters.py:84:12
   |
82 | )
83 | def test_exact_version_regex_matches(string, expected):
84 |     assert linters.EXACT_VERSION_REGEX.search(string).group(1) == expected
   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
info: rule `possibly-missing-attribute` is enabled by default

error[no-matching-overload]: No overload of function `format_content` matches arguments
   --> tests/unit/utils/test_cli.py:285:9
    |
283 | def test_format_content_invalid(fmt):
284 |     with pytest.raises(ValueError, match="^Unknown output format "):
285 |         format_content(None, fmt)
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^
    |
info: First overload defined here
   --> charmcraft/utils/cli.py:185:5
    |
184 |   @overload
185 |   def format_content(
    |  _____^
186 | |     content: dict[str, Any] | list[dict[str, Any]], fmt: OutputFormat | str | None
187 | | ) -> str: ...
    | |________^
    |
info: Possible overloads for function `format_content`:
info:   (content: dict[str, Any] | list[dict[str, Any]], fmt: OutputFormat | str | None) -> str
info:   (content: str | Real | list[Unknown] | dict[Unknown, Unknown], fmt: OutputFormat | str | None) -> str
info: Overload implementation defined here
   --> charmcraft/utils/cli.py:196:5
    |
196 | def format_content(content, fmt=None):
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
197 |     """Format command output."""
198 |     if not isinstance(fmt, OutputFormat):
    |
info: rule `no-matching-overload` is enabled by default

Found 151 diagnostics

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove charmhub config from charmcraft.yaml spec

2 participants