Skip to content

Conversation

@bepri
Copy link
Member

@bepri bepri commented Nov 21, 2025

Adds the 'PR: Run Manual Spread' label functionality and makes it behave more closely to how the other crafts do their manual spread workflows.

@bepri bepri self-assigned this Nov 21, 2025
@github-actions
Copy link

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

error[unresolved-attribute]: Module `json` has no member `decoder`
   --> charmcraft/services/package.py:120:20
    |
118 |             try:
119 |                 image_info = json.loads(image_info)
120 |             except json.decoder.JSONDecodeError as exc:
    |                    ^^^^^^^^^^^^
121 |                 msg = f"Failed to parse the content of {const.IMAGE_INFO_ENV_VAR} environment variable"
122 |                 raise errors.CraftError(msg) from exc
    |
info: Python 3.10 was assumed when accessing `decoder`
  --> pyproject.toml:38:19
   |
36 | ]
37 | license = "Apache-2.0"
38 | requires-python = ">=3.10"
   |                   ^^^^^^^^ Python 3.10 assumed due to this configuration setting
39 |
40 | [project.scripts]
   |
info: rule `unresolved-attribute` 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[unresolved-attribute]: Module `yaml` has no member `error`
  --> charmcraft/utils/yaml.py:35:13
   |
33 |         with fpath.open("r") as fh:
34 |             content = yaml.safe_load(fh)
35 |     except (yaml.error.YAMLError, OSError) as err:
   |             ^^^^^^^^^^
36 |         emit.debug(f"Failed to read/parse config file {str(fpath)!r}: {err!r}")
37 |         return None
   |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Module `yaml` has no member `representer`
  --> charmcraft/utils/yaml.py:58:9
   |
56 |     yaml.add_representer(
57 |         const.CharmArch,
58 |         yaml.representer.SafeRepresenter.represent_str,
   |         ^^^^^^^^^^^^^^^^
59 |         Dumper=yaml.SafeDumper,
60 |     )
   |
info: rule `unresolved-attribute` 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-attribute]: Module `requests` has no member `exceptions`
  --> docs/howto/code/custom-action-updatelogfile/updatelogfile_action_charm.py:56:16
   |
54 |         except ops.pebble.PathError as e:
55 |             event.fail(str(e.message))
56 |         except requests.exceptions.RequestException as e:
   |                ^^^^^^^^^^^^^^^^^^^
57 |             # if it failed with http bad status code or the connection failed
58 |             if e.response is None:
   |
info: rule `unresolved-attribute` 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make 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[unresolved-attribute]: Object of type `BaseException` has no attribute `resolution`
   --> tests/commands/test_store_api.py:347:12
    |
345 |         "no longer valid, though)."
346 |     )
347 |     assert error.resolution == "Please logout first, then login again."
    |            ^^^^^^^^^^^^^^^^
348 |     assert error.__cause__ is original_exception
    |
info: rule `unresolved-attribute` 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[unresolved-attribute]: Module `requests` has no member `exceptions`
  --> tests/commands/test_store_client.py:83:19
   |
81 |             # the craft-store lib expects the error from requests, as what we're
82 |             # faking here normally is a "real response"
83 |             raise requests.exceptions.JSONDecodeError(exc.msg, exc.doc, exc.pos)
   |                   ^^^^^^^^^^^^^^^^^^^
84 |
85 |     @property
   |
info: rule `unresolved-attribute` is enabled by default

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

error[unresolved-attribute]: Module `json` has no member `decoder`
   --> tests/conftest.py:354:16
    |
352 |         try:
353 |             output_content = json.loads(raw_output)
354 |         except json.decoder.JSONDecodeError:
    |                ^^^^^^^^^^^^
355 |             pytest.fail("Last command output is not valid JSON.")
356 |         assert output_content == expected_content
    |
info: Python 3.10 was assumed when accessing `decoder`
  --> pyproject.toml:38:19
   |
36 | ]
37 | license = "Apache-2.0"
38 | requires-python = ">=3.10"
   |                   ^^^^^^^^ Python 3.10 assumed due to this configuration setting
39 |
40 | [project.scripts]
   |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Module `charmcraft` has no member `application`
  --> 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 |     )
   |
info: rule `unresolved-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-attribute]: Object of type `BaseException` has no attribute `json`
  --> tests/integration/test_application.py:95:23
   |
93 |     error_dict = json.loads((charm_dir / "errors.json").read_text())
94 |
95 |     assert json.loads(exc_info.value.json()) == error_dict, "Errors do not match"
   |                       ^^^^^^^^^^^^^^^^^^^
   |
info: rule `unresolved-attribute` 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-attribute]: Object of type `BaseException` has no attribute `code`
    --> tests/test_charm_builder.py:1237:16
     |
1235 |                 with pytest.raises(SystemExit) as raised:
1236 |                     charm_builder.main()
1237 |         assert raised.value.code == 42
     |                ^^^^^^^^^^^^^^^^^
1238 |     mock_collect_pydeps.assert_called_with(pathlib.Path("builddir"))
     |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `BaseException` has no attribute `code`
    --> tests/test_charm_builder.py:1265:16
     |
1263 |                 with pytest.raises(SystemExit) as raised:
1264 |                     charm_builder.main()
1265 |         assert raised.value.code == 42
     |                ^^^^^^^^^^^^^^^^^
1266 |     mock_collect_pydeps.assert_called_with(pathlib.Path("builddir"))
     |
info: rule `unresolved-attribute` 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[unresolved-attribute]: Object of type `BaseException` has no attribute `errors`
  --> tests/test_parts.py:75:11
   |
73 |     with pytest.raises(pydantic.ValidationError) as raised:
74 |         parts.process_part_config(data)
75 |     err = raised.value.errors()
   |           ^^^^^^^^^^^^^^^^^^^
76 |     assert len(err) == 1
77 |     assert err[0]["loc"] == ("color",)
   |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `BaseException` has no attribute `errors`
  --> tests/test_parts.py:89:11
   |
87 |     with pytest.raises(pydantic.ValidationError) as raised:
88 |         parts.process_part_config(data)
89 |     err = raised.value.errors()
   |           ^^^^^^^^^^^^^^^^^^^
90 |     assert len(err) == 1
91 |     assert err[0]["loc"] == ("charm-timeout",)
   |
info: rule `unresolved-attribute` 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[unresolved-attribute]: Object of type `BaseException` has no attribute `resolution`
   --> tests/unit/commands/test_store.py:236:12
    |
234 |         fetch_libs.run(argparse.Namespace())
235 |
236 |     assert exc_info.value.resolution == "Add a 'charm-libs' section to charmcraft.yaml."
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `BaseException` has no attribute `resolution`
   --> tests/unit/commands/test_store.py:485:9
    |
484 |     assert (
485 |         exc_info.value.resolution
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^
486 |         == f"Did you mean: charmcraft promote --from-channel={to_channel} --to-channel={from_channel}"
487 |     )
    |
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 to bound method `create_file` is incorrect
   --> tests/unit/models/test_project.py:504:20
    |
502 |     expected_dict: dict[str, Any],
503 | ):
504 |     fs.create_file("/charmcraft.yaml", contents=charmcraft_yaml)
    |                    ^^^^^^^^^^^^^^^^^^ Expected `typing.TypeVar | PathLike[Unknown]`, found `Literal["/charmcraft.yaml"]`
505 |     if metadata_yaml:
506 |         fs.create_file("/metadata.yaml", contents=metadata_yaml)
    |
info: Method defined here
    --> .venv/lib/python3.12/site-packages/pyfakefs/fake_filesystem.py:2248:9
     |
2246 |         return current_dir
2247 |
2248 |     def create_file(
     |         ^^^^^^^^^^^
2249 |         self,
2250 |         file_path: AnyPath,
     |         ------------------ Parameter declared here
2251 |         st_mode: int = S_IFREG | helpers.PERM_DEF_FILE,
2252 |         contents: AnyString = "",
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `create_file` is incorrect
   --> tests/unit/models/test_project.py:506:24
    |
504 |     fs.create_file("/charmcraft.yaml", contents=charmcraft_yaml)
505 |     if metadata_yaml:
506 |         fs.create_file("/metadata.yaml", contents=metadata_yaml)
    |                        ^^^^^^^^^^^^^^^^ Expected `typing.TypeVar | PathLike[Unknown]`, found `Literal["/metadata.yaml"]`
507 |     if config_yaml:
508 |         fs.create_file("/config.yaml", contents=config_yaml)
    |
info: Method defined here
    --> .venv/lib/python3.12/site-packages/pyfakefs/fake_filesystem.py:2248:9
     |
2246 |         return current_dir
2247 |
2248 |     def create_file(
     |         ^^^^^^^^^^^
2249 |         self,
2250 |         file_path: AnyPath,
     |         ------------------ Parameter declared here
2251 |         st_mode: int = S_IFREG | helpers.PERM_DEF_FILE,
2252 |         contents: AnyString = "",
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `create_file` is incorrect
   --> tests/unit/models/test_project.py:508:24
    |
506 |         fs.create_file("/metadata.yaml", contents=metadata_yaml)
507 |     if config_yaml:
508 |         fs.create_file("/config.yaml", contents=config_yaml)
    |                        ^^^^^^^^^^^^^^ Expected `typing.TypeVar | PathLike[Unknown]`, found `Literal["/config.yaml"]`
509 |     if actions_yaml:
510 |         fs.create_file("/actions.yaml", contents=actions_yaml)
    |
info: Method defined here
    --> .venv/lib/python3.12/site-packages/pyfakefs/fake_filesystem.py:2248:9
     |
2246 |         return current_dir
2247 |
2248 |     def create_file(
     |         ^^^^^^^^^^^
2249 |         self,
2250 |         file_path: AnyPath,
     |         ------------------ Parameter declared here
2251 |         st_mode: int = S_IFREG | helpers.PERM_DEF_FILE,
2252 |         contents: AnyString = "",
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `create_file` is incorrect
   --> tests/unit/models/test_project.py:510:24
    |
508 |         fs.create_file("/config.yaml", contents=config_yaml)
509 |     if actions_yaml:
510 |         fs.create_file("/actions.yaml", contents=actions_yaml)
    |                        ^^^^^^^^^^^^^^^ Expected `typing.TypeVar | PathLike[Unknown]`, found `Literal["/actions.yaml"]`
511 |
512 |     actual = project.CharmcraftProject.from_yaml_file(pathlib.Path("/charmcraft.yaml"))
    |
info: Method defined here
    --> .venv/lib/python3.12/site-packages/pyfakefs/fake_filesystem.py:2248:9
     |
2246 |         return current_dir
2247 |
2248 |     def create_file(
     |         ^^^^^^^^^^^
2249 |         self,
2250 |         file_path: AnyPath,
     |         ------------------ Parameter declared here
2251 |         st_mode: int = S_IFREG | helpers.PERM_DEF_FILE,
2252 |         contents: AnyString = "",
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `create_file` is incorrect
   --> tests/unit/models/test_project.py:571:24
    |
569 | ):
570 |     if charmcraft_yaml:
571 |         fs.create_file("/charmcraft.yaml", contents=charmcraft_yaml)
    |                        ^^^^^^^^^^^^^^^^^^ Expected `typing.TypeVar | PathLike[Unknown]`, found `Literal["/charmcraft.yaml"]`
572 |     if metadata_yaml:
573 |         fs.create_file("/metadata.yaml", contents=metadata_yaml)
    |
info: Method defined here
    --> .venv/lib/python3.12/site-packages/pyfakefs/fake_filesystem.py:2248:9
     |
2246 |         return current_dir
2247 |
2248 |     def create_file(
     |         ^^^^^^^^^^^
2249 |         self,
2250 |         file_path: AnyPath,
     |         ------------------ Parameter declared here
2251 |         st_mode: int = S_IFREG | helpers.PERM_DEF_FILE,
2252 |         contents: AnyString = "",
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `create_file` is incorrect
   --> tests/unit/models/test_project.py:573:24
    |
571 |         fs.create_file("/charmcraft.yaml", contents=charmcraft_yaml)
572 |     if metadata_yaml:
573 |         fs.create_file("/metadata.yaml", contents=metadata_yaml)
    |                        ^^^^^^^^^^^^^^^^ Expected `typing.TypeVar | PathLike[Unknown]`, found `Literal["/metadata.yaml"]`
574 |     if config_yaml:
575 |         fs.create_file("/config.yaml", contents=config_yaml)
    |
info: Method defined here
    --> .venv/lib/python3.12/site-packages/pyfakefs/fake_filesystem.py:2248:9
     |
2246 |         return current_dir
2247 |
2248 |     def create_file(
     |         ^^^^^^^^^^^
2249 |         self,
2250 |         file_path: AnyPath,
     |         ------------------ Parameter declared here
2251 |         st_mode: int = S_IFREG | helpers.PERM_DEF_FILE,
2252 |         contents: AnyString = "",
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `create_file` is incorrect
   --> tests/unit/models/test_project.py:575:24
    |
573 |         fs.create_file("/metadata.yaml", contents=metadata_yaml)
574 |     if config_yaml:
575 |         fs.create_file("/config.yaml", contents=config_yaml)
    |                        ^^^^^^^^^^^^^^ Expected `typing.TypeVar | PathLike[Unknown]`, found `Literal["/config.yaml"]`
576 |     if actions_yaml:
577 |         fs.create_file("/actions.yaml", contents=actions_yaml)
    |
info: Method defined here
    --> .venv/lib/python3.12/site-packages/pyfakefs/fake_filesystem.py:2248:9
     |
2246 |         return current_dir
2247 |
2248 |     def create_file(
     |         ^^^^^^^^^^^
2249 |         self,
2250 |         file_path: AnyPath,
     |         ------------------ Parameter declared here
2251 |         st_mode: int = S_IFREG | helpers.PERM_DEF_FILE,
2252 |         contents: AnyString = "",
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `create_file` is incorrect
   --> tests/unit/models/test_project.py:577:24
    |
575 |         fs.create_file("/config.yaml", contents=config_yaml)
576 |     if actions_yaml:
577 |         fs.create_file("/actions.yaml", contents=actions_yaml)
    |                        ^^^^^^^^^^^^^^^ Expected `typing.TypeVar | PathLike[Unknown]`, found `Literal["/actions.yaml"]`
578 |
579 |     with pytest.raises(exc_class, match=match) as exc:
    |
info: Method defined here
    --> .venv/lib/python3.12/site-packages/pyfakefs/fake_filesystem.py:2248:9
     |
2246 |         return current_dir
2247 |
2248 |     def create_file(
     |         ^^^^^^^^^^^
2249 |         self,
2250 |         file_path: AnyPath,
     |         ------------------ Parameter declared here
2251 |         st_mode: int = S_IFREG | helpers.PERM_DEF_FILE,
2252 |         contents: AnyString = "",
     |
info: rule `invalid-argument-type` is enabled by default

error[unresolved-attribute]: Object of type `BaseException` has no attribute `details`
   --> tests/unit/models/test_project.py:582:12
    |
580 |         project.CharmcraftProject.from_yaml_file(pathlib.Path("/charmcraft.yaml"))
581 |
582 |     assert exc.value.details == details
    |            ^^^^^^^^^^^^^^^^^
    |
info: rule `unresolved-attribute` is enabled by default

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

error[unresolved-attribute]: Object of type `BaseException` has no attribute `errors`
   --> tests/unit/parts/plugins/test_charm.py:140:11
    |
138 |     with pytest.raises(pydantic.ValidationError) as raised:
139 |         parts.plugins.CharmPlugin.properties_class.unmarshal(content)
140 |     err = raised.value.errors()
    |           ^^^^^^^^^^^^^^^^^^^
141 |
142 |     assert len(err) == 1
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `BaseException` has no attribute `errors`
   --> tests/unit/parts/plugins/test_charm.py:175:11
    |
173 |     with pytest.raises(pydantic.ValidationError) as raised:
174 |         parts.plugins.CharmPlugin.properties_class.unmarshal(content)
175 |     err = raised.value.errors()
    |           ^^^^^^^^^^^^^^^^^^^
176 |     assert len(err) == 1
177 |     assert err[0]["loc"] == ("charm-entrypoint",)
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `BaseException` has no attribute `errors`
   --> tests/unit/parts/plugins/test_charm.py:190:11
    |
188 |     with pytest.raises(pydantic.ValidationError) as raised:
189 |         parts.plugins.CharmPlugin.properties_class.unmarshal(content)
190 |     err = raised.value.errors()
    |           ^^^^^^^^^^^^^^^^^^^
191 |     assert len(err) == 1
192 |     assert err[0]["loc"] == ("charm-entrypoint",)
    |
info: rule `unresolved-attribute` 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[unresolved-attribute]: Object of type `BaseException` has no attribute `reason`
   --> tests/unit/parts/plugins/test_reactive.py:139:12
    |
137 |         validator.validate_environment()
138 |
139 |     assert raised.value.reason == (
    |            ^^^^^^^^^^^^^^^^^^^
140 |         "charm tool not found and part 'my-part' does not depend on a part named 'charm-tools'"
141 |     )
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `BaseException` has no attribute `reason`
   --> tests/unit/parts/plugins/test_reactive.py:153:12
    |
151 |         validator.validate_environment()
152 |
153 |     assert raised.value.reason == "charm tools failed with error code 2"
    |            ^^^^^^^^^^^^^^^^^^^
    |
info: rule `unresolved-attribute` 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

error[invalid-argument-type]: Argument to bound method `create_file` is incorrect
  --> tests/unit/test_charm_builder.py:39:33
   |
37 |     fs.makedirs(const.BUILD_DIRNAME)
38 |     fs.makedirs("install")
39 |     charm_file = fs.create_file("src/charm.py")
   |                                 ^^^^^^^^^^^^^^ Expected `typing.TypeVar | PathLike[Unknown]`, found `Literal["src/charm.py"]`
40 |
41 |     return charm_builder.CharmBuilder(
   |
info: Method defined here
    --> .venv/lib/python3.12/site-packages/pyfakefs/fake_filesystem.py:2248:9
     |
2246 |         return current_dir
2247 |
2248 |     def create_file(
     |         ^^^^^^^^^^^
2249 |         self,
2250 |         file_path: AnyPath,
     |         ------------------ Parameter declared here
2251 |         st_mode: int = S_IFREG | helpers.PERM_DEF_FILE,
2252 |         contents: AnyString = "",
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `create_file` is incorrect
  --> tests/unit/test_charm_builder.py:59:20
   |
57 |     fs: FakeFilesystem, builder, requirements, python_packages, binary_python_packages
58 | ):
59 |     fs.create_file("requirements.txt", contents=requirements)
   |                    ^^^^^^^^^^^^^^^^^^ Expected `typing.TypeVar | PathLike[Unknown]`, found `Literal["requirements.txt"]`
60 |     builder.strict_dependencies = True
61 |     builder.python_packages = python_packages
   |
info: Method defined here
    --> .venv/lib/python3.12/site-packages/pyfakefs/fake_filesystem.py:2248:9
     |
2246 |         return current_dir
2247 |
2248 |     def create_file(
     |         ^^^^^^^^^^^
2249 |         self,
2250 |         file_path: AnyPath,
     |         ------------------ Parameter declared here
2251 |         st_mode: int = S_IFREG | helpers.PERM_DEF_FILE,
2252 |         contents: AnyString = "",
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `create_file` is incorrect
   --> tests/unit/test_charm_builder.py:103:20
    |
101 |     fs: FakeFilesystem, fake_process: FakeProcess, builder, requirements
102 | ):
103 |     fs.create_file("requirements.txt", contents=requirements)
    |                    ^^^^^^^^^^^^^^^^^^ Expected `typing.TypeVar | PathLike[Unknown]`, found `Literal["requirements.txt"]`
104 |     expected_command = [
105 |         "/pip",
    |
info: Method defined here
    --> .venv/lib/python3.12/site-packages/pyfakefs/fake_filesystem.py:2248:9
     |
2246 |         return current_dir
2247 |
2248 |     def create_file(
     |         ^^^^^^^^^^^
2249 |         self,
2250 |         file_path: AnyPath,
     |         ------------------ Parameter declared here
2251 |         st_mode: int = S_IFREG | helpers.PERM_DEF_FILE,
2252 |         contents: AnyString = "",
     |
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[unresolved-attribute]: Object of type `BaseException` has no attribute `errors`
  --> tests/unit/test_parts.py:91:42
   |
89 |         parts.process_part_config(part_config)
90 |
91 |     assert message in {e["msg"] for e in exc_info.value.errors()}
   |                                          ^^^^^^^^^^^^^^^^^^^^^
   |
info: rule `unresolved-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

error[unresolved-attribute]: Object of type `BaseException` has no attribute `extra_dependencies`
   --> tests/unit/utils/test_package.py:221:12
    |
219 |         validate_strict_dependencies(dependencies, other_packages)
220 |
221 |     assert exc_info.value.extra_dependencies == extra_packages
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `BaseException` has no attribute `details`
   --> tests/unit/utils/test_platform.py:162:12
    |
160 |         validate_architectures(architectures)
161 |
162 |     assert exc_info.value.details == details
    |            ^^^^^^^^^^^^^^^^^^^^^^
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `BaseException` has no attribute `resolution`
   --> tests/unit/utils/test_project.py:111:17
    |
110 |     check.equal(exc_info.value.args, expected.args)
111 |     check.equal(exc_info.value.resolution, expected.resolution)
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^
    |
info: rule `unresolved-attribute` is enabled by default

Found 153 diagnostics

@github-actions
Copy link

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

error[unresolved-attribute]: Module `json` has no member `decoder`
   --> charmcraft/services/package.py:120:20
    |
118 |             try:
119 |                 image_info = json.loads(image_info)
120 |             except json.decoder.JSONDecodeError as exc:
    |                    ^^^^^^^^^^^^
121 |                 msg = f"Failed to parse the content of {const.IMAGE_INFO_ENV_VAR} environment variable"
122 |                 raise errors.CraftError(msg) from exc
    |
info: Python 3.10 was assumed when accessing `decoder`
  --> pyproject.toml:38:19
   |
36 | ]
37 | license = "Apache-2.0"
38 | requires-python = ">=3.10"
   |                   ^^^^^^^^ Python 3.10 assumed due to this configuration setting
39 |
40 | [project.scripts]
   |
info: rule `unresolved-attribute` 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[unresolved-attribute]: Module `yaml` has no member `error`
  --> charmcraft/utils/yaml.py:35:13
   |
33 |         with fpath.open("r") as fh:
34 |             content = yaml.safe_load(fh)
35 |     except (yaml.error.YAMLError, OSError) as err:
   |             ^^^^^^^^^^
36 |         emit.debug(f"Failed to read/parse config file {str(fpath)!r}: {err!r}")
37 |         return None
   |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Module `yaml` has no member `representer`
  --> charmcraft/utils/yaml.py:58:9
   |
56 |     yaml.add_representer(
57 |         const.CharmArch,
58 |         yaml.representer.SafeRepresenter.represent_str,
   |         ^^^^^^^^^^^^^^^^
59 |         Dumper=yaml.SafeDumper,
60 |     )
   |
info: rule `unresolved-attribute` 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-attribute]: Module `requests` has no member `exceptions`
  --> docs/howto/code/custom-action-updatelogfile/updatelogfile_action_charm.py:56:16
   |
54 |         except ops.pebble.PathError as e:
55 |             event.fail(str(e.message))
56 |         except requests.exceptions.RequestException as e:
   |                ^^^^^^^^^^^^^^^^^^^
57 |             # if it failed with http bad status code or the connection failed
58 |             if e.response is None:
   |
info: rule `unresolved-attribute` 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make 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[unresolved-attribute]: Object of type `BaseException` has no attribute `resolution`
   --> tests/commands/test_store_api.py:347:12
    |
345 |         "no longer valid, though)."
346 |     )
347 |     assert error.resolution == "Please logout first, then login again."
    |            ^^^^^^^^^^^^^^^^
348 |     assert error.__cause__ is original_exception
    |
info: rule `unresolved-attribute` 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[unresolved-attribute]: Module `requests` has no member `exceptions`
  --> tests/commands/test_store_client.py:83:19
   |
81 |             # the craft-store lib expects the error from requests, as what we're
82 |             # faking here normally is a "real response"
83 |             raise requests.exceptions.JSONDecodeError(exc.msg, exc.doc, exc.pos)
   |                   ^^^^^^^^^^^^^^^^^^^
84 |
85 |     @property
   |
info: rule `unresolved-attribute` is enabled by default

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

error[unresolved-attribute]: Module `json` has no member `decoder`
   --> tests/conftest.py:354:16
    |
352 |         try:
353 |             output_content = json.loads(raw_output)
354 |         except json.decoder.JSONDecodeError:
    |                ^^^^^^^^^^^^
355 |             pytest.fail("Last command output is not valid JSON.")
356 |         assert output_content == expected_content
    |
info: Python 3.10 was assumed when accessing `decoder`
  --> pyproject.toml:38:19
   |
36 | ]
37 | license = "Apache-2.0"
38 | requires-python = ">=3.10"
   |                   ^^^^^^^^ Python 3.10 assumed due to this configuration setting
39 |
40 | [project.scripts]
   |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Module `charmcraft` has no member `application`
  --> 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 |     )
   |
info: rule `unresolved-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-attribute]: Object of type `BaseException` has no attribute `json`
  --> tests/integration/test_application.py:95:23
   |
93 |     error_dict = json.loads((charm_dir / "errors.json").read_text())
94 |
95 |     assert json.loads(exc_info.value.json()) == error_dict, "Errors do not match"
   |                       ^^^^^^^^^^^^^^^^^^^
   |
info: rule `unresolved-attribute` 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/528/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/528/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-attribute]: Object of type `BaseException` has no attribute `code`
    --> tests/test_charm_builder.py:1237:16
     |
1235 |                 with pytest.raises(SystemExit) as raised:
1236 |                     charm_builder.main()
1237 |         assert raised.value.code == 42
     |                ^^^^^^^^^^^^^^^^^
1238 |     mock_collect_pydeps.assert_called_with(pathlib.Path("builddir"))
     |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `BaseException` has no attribute `code`
    --> tests/test_charm_builder.py:1265:16
     |
1263 |                 with pytest.raises(SystemExit) as raised:
1264 |                     charm_builder.main()
1265 |         assert raised.value.code == 42
     |                ^^^^^^^^^^^^^^^^^
1266 |     mock_collect_pydeps.assert_called_with(pathlib.Path("builddir"))
     |
info: rule `unresolved-attribute` 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[unresolved-attribute]: Object of type `BaseException` has no attribute `errors`
  --> tests/test_parts.py:75:11
   |
73 |     with pytest.raises(pydantic.ValidationError) as raised:
74 |         parts.process_part_config(data)
75 |     err = raised.value.errors()
   |           ^^^^^^^^^^^^^^^^^^^
76 |     assert len(err) == 1
77 |     assert err[0]["loc"] == ("color",)
   |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `BaseException` has no attribute `errors`
  --> tests/test_parts.py:89:11
   |
87 |     with pytest.raises(pydantic.ValidationError) as raised:
88 |         parts.process_part_config(data)
89 |     err = raised.value.errors()
   |           ^^^^^^^^^^^^^^^^^^^
90 |     assert len(err) == 1
91 |     assert err[0]["loc"] == ("charm-timeout",)
   |
info: rule `unresolved-attribute` 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[unresolved-attribute]: Object of type `BaseException` has no attribute `resolution`
   --> tests/unit/commands/test_store.py:236:12
    |
234 |         fetch_libs.run(argparse.Namespace())
235 |
236 |     assert exc_info.value.resolution == "Add a 'charm-libs' section to charmcraft.yaml."
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `BaseException` has no attribute `resolution`
   --> tests/unit/commands/test_store.py:485:9
    |
484 |     assert (
485 |         exc_info.value.resolution
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^
486 |         == f"Did you mean: charmcraft promote --from-channel={to_channel} --to-channel={from_channel}"
487 |     )
    |
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 to bound method `create_file` is incorrect
   --> tests/unit/models/test_project.py:504:20
    |
502 |     expected_dict: dict[str, Any],
503 | ):
504 |     fs.create_file("/charmcraft.yaml", contents=charmcraft_yaml)
    |                    ^^^^^^^^^^^^^^^^^^ Expected `typing.TypeVar | PathLike[Unknown]`, found `Literal["/charmcraft.yaml"]`
505 |     if metadata_yaml:
506 |         fs.create_file("/metadata.yaml", contents=metadata_yaml)
    |
info: Method defined here
    --> .venv/lib/python3.12/site-packages/pyfakefs/fake_filesystem.py:2248:9
     |
2246 |         return current_dir
2247 |
2248 |     def create_file(
     |         ^^^^^^^^^^^
2249 |         self,
2250 |         file_path: AnyPath,
     |         ------------------ Parameter declared here
2251 |         st_mode: int = S_IFREG | helpers.PERM_DEF_FILE,
2252 |         contents: AnyString = "",
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `create_file` is incorrect
   --> tests/unit/models/test_project.py:506:24
    |
504 |     fs.create_file("/charmcraft.yaml", contents=charmcraft_yaml)
505 |     if metadata_yaml:
506 |         fs.create_file("/metadata.yaml", contents=metadata_yaml)
    |                        ^^^^^^^^^^^^^^^^ Expected `typing.TypeVar | PathLike[Unknown]`, found `Literal["/metadata.yaml"]`
507 |     if config_yaml:
508 |         fs.create_file("/config.yaml", contents=config_yaml)
    |
info: Method defined here
    --> .venv/lib/python3.12/site-packages/pyfakefs/fake_filesystem.py:2248:9
     |
2246 |         return current_dir
2247 |
2248 |     def create_file(
     |         ^^^^^^^^^^^
2249 |         self,
2250 |         file_path: AnyPath,
     |         ------------------ Parameter declared here
2251 |         st_mode: int = S_IFREG | helpers.PERM_DEF_FILE,
2252 |         contents: AnyString = "",
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `create_file` is incorrect
   --> tests/unit/models/test_project.py:508:24
    |
506 |         fs.create_file("/metadata.yaml", contents=metadata_yaml)
507 |     if config_yaml:
508 |         fs.create_file("/config.yaml", contents=config_yaml)
    |                        ^^^^^^^^^^^^^^ Expected `typing.TypeVar | PathLike[Unknown]`, found `Literal["/config.yaml"]`
509 |     if actions_yaml:
510 |         fs.create_file("/actions.yaml", contents=actions_yaml)
    |
info: Method defined here
    --> .venv/lib/python3.12/site-packages/pyfakefs/fake_filesystem.py:2248:9
     |
2246 |         return current_dir
2247 |
2248 |     def create_file(
     |         ^^^^^^^^^^^
2249 |         self,
2250 |         file_path: AnyPath,
     |         ------------------ Parameter declared here
2251 |         st_mode: int = S_IFREG | helpers.PERM_DEF_FILE,
2252 |         contents: AnyString = "",
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `create_file` is incorrect
   --> tests/unit/models/test_project.py:510:24
    |
508 |         fs.create_file("/config.yaml", contents=config_yaml)
509 |     if actions_yaml:
510 |         fs.create_file("/actions.yaml", contents=actions_yaml)
    |                        ^^^^^^^^^^^^^^^ Expected `typing.TypeVar | PathLike[Unknown]`, found `Literal["/actions.yaml"]`
511 |
512 |     actual = project.CharmcraftProject.from_yaml_file(pathlib.Path("/charmcraft.yaml"))
    |
info: Method defined here
    --> .venv/lib/python3.12/site-packages/pyfakefs/fake_filesystem.py:2248:9
     |
2246 |         return current_dir
2247 |
2248 |     def create_file(
     |         ^^^^^^^^^^^
2249 |         self,
2250 |         file_path: AnyPath,
     |         ------------------ Parameter declared here
2251 |         st_mode: int = S_IFREG | helpers.PERM_DEF_FILE,
2252 |         contents: AnyString = "",
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `create_file` is incorrect
   --> tests/unit/models/test_project.py:571:24
    |
569 | ):
570 |     if charmcraft_yaml:
571 |         fs.create_file("/charmcraft.yaml", contents=charmcraft_yaml)
    |                        ^^^^^^^^^^^^^^^^^^ Expected `typing.TypeVar | PathLike[Unknown]`, found `Literal["/charmcraft.yaml"]`
572 |     if metadata_yaml:
573 |         fs.create_file("/metadata.yaml", contents=metadata_yaml)
    |
info: Method defined here
    --> .venv/lib/python3.12/site-packages/pyfakefs/fake_filesystem.py:2248:9
     |
2246 |         return current_dir
2247 |
2248 |     def create_file(
     |         ^^^^^^^^^^^
2249 |         self,
2250 |         file_path: AnyPath,
     |         ------------------ Parameter declared here
2251 |         st_mode: int = S_IFREG | helpers.PERM_DEF_FILE,
2252 |         contents: AnyString = "",
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `create_file` is incorrect
   --> tests/unit/models/test_project.py:573:24
    |
571 |         fs.create_file("/charmcraft.yaml", contents=charmcraft_yaml)
572 |     if metadata_yaml:
573 |         fs.create_file("/metadata.yaml", contents=metadata_yaml)
    |                        ^^^^^^^^^^^^^^^^ Expected `typing.TypeVar | PathLike[Unknown]`, found `Literal["/metadata.yaml"]`
574 |     if config_yaml:
575 |         fs.create_file("/config.yaml", contents=config_yaml)
    |
info: Method defined here
    --> .venv/lib/python3.12/site-packages/pyfakefs/fake_filesystem.py:2248:9
     |
2246 |         return current_dir
2247 |
2248 |     def create_file(
     |         ^^^^^^^^^^^
2249 |         self,
2250 |         file_path: AnyPath,
     |         ------------------ Parameter declared here
2251 |         st_mode: int = S_IFREG | helpers.PERM_DEF_FILE,
2252 |         contents: AnyString = "",
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `create_file` is incorrect
   --> tests/unit/models/test_project.py:575:24
    |
573 |         fs.create_file("/metadata.yaml", contents=metadata_yaml)
574 |     if config_yaml:
575 |         fs.create_file("/config.yaml", contents=config_yaml)
    |                        ^^^^^^^^^^^^^^ Expected `typing.TypeVar | PathLike[Unknown]`, found `Literal["/config.yaml"]`
576 |     if actions_yaml:
577 |         fs.create_file("/actions.yaml", contents=actions_yaml)
    |
info: Method defined here
    --> .venv/lib/python3.12/site-packages/pyfakefs/fake_filesystem.py:2248:9
     |
2246 |         return current_dir
2247 |
2248 |     def create_file(
     |         ^^^^^^^^^^^
2249 |         self,
2250 |         file_path: AnyPath,
     |         ------------------ Parameter declared here
2251 |         st_mode: int = S_IFREG | helpers.PERM_DEF_FILE,
2252 |         contents: AnyString = "",
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `create_file` is incorrect
   --> tests/unit/models/test_project.py:577:24
    |
575 |         fs.create_file("/config.yaml", contents=config_yaml)
576 |     if actions_yaml:
577 |         fs.create_file("/actions.yaml", contents=actions_yaml)
    |                        ^^^^^^^^^^^^^^^ Expected `typing.TypeVar | PathLike[Unknown]`, found `Literal["/actions.yaml"]`
578 |
579 |     with pytest.raises(exc_class, match=match) as exc:
    |
info: Method defined here
    --> .venv/lib/python3.12/site-packages/pyfakefs/fake_filesystem.py:2248:9
     |
2246 |         return current_dir
2247 |
2248 |     def create_file(
     |         ^^^^^^^^^^^
2249 |         self,
2250 |         file_path: AnyPath,
     |         ------------------ Parameter declared here
2251 |         st_mode: int = S_IFREG | helpers.PERM_DEF_FILE,
2252 |         contents: AnyString = "",
     |
info: rule `invalid-argument-type` is enabled by default

error[unresolved-attribute]: Object of type `BaseException` has no attribute `details`
   --> tests/unit/models/test_project.py:582:12
    |
580 |         project.CharmcraftProject.from_yaml_file(pathlib.Path("/charmcraft.yaml"))
581 |
582 |     assert exc.value.details == details
    |            ^^^^^^^^^^^^^^^^^
    |
info: rule `unresolved-attribute` is enabled by default

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

error[unresolved-attribute]: Object of type `BaseException` has no attribute `errors`
   --> tests/unit/parts/plugins/test_charm.py:140:11
    |
138 |     with pytest.raises(pydantic.ValidationError) as raised:
139 |         parts.plugins.CharmPlugin.properties_class.unmarshal(content)
140 |     err = raised.value.errors()
    |           ^^^^^^^^^^^^^^^^^^^
141 |
142 |     assert len(err) == 1
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `BaseException` has no attribute `errors`
   --> tests/unit/parts/plugins/test_charm.py:175:11
    |
173 |     with pytest.raises(pydantic.ValidationError) as raised:
174 |         parts.plugins.CharmPlugin.properties_class.unmarshal(content)
175 |     err = raised.value.errors()
    |           ^^^^^^^^^^^^^^^^^^^
176 |     assert len(err) == 1
177 |     assert err[0]["loc"] == ("charm-entrypoint",)
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `BaseException` has no attribute `errors`
   --> tests/unit/parts/plugins/test_charm.py:190:11
    |
188 |     with pytest.raises(pydantic.ValidationError) as raised:
189 |         parts.plugins.CharmPlugin.properties_class.unmarshal(content)
190 |     err = raised.value.errors()
    |           ^^^^^^^^^^^^^^^^^^^
191 |     assert len(err) == 1
192 |     assert err[0]["loc"] == ("charm-entrypoint",)
    |
info: rule `unresolved-attribute` 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[unresolved-attribute]: Object of type `BaseException` has no attribute `reason`
   --> tests/unit/parts/plugins/test_reactive.py:139:12
    |
137 |         validator.validate_environment()
138 |
139 |     assert raised.value.reason == (
    |            ^^^^^^^^^^^^^^^^^^^
140 |         "charm tool not found and part 'my-part' does not depend on a part named 'charm-tools'"
141 |     )
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `BaseException` has no attribute `reason`
   --> tests/unit/parts/plugins/test_reactive.py:153:12
    |
151 |         validator.validate_environment()
152 |
153 |     assert raised.value.reason == "charm tools failed with error code 2"
    |            ^^^^^^^^^^^^^^^^^^^
    |
info: rule `unresolved-attribute` 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

error[invalid-argument-type]: Argument to bound method `create_file` is incorrect
  --> tests/unit/test_charm_builder.py:39:33
   |
37 |     fs.makedirs(const.BUILD_DIRNAME)
38 |     fs.makedirs("install")
39 |     charm_file = fs.create_file("src/charm.py")
   |                                 ^^^^^^^^^^^^^^ Expected `typing.TypeVar | PathLike[Unknown]`, found `Literal["src/charm.py"]`
40 |
41 |     return charm_builder.CharmBuilder(
   |
info: Method defined here
    --> .venv/lib/python3.12/site-packages/pyfakefs/fake_filesystem.py:2248:9
     |
2246 |         return current_dir
2247 |
2248 |     def create_file(
     |         ^^^^^^^^^^^
2249 |         self,
2250 |         file_path: AnyPath,
     |         ------------------ Parameter declared here
2251 |         st_mode: int = S_IFREG | helpers.PERM_DEF_FILE,
2252 |         contents: AnyString = "",
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `create_file` is incorrect
  --> tests/unit/test_charm_builder.py:59:20
   |
57 |     fs: FakeFilesystem, builder, requirements, python_packages, binary_python_packages
58 | ):
59 |     fs.create_file("requirements.txt", contents=requirements)
   |                    ^^^^^^^^^^^^^^^^^^ Expected `typing.TypeVar | PathLike[Unknown]`, found `Literal["requirements.txt"]`
60 |     builder.strict_dependencies = True
61 |     builder.python_packages = python_packages
   |
info: Method defined here
    --> .venv/lib/python3.12/site-packages/pyfakefs/fake_filesystem.py:2248:9
     |
2246 |         return current_dir
2247 |
2248 |     def create_file(
     |         ^^^^^^^^^^^
2249 |         self,
2250 |         file_path: AnyPath,
     |         ------------------ Parameter declared here
2251 |         st_mode: int = S_IFREG | helpers.PERM_DEF_FILE,
2252 |         contents: AnyString = "",
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `create_file` is incorrect
   --> tests/unit/test_charm_builder.py:103:20
    |
101 |     fs: FakeFilesystem, fake_process: FakeProcess, builder, requirements
102 | ):
103 |     fs.create_file("requirements.txt", contents=requirements)
    |                    ^^^^^^^^^^^^^^^^^^ Expected `typing.TypeVar | PathLike[Unknown]`, found `Literal["requirements.txt"]`
104 |     expected_command = [
105 |         "/pip",
    |
info: Method defined here
    --> .venv/lib/python3.12/site-packages/pyfakefs/fake_filesystem.py:2248:9
     |
2246 |         return current_dir
2247 |
2248 |     def create_file(
     |         ^^^^^^^^^^^
2249 |         self,
2250 |         file_path: AnyPath,
     |         ------------------ Parameter declared here
2251 |         st_mode: int = S_IFREG | helpers.PERM_DEF_FILE,
2252 |         contents: AnyString = "",
     |
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[unresolved-attribute]: Object of type `BaseException` has no attribute `errors`
  --> tests/unit/test_parts.py:91:42
   |
89 |         parts.process_part_config(part_config)
90 |
91 |     assert message in {e["msg"] for e in exc_info.value.errors()}
   |                                          ^^^^^^^^^^^^^^^^^^^^^
   |
info: rule `unresolved-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

error[unresolved-attribute]: Object of type `BaseException` has no attribute `extra_dependencies`
   --> tests/unit/utils/test_package.py:221:12
    |
219 |         validate_strict_dependencies(dependencies, other_packages)
220 |
221 |     assert exc_info.value.extra_dependencies == extra_packages
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `BaseException` has no attribute `details`
   --> tests/unit/utils/test_platform.py:162:12
    |
160 |         validate_architectures(architectures)
161 |
162 |     assert exc_info.value.details == details
    |            ^^^^^^^^^^^^^^^^^^^^^^
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `BaseException` has no attribute `resolution`
   --> tests/unit/utils/test_project.py:111:17
    |
110 |     check.equal(exc_info.value.args, expected.args)
111 |     check.equal(exc_info.value.resolution, expected.resolution)
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^
    |
info: rule `unresolved-attribute` is enabled by default

Found 153 diagnostics

@bepri bepri added the PR: Run Manual Spread This PR should run the manual test suite. label Nov 26, 2025
@github-actions
Copy link

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:240:38
    |
238 | # Setup libraries documentation snippets for use in charmcraft docs.
239 | common_docs_path = pathlib.Path(__file__).parent / "common"
240 | craft_parts_docs_path = pathlib.Path(craft_parts_docs.__file__).parent / "craft-parts"
    |                                      ^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str | PathLike[str]`, found `str | None`
241 | (common_docs_path / "craft-parts").unlink(missing_ok=True)
242 | (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/544/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/544/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/544/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/544/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/544/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/544/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/544/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/544/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/544/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/544/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/544/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/544/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/544/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/544/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/544/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/544/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/544/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/544/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your 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/544/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/544/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/544/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/544/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/544/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/544/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/544/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/544/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/544/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/544/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/544/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/544/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/544/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/544/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/544/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/544/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/544/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/544/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/544/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/544/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/544/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/544/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/544/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/544/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make 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[unresolved-attribute]: Object of type `BaseException` has no attribute `resolution`
   --> tests/commands/test_store_api.py:347:12
    |
345 |         "no longer valid, though)."
346 |     )
347 |     assert error.resolution == "Please logout first, then login again."
    |            ^^^^^^^^^^^^^^^^
348 |     assert error.__cause__ is original_exception
    |
info: rule `unresolved-attribute` 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:224:9
    |
222 |         build_base=craft_platforms.DistroBase("ubuntu", "22.04"),
223 |         build_on=arch,
224 |         build_for="arm64",
    |         ^^^^^^^^^^^^^^^^^ Expected `DebianArchitecture | Literal["all"]`, found `Literal["arm64"]`
225 |         platform="distro-1-test64",
226 |     )
    |
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-attribute]: Object of type `BaseException` has no attribute `json`
   --> tests/integration/test_application.py:98:27
    |
 96 |     # meaning it changes in ways that aren't meaningful to test
 97 |     # Instead, just omit the URL from the test entirely.
 98 |     exc_list = json.loads(exc_info.value.json())
    |                           ^^^^^^^^^^^^^^^^^^^
 99 |     for e in exc_list:
100 |         _ = e.pop("url")
    |
info: rule `unresolved-attribute` 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/544/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/544/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/544/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/544/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/544/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/544/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/544/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/544/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/544/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/544/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/544/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/544/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/544/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/544/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/544/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/544/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/544/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/544/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/544/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/544/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/544/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/544/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/544/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/544/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/544/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/544/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/544/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/544/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/544/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/544/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/544/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/544/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/544/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/544/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/544/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/544/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/544/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/544/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/544/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/544/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/544/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/544/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/544/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/544/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/544/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/544/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/544/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/544/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/544/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/544/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/544/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/544/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/544/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/544/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/544/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/544/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/544/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/544/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/544/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/544/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/544/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/544/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/544/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/544/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/544/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/544/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-attribute]: Object of type `BaseException` has no attribute `code`
    --> tests/test_charm_builder.py:1237:16
     |
1235 |                 with pytest.raises(SystemExit) as raised:
1236 |                     charm_builder.main()
1237 |         assert raised.value.code == 42
     |                ^^^^^^^^^^^^^^^^^
1238 |     mock_collect_pydeps.assert_called_with(pathlib.Path("builddir"))
     |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `BaseException` has no attribute `code`
    --> tests/test_charm_builder.py:1265:16
     |
1263 |                 with pytest.raises(SystemExit) as raised:
1264 |                     charm_builder.main()
1265 |         assert raised.value.code == 42
     |                ^^^^^^^^^^^^^^^^^
1266 |     mock_collect_pydeps.assert_called_with(pathlib.Path("builddir"))
     |
info: rule `unresolved-attribute` 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[unresolved-attribute]: Object of type `BaseException` has no attribute `errors`
  --> tests/test_parts.py:75:11
   |
73 |     with pytest.raises(pydantic.ValidationError) as raised:
74 |         parts.process_part_config(data)
75 |     err = raised.value.errors()
   |           ^^^^^^^^^^^^^^^^^^^
76 |     assert len(err) == 1
77 |     assert err[0]["loc"] == ("color",)
   |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `BaseException` has no attribute `errors`
  --> tests/test_parts.py:89:11
   |
87 |     with pytest.raises(pydantic.ValidationError) as raised:
88 |         parts.process_part_config(data)
89 |     err = raised.value.errors()
   |           ^^^^^^^^^^^^^^^^^^^
90 |     assert len(err) == 1
91 |     assert err[0]["loc"] == ("charm-timeout",)
   |
info: rule `unresolved-attribute` 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[unresolved-attribute]: Object of type `BaseException` has no attribute `resolution`
   --> tests/unit/commands/test_store.py:236:12
    |
234 |         fetch_libs.run(argparse.Namespace())
235 |
236 |     assert exc_info.value.resolution == "Add a 'charm-libs' section to charmcraft.yaml."
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `BaseException` has no attribute `resolution`
   --> tests/unit/commands/test_store.py:485:9
    |
484 |     assert (
485 |         exc_info.value.resolution
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^
486 |         == f"Did you mean: charmcraft promote --from-channel={to_channel} --to-channel={from_channel}"
487 |     )
    |
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 to bound method `create_file` is incorrect
   --> tests/unit/models/test_project.py:504:20
    |
502 |     expected_dict: dict[str, Any],
503 | ):
504 |     fs.create_file("/charmcraft.yaml", contents=charmcraft_yaml)
    |                    ^^^^^^^^^^^^^^^^^^ Expected `typing.TypeVar | PathLike[Unknown]`, found `Literal["/charmcraft.yaml"]`
505 |     if metadata_yaml:
506 |         fs.create_file("/metadata.yaml", contents=metadata_yaml)
    |
info: Method defined here
    --> .venv/lib/python3.12/site-packages/pyfakefs/fake_filesystem.py:2248:9
     |
2246 |         return current_dir
2247 |
2248 |     def create_file(
     |         ^^^^^^^^^^^
2249 |         self,
2250 |         file_path: AnyPath,
     |         ------------------ Parameter declared here
2251 |         st_mode: int = S_IFREG | helpers.PERM_DEF_FILE,
2252 |         contents: AnyString = "",
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `create_file` is incorrect
   --> tests/unit/models/test_project.py:506:24
    |
504 |     fs.create_file("/charmcraft.yaml", contents=charmcraft_yaml)
505 |     if metadata_yaml:
506 |         fs.create_file("/metadata.yaml", contents=metadata_yaml)
    |                        ^^^^^^^^^^^^^^^^ Expected `typing.TypeVar | PathLike[Unknown]`, found `Literal["/metadata.yaml"]`
507 |     if config_yaml:
508 |         fs.create_file("/config.yaml", contents=config_yaml)
    |
info: Method defined here
    --> .venv/lib/python3.12/site-packages/pyfakefs/fake_filesystem.py:2248:9
     |
2246 |         return current_dir
2247 |
2248 |     def create_file(
     |         ^^^^^^^^^^^
2249 |         self,
2250 |         file_path: AnyPath,
     |         ------------------ Parameter declared here
2251 |         st_mode: int = S_IFREG | helpers.PERM_DEF_FILE,
2252 |         contents: AnyString = "",
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `create_file` is incorrect
   --> tests/unit/models/test_project.py:508:24
    |
506 |         fs.create_file("/metadata.yaml", contents=metadata_yaml)
507 |     if config_yaml:
508 |         fs.create_file("/config.yaml", contents=config_yaml)
    |                        ^^^^^^^^^^^^^^ Expected `typing.TypeVar | PathLike[Unknown]`, found `Literal["/config.yaml"]`
509 |     if actions_yaml:
510 |         fs.create_file("/actions.yaml", contents=actions_yaml)
    |
info: Method defined here
    --> .venv/lib/python3.12/site-packages/pyfakefs/fake_filesystem.py:2248:9
     |
2246 |         return current_dir
2247 |
2248 |     def create_file(
     |         ^^^^^^^^^^^
2249 |         self,
2250 |         file_path: AnyPath,
     |         ------------------ Parameter declared here
2251 |         st_mode: int = S_IFREG | helpers.PERM_DEF_FILE,
2252 |         contents: AnyString = "",
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `create_file` is incorrect
   --> tests/unit/models/test_project.py:510:24
    |
508 |         fs.create_file("/config.yaml", contents=config_yaml)
509 |     if actions_yaml:
510 |         fs.create_file("/actions.yaml", contents=actions_yaml)
    |                        ^^^^^^^^^^^^^^^ Expected `typing.TypeVar | PathLike[Unknown]`, found `Literal["/actions.yaml"]`
511 |
512 |     actual = project.CharmcraftProject.from_yaml_file(pathlib.Path("/charmcraft.yaml"))
    |
info: Method defined here
    --> .venv/lib/python3.12/site-packages/pyfakefs/fake_filesystem.py:2248:9
     |
2246 |         return current_dir
2247 |
2248 |     def create_file(
     |         ^^^^^^^^^^^
2249 |         self,
2250 |         file_path: AnyPath,
     |         ------------------ Parameter declared here
2251 |         st_mode: int = S_IFREG | helpers.PERM_DEF_FILE,
2252 |         contents: AnyString = "",
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `create_file` is incorrect
   --> tests/unit/models/test_project.py:571:24
    |
569 | ):
570 |     if charmcraft_yaml:
571 |         fs.create_file("/charmcraft.yaml", contents=charmcraft_yaml)
    |                        ^^^^^^^^^^^^^^^^^^ Expected `typing.TypeVar | PathLike[Unknown]`, found `Literal["/charmcraft.yaml"]`
572 |     if metadata_yaml:
573 |         fs.create_file("/metadata.yaml", contents=metadata_yaml)
    |
info: Method defined here
    --> .venv/lib/python3.12/site-packages/pyfakefs/fake_filesystem.py:2248:9
     |
2246 |         return current_dir
2247 |
2248 |     def create_file(
     |         ^^^^^^^^^^^
2249 |         self,
2250 |         file_path: AnyPath,
     |         ------------------ Parameter declared here
2251 |         st_mode: int = S_IFREG | helpers.PERM_DEF_FILE,
2252 |         contents: AnyString = "",
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `create_file` is incorrect
   --> tests/unit/models/test_project.py:573:24
    |
571 |         fs.create_file("/charmcraft.yaml", contents=charmcraft_yaml)
572 |     if metadata_yaml:
573 |         fs.create_file("/metadata.yaml", contents=metadata_yaml)
    |                        ^^^^^^^^^^^^^^^^ Expected `typing.TypeVar | PathLike[Unknown]`, found `Literal["/metadata.yaml"]`
574 |     if config_yaml:
575 |         fs.create_file("/config.yaml", contents=config_yaml)
    |
info: Method defined here
    --> .venv/lib/python3.12/site-packages/pyfakefs/fake_filesystem.py:2248:9
     |
2246 |         return current_dir
2247 |
2248 |     def create_file(
     |         ^^^^^^^^^^^
2249 |         self,
2250 |         file_path: AnyPath,
     |         ------------------ Parameter declared here
2251 |         st_mode: int = S_IFREG | helpers.PERM_DEF_FILE,
2252 |         contents: AnyString = "",
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `create_file` is incorrect
   --> tests/unit/models/test_project.py:575:24
    |
573 |         fs.create_file("/metadata.yaml", contents=metadata_yaml)
574 |     if config_yaml:
575 |         fs.create_file("/config.yaml", contents=config_yaml)
    |                        ^^^^^^^^^^^^^^ Expected `typing.TypeVar | PathLike[Unknown]`, found `Literal["/config.yaml"]`
576 |     if actions_yaml:
577 |         fs.create_file("/actions.yaml", contents=actions_yaml)
    |
info: Method defined here
    --> .venv/lib/python3.12/site-packages/pyfakefs/fake_filesystem.py:2248:9
     |
2246 |         return current_dir
2247 |
2248 |     def create_file(
     |         ^^^^^^^^^^^
2249 |         self,
2250 |         file_path: AnyPath,
     |         ------------------ Parameter declared here
2251 |         st_mode: int = S_IFREG | helpers.PERM_DEF_FILE,
2252 |         contents: AnyString = "",
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `create_file` is incorrect
   --> tests/unit/models/test_project.py:577:24
    |
575 |         fs.create_file("/config.yaml", contents=config_yaml)
576 |     if actions_yaml:
577 |         fs.create_file("/actions.yaml", contents=actions_yaml)
    |                        ^^^^^^^^^^^^^^^ Expected `typing.TypeVar | PathLike[Unknown]`, found `Literal["/actions.yaml"]`
578 |
579 |     with pytest.raises(exc_class, match=match) as exc:
    |
info: Method defined here
    --> .venv/lib/python3.12/site-packages/pyfakefs/fake_filesystem.py:2248:9
     |
2246 |         return current_dir
2247 |
2248 |     def create_file(
     |         ^^^^^^^^^^^
2249 |         self,
2250 |         file_path: AnyPath,
     |         ------------------ Parameter declared here
2251 |         st_mode: int = S_IFREG | helpers.PERM_DEF_FILE,
2252 |         contents: AnyString = "",
     |
info: rule `invalid-argument-type` is enabled by default

error[unresolved-attribute]: Object of type `BaseException` has no attribute `details`
   --> tests/unit/models/test_project.py:582:12
    |
580 |         project.CharmcraftProject.from_yaml_file(pathlib.Path("/charmcraft.yaml"))
581 |
582 |     assert exc.value.details == details
    |            ^^^^^^^^^^^^^^^^^
    |
info: rule `unresolved-attribute` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/unit/models/test_project.py:708:13
    |
706 |             description="",
707 |             base=base,
708 |             platforms={"amd64": None},
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `PlatformsDict`, found `dict[Unknown | str, Unknown | None]`
709 |             parts={"charm": {"plugin": "charm"}},
710 |         )
    |
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[unresolved-attribute]: Object of type `BaseException` has no attribute `errors`
   --> tests/unit/parts/plugins/test_charm.py:140:11
    |
138 |     with pytest.raises(pydantic.ValidationError) as raised:
139 |         parts.plugins.CharmPlugin.properties_class.unmarshal(content)
140 |     err = raised.value.errors()
    |           ^^^^^^^^^^^^^^^^^^^
141 |
142 |     assert len(err) == 1
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `BaseException` has no attribute `errors`
   --> tests/unit/parts/plugins/test_charm.py:175:11
    |
173 |     with pytest.raises(pydantic.ValidationError) as raised:
174 |         parts.plugins.CharmPlugin.properties_class.unmarshal(content)
175 |     err = raised.value.errors()
    |           ^^^^^^^^^^^^^^^^^^^
176 |     assert len(err) == 1
177 |     assert err[0]["loc"] == ("charm-entrypoint",)
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `BaseException` has no attribute `errors`
   --> tests/unit/parts/plugins/test_charm.py:190:11
    |
188 |     with pytest.raises(pydantic.ValidationError) as raised:
189 |         parts.plugins.CharmPlugin.properties_class.unmarshal(content)
190 |     err = raised.value.errors()
    |           ^^^^^^^^^^^^^^^^^^^
191 |     assert len(err) == 1
192 |     assert err[0]["loc"] == ("charm-entrypoint",)
    |
info: rule `unresolved-attribute` 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[unresolved-attribute]: Object of type `BaseException` has no attribute `reason`
   --> tests/unit/parts/plugins/test_reactive.py:139:12
    |
137 |         validator.validate_environment()
138 |
139 |     assert raised.value.reason == (
    |            ^^^^^^^^^^^^^^^^^^^
140 |         "charm tool not found and part 'my-part' does not depend on a part named 'charm-tools'"
141 |     )
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `BaseException` has no attribute `reason`
   --> tests/unit/parts/plugins/test_reactive.py:153:12
    |
151 |         validator.validate_environment()
152 |
153 |     assert raised.value.reason == "charm tools failed with error code 2"
    |            ^^^^^^^^^^^^^^^^^^^
    |
info: rule `unresolved-attribute` 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

error[invalid-argument-type]: Argument to bound method `create_file` is incorrect
  --> tests/unit/test_charm_builder.py:39:33
   |
37 |     fs.makedirs(const.BUILD_DIRNAME)
38 |     fs.makedirs("install")
39 |     charm_file = fs.create_file("src/charm.py")
   |                                 ^^^^^^^^^^^^^^ Expected `typing.TypeVar | PathLike[Unknown]`, found `Literal["src/charm.py"]`
40 |
41 |     return charm_builder.CharmBuilder(
   |
info: Method defined here
    --> .venv/lib/python3.12/site-packages/pyfakefs/fake_filesystem.py:2248:9
     |
2246 |         return current_dir
2247 |
2248 |     def create_file(
     |         ^^^^^^^^^^^
2249 |         self,
2250 |         file_path: AnyPath,
     |         ------------------ Parameter declared here
2251 |         st_mode: int = S_IFREG | helpers.PERM_DEF_FILE,
2252 |         contents: AnyString = "",
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `create_file` is incorrect
  --> tests/unit/test_charm_builder.py:59:20
   |
57 |     fs: FakeFilesystem, builder, requirements, python_packages, binary_python_packages
58 | ):
59 |     fs.create_file("requirements.txt", contents=requirements)
   |                    ^^^^^^^^^^^^^^^^^^ Expected `typing.TypeVar | PathLike[Unknown]`, found `Literal["requirements.txt"]`
60 |     builder.strict_dependencies = True
61 |     builder.python_packages = python_packages
   |
info: Method defined here
    --> .venv/lib/python3.12/site-packages/pyfakefs/fake_filesystem.py:2248:9
     |
2246 |         return current_dir
2247 |
2248 |     def create_file(
     |         ^^^^^^^^^^^
2249 |         self,
2250 |         file_path: AnyPath,
     |         ------------------ Parameter declared here
2251 |         st_mode: int = S_IFREG | helpers.PERM_DEF_FILE,
2252 |         contents: AnyString = "",
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `create_file` is incorrect
   --> tests/unit/test_charm_builder.py:103:20
    |
101 |     fs: FakeFilesystem, fake_process: FakeProcess, builder, requirements
102 | ):
103 |     fs.create_file("requirements.txt", contents=requirements)
    |                    ^^^^^^^^^^^^^^^^^^ Expected `typing.TypeVar | PathLike[Unknown]`, found `Literal["requirements.txt"]`
104 |     expected_command = [
105 |         "/pip",
    |
info: Method defined here
    --> .venv/lib/python3.12/site-packages/pyfakefs/fake_filesystem.py:2248:9
     |
2246 |         return current_dir
2247 |
2248 |     def create_file(
     |         ^^^^^^^^^^^
2249 |         self,
2250 |         file_path: AnyPath,
     |         ------------------ Parameter declared here
2251 |         st_mode: int = S_IFREG | helpers.PERM_DEF_FILE,
2252 |         contents: AnyString = "",
     |
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[unresolved-attribute]: Object of type `BaseException` has no attribute `errors`
  --> tests/unit/test_parts.py:91:42
   |
89 |         parts.process_part_config(part_config)
90 |
91 |     assert message in {e["msg"] for e in exc_info.value.errors()}
   |                                          ^^^^^^^^^^^^^^^^^^^^^
   |
info: rule `unresolved-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

error[unresolved-attribute]: Object of type `BaseException` has no attribute `extra_dependencies`
   --> tests/unit/utils/test_package.py:221:12
    |
219 |         validate_strict_dependencies(dependencies, other_packages)
220 |
221 |     assert exc_info.value.extra_dependencies == extra_packages
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `BaseException` has no attribute `details`
   --> tests/unit/utils/test_platform.py:162:12
    |
160 |         validate_architectures(architectures)
161 |
162 |     assert exc_info.value.details == details
    |            ^^^^^^^^^^^^^^^^^^^^^^
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `BaseException` has no attribute `resolution`
   --> tests/unit/utils/test_project.py:111:17
    |
110 |     check.equal(exc_info.value.args, expected.args)
111 |     check.equal(exc_info.value.resolution, expected.resolution)
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^
    |
info: rule `unresolved-attribute` is enabled by default

Found 154 diagnostics

@lengau lengau requested a review from a team December 5, 2025 22:45
@lengau lengau marked this pull request as ready for review December 5, 2025 22:45
@github-actions
Copy link

github-actions bot commented Dec 5, 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/567/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/567/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/567/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/567/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/567/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/567/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/567/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/567/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/567/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/567/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/567/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/567/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/567/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/567/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/567/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/567/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/567/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/567/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your 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/567/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/567/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/567/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/567/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/567/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/567/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/567/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/567/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/567/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/567/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/567/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/567/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/567/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/567/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/567/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/567/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/567/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/567/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/567/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/567/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/567/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/567/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/567/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/567/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make 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/567/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/567/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/567/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/567/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/567/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/567/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/567/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/567/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/567/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/567/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/567/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/567/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/567/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/567/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/567/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/567/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/567/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/567/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/567/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/567/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/567/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/567/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/567/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/567/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/567/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/567/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/567/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/567/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/567/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/567/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/567/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/567/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/567/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/567/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/567/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/567/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/567/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/567/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/567/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/567/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/567/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/567/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/567/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/567/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/567/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/567/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/567/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/567/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/567/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/567/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/567/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/567/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/567/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/567/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/567/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/567/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/567/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/567/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/567/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/567/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/567/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/567/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/567/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/567/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/567/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/567/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make 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:708:13
    |
706 |             description="",
707 |             base=base,
708 |             platforms={"amd64": None},
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `PlatformsDict`, found `dict[Unknown | str, Unknown | None]`
709 |             parts={"charm": {"plugin": "charm"}},
710 |         )
    |
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
Collaborator

lengau commented Dec 8, 2025

Test failures are out of scope here. Thanks for the fix

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR replaces the spread-large.yaml workflow with a new spread-manual.yaml workflow that adds manual trigger functionality via the 'PR: Run Manual Spread' label. The new workflow introduces a predicate job to conditionally run tests based on whether they are triggered by a schedule, manual dispatch, or the presence of the label on a PR, making it more flexible and aligned with similar patterns in other Canonical craft projects.

Key changes:

  • Introduces a predicate job that evaluates whether tests should run based on event type or PR labels
  • Adds snap-build job to build the charmcraft snap from source instead of downloading from the edge channel
  • Updates pull request triggers to include the "labeled" event type to support the new label-based workflow execution

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
.github/workflows/spread-manual.yaml New workflow file that replaces spread-large.yaml with conditional execution via predicate job, snap building, and label-based triggering
.github/workflows/spread-large.yaml Removed the old weekly spread workflow that unconditionally ran on schedule and workflow_dispatch

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link

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/574/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/574/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/574/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/574/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/574/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/574/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/574/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/574/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/574/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/574/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/574/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/574/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/574/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/574/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/574/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/574/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/574/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/574/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your 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/574/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/574/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/574/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/574/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/574/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/574/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/574/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/574/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/574/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/574/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/574/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/574/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/574/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/574/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/574/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/574/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/574/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/574/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/574/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/574/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/574/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/574/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/574/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/574/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make 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/574/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/574/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/574/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/574/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/574/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/574/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/574/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/574/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/574/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/574/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/574/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/574/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/574/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/574/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/574/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/574/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/574/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/574/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/574/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/574/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/574/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/574/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/574/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/574/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/574/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/574/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/574/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/574/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/574/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/574/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/574/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/574/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/574/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/574/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/574/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/574/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/574/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/574/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/574/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/574/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/574/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/574/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/574/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/574/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/574/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/574/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/574/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/574/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/574/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/574/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/574/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/574/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/574/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/574/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/574/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/574/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/574/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/574/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/574/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/574/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/574/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/574/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/574/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/574/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/574/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/574/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make 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:708:13
    |
706 |             description="",
707 |             base=base,
708 |             platforms={"amd64": None},
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `PlatformsDict`, found `dict[Unknown | str, Unknown | None]`
709 |             parts={"charm": {"plugin": "charm"}},
710 |         )
    |
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

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:708:13
    |
706 |             description="",
707 |             base=base,
708 |             platforms={"amd64": None},
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `PlatformsDict`, found `dict[Unknown | str, Unknown | None]`
709 |             parts={"charm": {"plugin": "charm"}},
710 |         )
    |
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 lengau merged commit e0c8f7a into main Dec 8, 2025
19 of 25 checks passed
@lengau lengau deleted the work/manual-spread-label branch December 8, 2025 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: Run Manual Spread This PR should run the manual test suite.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants