Skip to content

Fix upload crash when run outside project directory#2497

Draft
Copilot wants to merge 10 commits intohotfix/4.1from
copilot/fix-charmcraft-upload-crash
Draft

Fix upload crash when run outside project directory#2497
Copilot wants to merge 10 commits intohotfix/4.1from
copilot/fix-charmcraft-upload-crash

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Dec 3, 2025

Fixed a bug where charmcraft upload crashes with RuntimeError("Project not configured yet.") when run outside a directory containing charmcraft.yaml.

Root Cause

The UploadCommand.needs_project() method checks if charmcraft.yaml exists, but this doesn't mean the project service will be configured. After a successful upload, the code tried to check for unpublished charm libraries without first checking if the project was configured.

Solution

Check project_service.is_configured before calling project_service.get() to ensure the project is configured before accessing it.

Changes Made

  1. Modified UploadCommand.run() in charmcraft/application/commands/store.py to check if project is configured before accessing it
  2. Added unit test test_upload_without_configured_project in tests/unit/commands/test_store.py to verify the fix
  3. Fixed type annotation for Uploaded.status field from int to str in charmcraft/store/models.py to resolve mypy lint error
  4. Added spread test in tests/spread/store/upload-outside-project/ for end-to-end integration testing:
    • Minimal charmcraft.yaml file with staging store configuration and plugin: nil for fast builds
    • task.yaml that uses charmcraft init to create a charm, copies the minimal config, packs the charm, moves it outside the project directory, and uploads it

Testing

  • Unit test: Verifies the fix at the code level by mocking the upload scenario without a configured project
  • Spread test: End-to-end integration test that creates a charm with a minimal charmcraft.yaml using the nil plugin for fast builds, packs it in the project directory, moves the charm file to a directory without charmcraft.yaml, and uploads from outside the project directory to verify no crash occurs
  • All 203 command tests pass
  • No security vulnerabilities introduced

Notes

The bug is in charmcraft, not craft-application. The craft-application library is working as designed by raising a RuntimeError when trying to get an unconfigured project.


  • I've followed the contribution guidelines.
  • I've signed the CLA.
  • I've successfully run make lint && make test.
  • I've added or updated any relevant documentation.
  • I've updated the relevant release notes.
Original prompt

This section details on the original issue you should resolve

<issue_title>Charmcraft crashes with internal error when uploading outside of project directory</issue_title>
<issue_description>### Check existing issues

  • I've verified that this bug isn't described by any existing issues.

Bug description

When performing an upload of a charm with charmcraft upload outside of a directory with a charmcraft.yaml, then the upload succeeds but charmcraft crashes at the end with RuntimeError("Project not configured yet."). This was not present with earlier versions (< 4.x)

Steps to reproduce

Take a .charm and run charmcraft upload ./my.charm from outside the directory where the charmcraft.yaml is located

Environment

Running on Ubuntu 25.10

charmcraft.yaml

n/a

Log output

simon@ersa ~/W/anbox-cloud-charms (main)> charmcraft upload --release 1.28/edge --name aar ./aar_ubuntu@22.04-amd64.charm
charmcraft internal error: RuntimeError('Project not configured yet.')
Full execution log: '/home/simon/.local/state/charmcraft/log/charmcraft-20251126-161538.963709.log'

simon@ersa ~/W/anbox-cloud-charms (main) [70]> cat '/home/simon/.local/state/charmcraft/log/charmcraft-20251126-161538.963709.log'
2025-11-26 16:15:38.964 Starting charmcraft, version 4.0.1
....
2025-11-26 16:15:45.461 Setting up ProjectService
2025-11-26 16:15:45.461 charmcraft internal error: RuntimeError('Project not configured yet.')
2025-11-26 16:15:45.465 Traceback (most recent call last):
2025-11-26 16:15:45.465   File "/snap/charmcraft/7517/lib/python3.12/site-packages/craft_application/application.py", line 663, in run
2025-11-26 16:15:45.465     return_code = self._run_inner()
2025-11-26 16:15:45.465                   ^^^^^^^^^^^^^^^^^
2025-11-26 16:15:45.465   File "/snap/charmcraft/7517/lib/python3.12/site-packages/charmcraft/application/main.py", line 143, in _run_inner
2025-11-26 16:15:45.465     return super()._run_inner()
2025-11-26 16:15:45.465            ^^^^^^^^^^^^^^^^^^^^
2025-11-26 16:15:45.465   File "/snap/charmcraft/7517/lib/python3.12/site-packages/craft_application/application.py", line 640, in _run_inner
2025-11-26 16:15:45.465     return_code = dispatcher.run() or os.EX_OK
2025-11-26 16:15:45.465                   ^^^^^^^^^^^^^^^^
2025-11-26 16:15:45.465   File "/snap/charmcraft/7517/lib/python3.12/site-packages/craft_cli/dispatcher.py", line 564, in run
2025-11-26 16:15:45.465     return self._loaded_command.run(self._parsed_command_args)
2025-11-26 16:15:45.465            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-11-26 16:15:45.465   File "/snap/charmcraft/7517/lib/python3.12/site-packages/charmcraft/application/commands/store.py", line 586, in run
2025-11-26 16:15:45.465     if project := self._services.get("project").get():
2025-11-26 16:15:45.465                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-11-26 16:15:45.465   File "/snap/charmcraft/7517/lib/python3.12/site-packages/craft_application/services/project.py", line 605, in get
2025-11-26 16:15:45.465     raise RuntimeError("Project not configured yet.")
2025-11-26 16:15:45.466 RuntimeError: Project not configured yet.
2025-11-26 16:15:45.466 Full execution log: '/home/simon/.local/state/charmcraft/log/charmcraft-20251126-161538.963709.log'
```</issue_description>

<agent_instructions>1. Write a test that checks whether this bug is still relevant with the latest main branch.
2. Determine whether the bug is in charmcraft or in craft-application.
3. If the bug is in charmcraft, not craft-application, write a fix for it.</agent_instructions>

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

<comments>
</comments>

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits December 3, 2025 18:32
Co-authored-by: lengau <4305943+lengau@users.noreply.github.com>
Co-authored-by: lengau <4305943+lengau@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix charmcraft internal error on upload outside project directory Fix upload crash when run outside project directory Dec 3, 2025
Copilot AI requested a review from lengau December 3, 2025 18:47
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Dec 3, 2025

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

error[invalid-argument-type]: Argument is incorrect
   --> tests/unit/commands/test_store.py:613:9
    |
611 |     mock_store_instance.upload.return_value = Uploaded(
612 |         ok=True,
613 |         status="approved",
    |         ^^^^^^^^^^^^^^^^^ Expected `int`, found `Literal["approved"]`
614 |         revision=42,
615 |         errors=[],
    |
info: rule `invalid-argument-type` 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 126 diagnostics

@lengau
Copy link
Copy Markdown
Collaborator

lengau commented Dec 3, 2025

@copilot before committing any changes, make lint and make test should both succeed.

@lengau
Copy link
Copy Markdown
Collaborator

lengau commented Dec 5, 2025

@copilot fix the lint errors

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

Copilot AI commented Dec 5, 2025

@copilot fix the lint errors

Fixed in 72d15d3. The mypy error was due to an incorrect type annotation in the Uploaded model - the status field was annotated as int but the actual runtime code uses string values like "approved" or "rejected".

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • canonical-bos01.cdn.snapcraftcontent.com
    • Triggering command: /usr/lib/snapd/snapd /usr/lib/snapd/snapd (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

@lengau
Copy link
Copy Markdown
Collaborator

lengau commented Dec 6, 2025

@copilot create a spread test that checks this.

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

Copilot AI commented Dec 6, 2025

@copilot create a spread test that checks this.

Created spread test in 424a6c4. The test creates a charm, packs it, moves the charm file to a directory without charmcraft.yaml, and uploads from there to verify the fix works end-to-end.


prepare: |
tests.pkgs install jq
charmcraft init --project-dir=charm --name=$CHARM_DEFAULT_NAME --profile=machine
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@copilot instead of doing this, include a minimal charmcraft.yaml file in this directory.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Updated in 6d134ba. The test now includes a minimal charmcraft.yaml file directly in the test directory instead of full charm subdirectory structure.

Instead of using charmcraft init, include charm/ and upload-dir/
subdirectories with pre-existing charmcraft.yaml file. This follows
the pattern used in other spread tests.

Co-authored-by: lengau <4305943+lengau@users.noreply.github.com>
Instead of including full charm/ subdirectory structure, include only a
minimal charmcraft.yaml file in the test directory and use charmcraft init
to create the charm structure, then copy the minimal config.

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

Copilot AI commented Dec 8, 2025

@copilot fix the lint errors

Fixed in 72d15d3. The mypy error was due to an incorrect type annotation in the Uploaded model - the status field was annotated as int but the actual runtime code uses string values like "approved" or "rejected".

@copilot create a spread test that checks this.

Created spread test in 424a6c4, updated to use pre-existing subdirectories in 3bb3a2c, and simplified to use minimal charmcraft.yaml in 6d134ba.

channel: "22.04"
run-on:
- name: ubuntu
channel: "22.04"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@copilot add a part here with plugin nil so that we don't spend a long time building

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Added in 22a5375. The charmcraft.yaml now includes a parts section with plugin: nil to speed up the build.

Add a parts section with plugin: nil to avoid spending time on
unnecessary build operations during the spread test.

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

github-actions Bot commented Dec 8, 2025

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

error[invalid-argument-type]: Argument is incorrect
   --> tests/unit/models/test_project.py: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

1 similar comment
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Dec 8, 2025

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

error[invalid-argument-type]: Argument is incorrect
   --> tests/unit/models/test_project.py: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 changed the base branch from main to hotfix/4.1 December 11, 2025 21:49
@github-actions
Copy link
Copy Markdown

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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: 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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your 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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make 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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make 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 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 150 diagnostics

@github-actions
Copy link
Copy Markdown

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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: 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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your 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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make 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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly configured: https://docs.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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make sure your Python environment is properly 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/584/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/584/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   ... and 1 more paths. Run with `-v` to see all paths.
info: make 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 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 150 diagnostics


# Initialize a charm project and use our minimal charmcraft.yaml
charmcraft init --project-dir=charm
cp charmcraft.yaml charm/charmcraft.yaml
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@copilot

2025-12-08 21:54:36 Error preparing google:ubuntu-22.04-64:tests/spread/store/upload-outside-project (dec082151-659570) : 
-----
+ tests.pkgs install jq
+ apt-get update
Hit:1 http://us-east1.gce.archive.ubuntu.com/ubuntu jammy InRelease
Hit:2 http://us-east1.gce.archive.ubuntu.com/ubuntu jammy-updates InRelease
Hit:3 http://us-east1.gce.archive.ubuntu.com/ubuntu jammy-backports InRelease
Hit:4 http://security.ubuntu.com/ubuntu jammy-security InRelease
Reading package lists...
+ apt-get install --yes jq
Reading package lists...
Building dependency tree...
Reading state information...
jq is already the newest version (1.6-2.1ubuntu3.1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
+ set +x
+ charmcraft init --project-dir=charm
2025-12-08 21:54:35.764 Starting charmcraft, version 4.0.0.post38+gdf7ef869.d20251208
2025-12-08 21:54:35.764 Logging execution to '/root/.local/state/charmcraft/log/charmcraft-20251208-215435.763030.log'
2025-12-08 21:54:35.764 Log verbosity level set to DEBUG
2025-12-08 21:54:35.764 Setting up CharmBuildPlanService
2025-12-08 21:54:35.764 Setting up ProjectService
2025-12-08 21:54:35.772 Preparing application...
2025-12-08 21:54:35.772 Setting up ConfigService
2025-12-08 21:54:35.773 Configuring application...
2025-12-08 21:54:35.773 Getting runtime directory.
2025-12-08 21:54:35.773 Using '/run/user/0/4525' for the state directory.
2025-12-08 21:54:35.773 Setting up StateService
2025-12-08 21:54:35.773 Setting 'charmcraft.started_at' to '2025-12-08T21:54:35.773611'.
2025-12-08 21:54:35.773 Loading state file '/run/user/0/4525/charmcraft.yaml'.
2025-12-08 21:54:35.773 State file doesn't exist.
2025-12-08 21:54:35.773 Writing state to '/run/user/0/4525/charmcraft.yaml'.
2025-12-08 21:54:35.774 Set 'charmcraft.started_at' to '2025-12-08T21:54:35.773611'.
2025-12-08 21:54:35.775 Configuring application...
2025-12-08 21:54:35.776 Setting 'charmcraft.started_at' to '2025-12-08T21:54:35.776055'.
2025-12-08 21:54:35.776 Loading state file '/run/user/0/4525/charmcraft.yaml'.
2025-12-08 21:54:35.776 Overwriting existing value.
2025-12-08 21:54:35.777 Writing state to '/run/user/0/4525/charmcraft.yaml'.
2025-12-08 21:54:35.777 Set 'charmcraft.started_at' to '2025-12-08T21:54:35.776055'.
2025-12-08 21:54:35.799 Build plan: platform=None, build_for=None
2025-12-08 21:54:35.800 Running charmcraft init on host
2025-12-08 21:54:35.800 Using project directory '/charmcraft/tests/spread/store/upload-outside-project/charm'
2025-12-08 21:54:35.800 Set project name to 'charm'
2025-12-08 21:54:35.804 Rendering .gitignore
2025-12-08 21:54:35.805 Rendering CONTRIBUTING.md
2025-12-08 21:54:35.809 Rendering LICENSE
2025-12-08 21:54:35.811 Rendering README.md
2025-12-08 21:54:35.812 Rendering charmcraft.yaml
2025-12-08 21:54:35.814 Rendering pyproject.toml
2025-12-08 21:54:35.817 Rendering src/charm.py
2025-12-08 21:54:35.817   made executable
2025-12-08 21:54:35.818 Rendering src/workload.py
2025-12-08 21:54:35.820 Rendering tests/integration/conftest.py
2025-12-08 21:54:35.822 Rendering tests/integration/test_charm.py
2025-12-08 21:54:35.825 Rendering tests/unit/test_charm.py
2025-12-08 21:54:35.826 Rendering tox.ini
2025-12-08 21:54:35.838 Rendering uv.lock
Charmed operator package file and directory tree initialised.

Now edit the following package files to provide fundamental charm metadata
and other information:

charmcraft.yaml
src/charm.py
src/workload.py
README.md

To manage your charm's dependencies, use uv.

To migrate from the Charm plugin to the uv plugin, see:
https://documentation.ubuntu.com/charmcraft/stable/howto/migrate-plugins/charm-to-uv/

+ cp charmcraft.yaml charm/charmcraft.yaml
cp: cannot stat 'charmcraft.yaml': No such file or directory
-----

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Charmcraft crashes with internal error when uploading outside of project directory

2 participants