Skip to content

build(deps): update github actions (main)#2595

Open
renovate[bot] wants to merge 1 commit intomainfrom
renovate/main-github-actions
Open

build(deps): update github actions (main)#2595
renovate[bot] wants to merge 1 commit intomainfrom
renovate/main-github-actions

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Mar 14, 2026

This PR contains the following updates:

Package Type Update Change
go uses-with minor 1.241.26
python uses-with minor 3.123.14
python uses-with minor 3.103.14

Release Notes

actions/go-versions (go)

v1.26.1: 1.26.1

Compare Source

Go 1.26.1

v1.26.0: 1.26.0

Compare Source

Go 1.26.0

v1.25.8: 1.25.8

Compare Source

Go 1.25.8

v1.25.7: 1.25.7

Compare Source

Go 1.25.7

v1.25.6: 1.25.6

Compare Source

Go 1.25.6

v1.25.5: 1.25.5

Compare Source

Go 1.25.5

v1.25.4: 1.25.4

Compare Source

Go 1.25.4

v1.25.3: 1.25.3

Compare Source

Go 1.25.3

v1.25.2: 1.25.2

Compare Source

Go 1.25.2

v1.25.1: 1.25.1

Compare Source

Go 1.25.1

v1.25.0: 1.25.0

Compare Source

Go 1.25.0

actions/python-versions (python)

v3.14.3: 3.14.3

Compare Source

Python 3.14.3

v3.14.2: 3.14.2

Compare Source

Python 3.14.2

v3.14.1: 3.14.1

Compare Source

Python 3.14.1

v3.14.0: 3.14.0

Compare Source

Python 3.14.0

v3.13.12: 3.13.12

Compare Source

Python 3.13.12

v3.13.11: 3.13.11

Compare Source

Python 3.13.11

v3.13.10: 3.13.10

Compare Source

Python 3.13.10

v3.13.9: 3.13.9

Compare Source

Python 3.13.9

v3.13.8: 3.13.8

Compare Source

Python 3.13.8

v3.13.7: 3.13.7

Compare Source

Python 3.13.7

v3.13.6: 3.13.6

Compare Source

Python 3.13.6

v3.13.5: 3.13.5

Compare Source

Python 3.13.5

v3.13.4: 3.13.4

Compare Source

Python 3.13.4

v3.13.3: 3.13.3

Compare Source

Python 3.13.3

v3.13.2: 3.13.2

Compare Source

Python 3.13.2

v3.13.1: 3.13.1

Compare Source

Python 3.13.1

v3.13.0: 3.13.0

Compare Source

Python 3.13.0


Configuration

📅 Schedule: Branch creation - "every weekend" in timezone Etc/UTC, Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot added the PR: Dependencies This PR updates project dependencies. label Mar 14, 2026
@renovate renovate bot requested a review from lengau as a code owner March 14, 2026 18:52
@renovate renovate bot requested a review from a team March 14, 2026 18:52
@github-actions
Copy link

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

Command output
error[unresolved-attribute]: Attribute `bases` is not defined on `PlatformCharm` in union `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 `unresolved-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

error[unresolved-attribute]: Attribute `split` is not defined on `None` in union `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 `unresolved-attribute` is enabled by default

error[unsupported-operator]: Unsupported `>=` operation
   --> charmcraft/linters.py:793:16
    |
791 |         for match in MIN_VERSION_REGEX.finditer(dep_spec):
792 |             spec_matched = True
793 |             if version >= cls.get_version_tuple(match.group(1)):
    |                -------^^^^-------------------------------------
    |                |
    |                Both operands have type `tuple[int | str, ...]`
794 |                 return True
795 |         for match in EXACT_VERSION_REGEX.finditer(dep_spec):
    |
info: Operation fails because operator `>=` is not supported between objects of type `int` and `str`
info: rule `unsupported-operator` is enabled by default

warning[unused-type-ignore-comment]: Unused blanket `type: ignore` directive
   --> charmcraft/models/metadata.py:110:31
    |
109 |     # These are looser in the metadata.yaml schema than charmcraft requires.
110 |     name: pydantic.StrictStr  # type: ignore[assignment]
    |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^
111 |     summary: pydantic.StrictStr  # type: ignore[assignment]
112 |     description: pydantic.StrictStr
    |
help: Remove the unused suppression comment
107 |     """
108 | 
109 |     # These are looser in the metadata.yaml schema than charmcraft requires.
    -     name: pydantic.StrictStr  # type: ignore[assignment]
110 +     name: pydantic.StrictStr
111 |     summary: pydantic.StrictStr  # type: ignore[assignment]
112 |     description: pydantic.StrictStr
113 |     display_name: pydantic.StrictStr | None = None  # type: ignore[assignment]

warning[unused-type-ignore-comment]: Unused blanket `type: ignore` directive
   --> charmcraft/models/metadata.py:111:34
    |
109 |     # These are looser in the metadata.yaml schema than charmcraft requires.
110 |     name: pydantic.StrictStr  # type: ignore[assignment]
111 |     summary: pydantic.StrictStr  # type: ignore[assignment]
    |                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^
112 |     description: pydantic.StrictStr
113 |     display_name: pydantic.StrictStr | None = None  # type: ignore[assignment]
    |
help: Remove the unused suppression comment
108 | 
109 |     # These are looser in the metadata.yaml schema than charmcraft requires.
110 |     name: pydantic.StrictStr  # type: ignore[assignment]
    -     summary: pydantic.StrictStr  # type: ignore[assignment]
111 +     summary: pydantic.StrictStr
112 |     description: pydantic.StrictStr
113 |     display_name: pydantic.StrictStr | None = None  # type: ignore[assignment]
114 | 

warning[unused-type-ignore-comment]: Unused blanket `type: ignore` directive
   --> charmcraft/models/metadata.py:113:53
    |
111 |     summary: pydantic.StrictStr  # type: ignore[assignment]
112 |     description: pydantic.StrictStr
113 |     display_name: pydantic.StrictStr | None = None  # type: ignore[assignment]
    |                                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^
114 |
115 |     @override
    |
help: Remove the unused suppression comment
110 |     name: pydantic.StrictStr  # type: ignore[assignment]
111 |     summary: pydantic.StrictStr  # type: ignore[assignment]
112 |     description: pydantic.StrictStr
    -     display_name: pydantic.StrictStr | None = None  # type: ignore[assignment]
113 +     display_name: pydantic.StrictStr | None = None
114 | 
115 |     @override
116 |     @classmethod

warning[unused-type-ignore-comment]: Unused blanket `type: ignore` directive
  --> charmcraft/parts/lifecycle.py:28:32
   |
26 | from craft_cli import CraftError, emit
27 | from craft_parts import LifecycleManager, PartsError, Step
28 | from xdg import BaseDirectory  # type: ignore[import]
   |                                ^^^^^^^^^^^^^^^^^^^^^^
29 |
30 | from charmcraft import const, instrum
   |
help: Remove the unused suppression comment
25 | 
26 | from craft_cli import CraftError, emit
27 | from craft_parts import LifecycleManager, PartsError, Step
   - from xdg import BaseDirectory  # type: ignore[import]
28 + from xdg import BaseDirectory
29 | 
30 | from charmcraft import const, instrum
31 | 

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[unused-type-ignore-comment]: Unused blanket `type: ignore` directive
  --> charmcraft/parts/plugins/_poetry.py:37:39
   |
36 |     properties_class = PoetryPluginProperties
37 |     _options: PoetryPluginProperties  # type: ignore[reportIncompatibleVariableOverride]
   |                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
38 |
39 |     def get_build_environment(self) -> dict[str, str]:
   |
help: Remove the unused suppression comment
34 |     """Charmcraft-specific version of the poetry plugin."""
35 | 
36 |     properties_class = PoetryPluginProperties
   -     _options: PoetryPluginProperties  # type: ignore[reportIncompatibleVariableOverride]
37 +     _options: PoetryPluginProperties
38 | 
39 |     def get_build_environment(self) -> dict[str, str]:
40 |         return utils.extend_python_build_environment(super().get_build_environment())

warning[unused-type-ignore-comment]: Unused blanket `type: ignore` directive
  --> charmcraft/parts/plugins/_python.py:37:39
   |
36 |     properties_class = PythonPluginProperties
37 |     _options: PythonPluginProperties  # type: ignore[reportIncompatibleVariableOverride]
   |                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
38 |
39 |     @override
   |
help: Remove the unused suppression comment
34 |     """Charmcraft-specific version of the python plugin."""
35 | 
36 |     properties_class = PythonPluginProperties
   -     _options: PythonPluginProperties  # type: ignore[reportIncompatibleVariableOverride]
37 +     _options: PythonPluginProperties
38 | 
39 |     @override
40 |     def get_build_environment(self) -> dict[str, str]:

warning[unused-type-ignore-comment]: Unused blanket `type: ignore` directive
  --> charmcraft/services/analysis.py:35:41
   |
33 |     """Business logic for creating packages."""
34 |
35 |     _project: models.CharmcraftProject  # type: ignore[assignment]
   |                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^
36 |
37 |     def __init__(  # (too many arguments)
   |
help: Remove the unused suppression comment
32 | class AnalysisService(craft_application.AppService):
33 |     """Business logic for creating packages."""
34 | 
   -     _project: models.CharmcraftProject  # type: ignore[assignment]
35 +     _project: models.CharmcraftProject
36 | 
37 |     def __init__(  # (too many arguments)
38 |         self,

warning[unused-type-ignore-comment]: Unused blanket `type: ignore` directive
  --> charmcraft/services/image.py:25:16
   |
24 | import craft_application
25 | import docker  # type: ignore[import-untyped]
   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
26 | import docker.errors  # type: ignore[import-untyped]
27 | import docker.models.images  # type: ignore[import-untyped]
   |
help: Remove the unused suppression comment
22 | from collections.abc import Sequence
23 | 
24 | import craft_application
   - import docker  # type: ignore[import-untyped]
25 + import docker
26 | import docker.errors  # type: ignore[import-untyped]
27 | import docker.models.images  # type: ignore[import-untyped]
28 | from overrides import override

warning[unused-type-ignore-comment]: Unused blanket `type: ignore` directive
  --> charmcraft/services/image.py:26:23
   |
24 | import craft_application
25 | import docker  # type: ignore[import-untyped]
26 | import docker.errors  # type: ignore[import-untyped]
   |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
27 | import docker.models.images  # type: ignore[import-untyped]
28 | from overrides import override
   |
help: Remove the unused suppression comment
23 | 
24 | import craft_application
25 | import docker  # type: ignore[import-untyped]
   - import docker.errors  # type: ignore[import-untyped]
26 + import docker.errors
27 | import docker.models.images  # type: ignore[import-untyped]
28 | from overrides import override
29 | 

warning[unused-type-ignore-comment]: Unused blanket `type: ignore` directive
  --> charmcraft/services/image.py:27:30
   |
25 | import docker  # type: ignore[import-untyped]
26 | import docker.errors  # type: ignore[import-untyped]
27 | import docker.models.images  # type: ignore[import-untyped]
   |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
28 | from overrides import override
   |
help: Remove the unused suppression comment
24 | import craft_application
25 | import docker  # type: ignore[import-untyped]
26 | import docker.errors  # type: ignore[import-untyped]
   - import docker.models.images  # type: ignore[import-untyped]
27 + import docker.models.images
28 | from overrides import override
29 | 
30 | from charmcraft import const, errors, utils

warning[unused-type-ignore-comment]: Unused blanket `type: ignore` directive
   --> charmcraft/services/provider.py:99:24
    |
 97 |             instance_name=instance_name,
 98 |             # craft-application annotation is incorrect
 99 |             **kwargs,  # type: ignore[arg-type]
    |                        ^^^^^^^^^^^^^^^^^^^^^^^^
100 |         )
    |
help: Remove the unused suppression comment
96  |             base_name,
97  |             instance_name=instance_name,
98  |             # craft-application annotation is incorrect
    -             **kwargs,  # type: ignore[arg-type]
99  +             **kwargs,
100 |         )
101 | 
102 |     @override

warning[unused-type-ignore-comment]: Unused blanket `type: ignore` directive
  --> charmcraft/services/remotebuild.py:23:35
   |
21 | from typing import Any
22 |
23 | import lazr.restfulclient.errors  # type: ignore[import-untyped]
   |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
24 | from craft_application import launchpad
25 | from craft_application.services import remotebuild
   |
help: Remove the unused suppression comment
20 | from collections.abc import Mapping
21 | from typing import Any
22 | 
   - import lazr.restfulclient.errors  # type: ignore[import-untyped]
23 + import lazr.restfulclient.errors
24 | from craft_application import launchpad
25 | from craft_application.services import remotebuild
26 | from overrides import override

warning[unused-type-ignore-comment]: Unused blanket `type: ignore` directive
  --> charmcraft/store/client.py:29:34
   |
27 | from craft_cli import CraftError, emit
28 | from craft_store import endpoints
29 | from requests_toolbelt import (  # type: ignore[import]
   |                                  ^^^^^^^^^^^^^^^^^^^^^^
30 |     MultipartEncoder,
31 |     MultipartEncoderMonitor,
   |
help: Remove the unused suppression comment
26 | import requests
27 | from craft_cli import CraftError, emit
28 | from craft_store import endpoints
   - from requests_toolbelt import (  # type: ignore[import]
29 + from requests_toolbelt import (
30 |     MultipartEncoder,
31 |     MultipartEncoderMonitor,
32 | )

error[unresolved-attribute]: Attribute `login` is not defined on `AnonymousClient` in union `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 `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `logout` is not defined on `AnonymousClient` in union `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 `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `whoami` is not defined on `AnonymousClient` in union `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 `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `whoami` is not defined on `AnonymousClient` in union `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 `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `unregister_name` is not defined on `AnonymousClient` in union `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 `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `push_file` is not defined on `AnonymousClient` in union `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 `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `list_resource_revisions` is not defined on `AnonymousClient` in union `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 `unresolved-attribute` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> docs/howto/code/custom-action-clearsession/clearsession_action_charm.py:10:8
   |
 8 | import typing
 9 |
10 | import ops
   |        ^^^
11 |
12 | import paas_charm.django
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/1345/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1345/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly 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/1345/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1345/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly 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/1345/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1345/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: 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/1345/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1345/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly 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/1345/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1345/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly 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/1345/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1345/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly 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/1345/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1345/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly 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/1345/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1345/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly 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/1345/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1345/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your 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/1345/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1345/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly 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/1345/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1345/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your 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 `fastapi` has no member `FastAPI`
 --> docs/tutorial/code/fastapi/app.py:1:21
  |
1 | from fastapi import FastAPI
  |                     ^^^^^^^
2 |
3 | app = FastAPI()
  |
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Module `fastapi` has no member `FastAPI`
 --> docs/tutorial/code/fastapi/greeting_app.py:3:21
  |
1 | import os
2 |
3 | from fastapi import FastAPI
  |                     ^^^^^^^
4 |
5 | app = FastAPI()
  |
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Module `fastapi` has no member `FastAPI`
 --> docs/tutorial/code/fastapi/visitors_app.py:7:21
  |
5 | from typing import Annotated
6 |
7 | from fastapi import FastAPI, Header
  |                     ^^^^^^^
8 | import psycopg2
  |
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Module `fastapi` has no member `Header`
 --> docs/tutorial/code/fastapi/visitors_app.py:7:30
  |
5 | from typing import Annotated
6 |
7 | from fastapi import FastAPI, Header
  |                              ^^^^^^
8 | import psycopg2
  |
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/1345/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1345/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly 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/1345/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1345/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-attribute]: Module `flask` has no member `Flask`
 --> docs/tutorial/code/flask/app.py:5:7
  |
3 | import flask
4 |
5 | app = flask.Flask(__name__)
  |       ^^^^^^^^^^^
  |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Module `flask` has no member `Flask`
 --> docs/tutorial/code/flask/greeting_app.py:5:7
  |
3 | import flask
4 |
5 | app = flask.Flask(__name__)
  |       ^^^^^^^^^^^
6 | app.config.from_prefixed_env()
  |
info: rule `unresolved-attribute` 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/1345/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1345/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-attribute]: Module `flask` has no member `Flask`
  --> docs/tutorial/code/flask/visitors_app.py:9:7
   |
 7 | import psycopg2
 8 |
 9 | app = flask.Flask(__name__)
   |       ^^^^^^^^^^^
10 | app.config.from_prefixed_env()
   |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Module `flask` has no member `request`
  --> docs/tutorial/code/flask/visitors_app.py:18:22
   |
16 | def index():
17 |     with psycopg2.connect(DATABASE_URI) as conn, conn.cursor() as cur:
18 |         user_agent = flask.request.headers.get('User-Agent')
   |                      ^^^^^^^^^^^^^
19 |         timestamp = datetime.datetime.now()
   |
info: rule `unresolved-attribute` 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/1345/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1345/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make 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 `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 `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 `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 `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 `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 `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 `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 `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 `list[Unknown] | datetime | str | 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 `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 `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 `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:225:9
    |
223 |     return craft_platforms.BuildInfo(
224 |         build_base=craft_platforms.DistroBase("ubuntu", "22.04"),
225 |         build_on=arch,
    |         ^^^^^^^^^^^^^ Expected `DebianArchitecture`, found `str`
226 |         build_for="arm64",
227 |         platform="distro-1-test64",
    |
info: rule `invalid-argument-type` 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-return-type]: Return type does not match returned value
  --> tests/extensions/test_extensions.py:33:37
   |
32 |     @classmethod
33 |     def get_supported_bases(cls) -> list[tuple[str, ...]]:
   |                                     --------------------- Expected `list[tuple[str, ...]]` because of return type
34 |         """Return a list of tuple of supported bases."""
35 |         return cls.bases
   |                ^^^^^^^^^ expected `list[tuple[str, ...]]`, found `Unknown | list[tuple[str, str]]`
36 |
37 |     @staticmethod
   |
info: rule `invalid-return-type` 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-submodule]: Submodule `application` might not have been imported
  --> 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-submodule` 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 `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: 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 `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: 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 `BuildInfo | Path`
57 |         # Test that the cache lock gets created
58 |         assert lock_file.is_file()
   |
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 `BuildInfo | Path`
57 |         # Test that the cache lock gets created
58 |         assert lock_file.is_file()
   |
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 `BuildInfo | Path`
57 |         # Test that the cache lock gets created
58 |         assert lock_file.is_file()
   |
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 `BuildInfo | Path`
57 |         # Test that the cache lock gets created
58 |         assert lock_file.is_file()
   |
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 `BuildInfo | Path`
57 |         # Test that the cache lock gets created
58 |         assert lock_file.is_file()
   |
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 `BuildInfo | Path`
57 |         # Test that the cache lock gets created
58 |         assert lock_file.is_file()
   |
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 `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: 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 `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: 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 `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: 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 `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: 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 `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: 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 `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: 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 `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: 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 `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: 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 `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: 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 `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: 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 `BuildInfo | Path`
135 |         instance.execute_run(["test", "-d", "/root/.cache"], check=True)
136 |         instance.execute_run(
    |
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 `BuildInfo | Path`
135 |         instance.execute_run(["test", "-d", "/root/.cache"], check=True)
136 |         instance.execute_run(
    |
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 `BuildInfo | Path`
135 |         instance.execute_run(["test", "-d", "/root/.cache"], check=True)
136 |         instance.execute_run(
    |
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 `BuildInfo | Path`
135 |         instance.execute_run(["test", "-d", "/root/.cache"], check=True)
136 |         instance.execute_run(
    |
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 `BuildInfo | Path`
135 |         instance.execute_run(["test", "-d", "/root/.cache"], check=True)
136 |         instance.execute_run(
    |
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 `BuildInfo | Path`
135 |         instance.execute_run(["test", "-d", "/root/.cache"], check=True)
136 |         instance.execute_run(
    |
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 | from ops import testing
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/1345/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1345/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/commands/init-extensions/tests/unit/test_charm.py:10:6
   |
 9 | import charm
10 | from ops import testing
   |      ^^^
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/1345/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1345/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.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/1345/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1345/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.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/1345/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1345/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

warning[unused-type-ignore-comment]: Unused blanket `type: ignore` directive
   --> tests/spread/dependencies/strict-dependencies-errors/extra-binary-packages/src/charm.py:103:27
    |
102 | if __name__ == "__main__":  # pragma: nocover
103 |     ops.main(CharmCharm)  # type: ignore
    |                           ^^^^^^^^^^^^^^
    |
help: Remove the unused suppression comment
100 | 
101 | 
102 | if __name__ == "__main__":  # pragma: nocover
    -     ops.main(CharmCharm)  # type: ignore
103 +     ops.main(CharmCharm)

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/1345/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1345/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

warning[unused-type-ignore-comment]: Unused blanket `type: ignore` directive
   --> tests/spread/dependencies/strict-dependencies-errors/extra-packages/src/charm.py:103:27
    |
102 | if __name__ == "__main__":  # pragma: nocover
103 |     ops.main(CharmCharm)  # type: ignore
    |                           ^^^^^^^^^^^^^^
    |
help: Remove the unused suppression comment
100 | 
101 | 
102 | if __name__ == "__main__":  # pragma: nocover
    -     ops.main(CharmCharm)  # type: ignore
103 +     ops.main(CharmCharm)

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/1345/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1345/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

warning[unused-type-ignore-comment]: Unused blanket `type: ignore` directive
   --> tests/spread/dependencies/strict-dependencies-errors/missing-packages/src/charm.py:103:27
    |
102 | if __name__ == "__main__":  # pragma: nocover
103 |     ops.main(CharmCharm)  # type: ignore
    |                           ^^^^^^^^^^^^^^
    |
help: Remove the unused suppression comment
100 | 
101 | 
102 | if __name__ == "__main__":  # pragma: nocover
    -     ops.main(CharmCharm)  # type: ignore
103 +     ops.main(CharmCharm)

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/1345/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1345/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

warning[unused-type-ignore-comment]: Unused blanket `type: ignore` directive
   --> tests/spread/dependencies/strict-dependencies-errors/no-requirements/src/charm.py:103:27
    |
102 | if __name__ == "__main__":  # pragma: nocover
103 |     ops.main(CharmCharm)  # type: ignore
    |                           ^^^^^^^^^^^^^^
    |
help: Remove the unused suppression comment
100 | 
101 | 
102 | if __name__ == "__main__":  # pragma: nocover
    -     ops.main(CharmCharm)  # type: ignore
103 +     ops.main(CharmCharm)

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/1345/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1345/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

warning[unused-type-ignore-comment]: Unused blanket `type: ignore` directive
   --> tests/spread/dependencies/strict-dependencies/charm/src/charm.py:103:27
    |
102 | if __name__ == "__main__":  # pragma: nocover
103 |     ops.main(CharmCharm)  # type: ignore
    |                           ^^^^^^^^^^^^^^
    |
help: Remove the unused suppression comment
100 | 
101 | 
102 | if __name__ == "__main__":  # pragma: nocover
    -     ops.main(CharmCharm)  # type: ignore
103 +     ops.main(CharmCharm)

error[unresolved-import]: Module `charms.reactive` has no member `set_flag`
 --> tests/spread/smoketests/reactive/reactivecharm/reactive/reactivecharm.py:1:29
  |
1 | from charms.reactive import set_flag, when_not
  |                             ^^^^^^^^
  |
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Module `charms.reactive` has no member `when_not`
 --> tests/spread/smoketests/reactive/reactivecharm/reactive/reactivecharm.py:1:39
  |
1 | from charms.reactive import set_flag, when_not
  |                                       ^^^^^^^^
  |
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/1345/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1345/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

warning[unused-type-ignore-comment]: Unused blanket `type: ignore` directive
   --> tests/spread/ubuntu-20.04/charm/bases/src/charm.py:104:32
    |
103 | if __name__ == "__main__":  # pragma: nocover
104 |     ops.main(BasicBasesCharm)  # type: ignore
    |                                ^^^^^^^^^^^^^^
    |
help: Remove the unused suppression comment
101 | 
102 | 
103 | if __name__ == "__main__":  # pragma: nocover
    -     ops.main(BasicBasesCharm)  # type: ignore
104 +     ops.main(BasicBasesCharm)

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/1345/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1345/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

warning[unused-type-ignore-comment]: Unused blanket `type: ignore` directive
  --> tests/spread/ubuntu-20.04/charm/platforms/src/charm.py:27:31
   |
26 | if __name__ == "__main__":  # pragma: nocover
27 |     ops.main(PlatformsCharm)  # type: ignore
   |                               ^^^^^^^^^^^^^^
   |
help: Remove the unused suppression comment
24 | 
25 | 
26 | if __name__ == "__main__":  # pragma: nocover
   -     ops.main(PlatformsCharm)  # type: ignore
27 +     ops.main(PlatformsCharm)

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/1345/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1345/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

warning[unused-type-ignore-comment]: Unused blanket `type: ignore` directive
   --> tests/spread/ubuntu-22.04/charm/bases/src/charm.py:104:32
    |
103 | if __name__ == "__main__":  # pragma: nocover
104 |     ops.main(BasicBasesCharm)  # type: ignore
    |                                ^^^^^^^^^^^^^^
    |
help: Remove the unused suppression comment
101 | 
102 | 
103 | if __name__ == "__main__":  # pragma: nocover
    -     ops.main(BasicBasesCharm)  # type: ignore
104 +     ops.main(BasicBasesCharm)

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/1345/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1345/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

warning[unused-type-ignore-comment]: Unused blanket `type: ignore` directive
  --> tests/spread/ubuntu-22.04/charm/platforms/src/charm.py:27:31
   |
26 | if __name__ == "__main__":  # pragma: nocover
27 |     ops.main(PlatformsCharm)  # type: ignore
   |                               ^^^^^^^^^^^^^^
   |
help: Remove the unused suppression comment
24 | 
25 | 
26 | if __name__ == "__main__":  # pragma: nocover
   -     ops.main(PlatformsCharm)  # type: ignore
27 +     ops.main(PlatformsCharm)

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/1345/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1345/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

warning[unused-type-ignore-comment]: Unused blanket `type: ignore` directive
  --> tests/spread/ubuntu-24.04/charm/platforms/src/charm.py:27:31
   |
26 | if __name__ == "__main__":  # pragma: nocover
27 |     ops.main(PlatformsCharm)  # type: ignore
   |                               ^^^^^^^^^^^^^^
   |
help: Remove the unused suppression comment
24 | 
25 | 
26 | if __name__ == "__main__":  # pragma: nocover
   -     ops.main(PlatformsCharm)  # type: ignore
27 +     ops.main(PlatformsCharm)

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/1345/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1345/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly 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/1345/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1345/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.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/1345/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1345/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your 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 `charm` has no member `TestCmdCharm`
 --> tests/spread/ubuntu-24.04/test-cmd/tests/unit/test_charm.py:4:19
  |
2 | from ops import testing
3 |
4 | from charm import TestCmdCharm
  |                   ^^^^^^^^^^^^
  |
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/1345/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1345/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

warning[unused-type-ignore-comment]: Unused blanket `type: ignore` directive
  --> tests/spread/ubuntu-25.10/charm/platforms/src/charm.py:27:31
   |
26 | if __name__ == "__main__":  # pragma: nocover
27 |     ops.main(PlatformsCharm)  # type: ignore
   |                               ^^^^^^^^^^^^^^
   |
help: Remove the unused suppression comment
24 | 
25 | 
26 | if __name__ == "__main__":  # pragma: nocover
   -     ops.main(PlatformsCharm)  # type: ignore
27 +     ops.main(PlatformsCharm)

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/1345/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1345/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly 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/1345/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1345/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.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/1345/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1345/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your 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 `charm` has no member `TestCmdCharm`
 --> tests/spread/ubuntu-25.10/test-cmd/tests/unit/test_charm.py:4:19
  |
2 | from ops import testing
3 |
4 | from charm import TestCmdCharm
  |                   ^^^^^^^^^^^^
  |
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/1345/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1345/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

warning[unused-type-ignore-comment]: Unused blanket `type: ignore` directive
  --> tests/spread/ubuntu-26.04/charm/platforms/src/charm.py:27:31
   |
26 | if __name__ == "__main__":  # pragma: nocover
27 |     ops.main(PlatformsCharm)  # type: ignore
   |                               ^^^^^^^^^^^^^^
   |
help: Remove the unused suppression comment
24 | 
25 | 
26 | if __name__ == "__main__":  # pragma: nocover
   -     ops.main(PlatformsCharm)  # type: ignore
27 +     ops.main(PlatformsCharm)

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/1345/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1345/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly 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/1345/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1345/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.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/1345/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1345/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your 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 `charm` has no member `TestCmdCharm`
 --> tests/spread/ubuntu-26.04/test-cmd/tests/unit/test_charm.py:4:19
  |
2 | from ops import testing
3 |
4 | from charm import TestCmdCharm
  |                   ^^^^^^^^^^^^
  |
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]: Object of type `Mock` is not assignable to attribute `write` of type `def write(self, library: Library) -> None`
  --> 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: Implicit shadowing of function `write`, add an annotation 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[not-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 `not-subscriptable` is enabled by default

error[invalid-assignment]: Object of type `() -> Unknown` is not assignable to attribute `_get_pip` of type `def _get_pip(self) -> str`
  --> 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: Implicit shadowing of function `_get_pip`, add an annotation to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `() -> Unknown` is not assignable to attribute `_get_pip` of type `def _get_pip(self) -> str`
  --> 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: Implicit shadowing of function `_get_pip`, add an annotation 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

error[unresolved-attribute]: Attribute `group` is not defined on `None` in union `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 `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `group` is not defined on `None` in union `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 `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `group` is not defined on `None` in union `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 `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `group` is not defined on `None` in union `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 `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `group` is not defined on `None` in union `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 `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `group` is not defined on `None` in union `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 `unresolved-attribute` is enabled by default

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

Found 171 diagnostics

@renovate renovate bot force-pushed the renovate/main-github-actions branch from 07f83cd to 209fc1f Compare March 16, 2026 15:23
@github-actions
Copy link

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

Command output
error[unresolved-attribute]: Attribute `bases` is not defined on `PlatformCharm` in union `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 `unresolved-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

error[unresolved-attribute]: Attribute `split` is not defined on `None` in union `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 `unresolved-attribute` is enabled by default

error[unsupported-operator]: Unsupported `>=` operation
   --> charmcraft/linters.py:793:16
    |
791 |         for match in MIN_VERSION_REGEX.finditer(dep_spec):
792 |             spec_matched = True
793 |             if version >= cls.get_version_tuple(match.group(1)):
    |                -------^^^^-------------------------------------
    |                |
    |                Both operands have type `tuple[int | str, ...]`
794 |                 return True
795 |         for match in EXACT_VERSION_REGEX.finditer(dep_spec):
    |
info: Operation fails because operator `>=` is not supported between objects of type `int` and `str`
info: rule `unsupported-operator` is enabled by default

warning[unused-type-ignore-comment]: Unused blanket `type: ignore` directive
   --> charmcraft/models/metadata.py:110:31
    |
109 |     # These are looser in the metadata.yaml schema than charmcraft requires.
110 |     name: pydantic.StrictStr  # type: ignore[assignment]
    |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^
111 |     summary: pydantic.StrictStr  # type: ignore[assignment]
112 |     description: pydantic.StrictStr
    |
help: Remove the unused suppression comment
107 |     """
108 | 
109 |     # These are looser in the metadata.yaml schema than charmcraft requires.
    -     name: pydantic.StrictStr  # type: ignore[assignment]
110 +     name: pydantic.StrictStr
111 |     summary: pydantic.StrictStr  # type: ignore[assignment]
112 |     description: pydantic.StrictStr
113 |     display_name: pydantic.StrictStr | None = None  # type: ignore[assignment]

warning[unused-type-ignore-comment]: Unused blanket `type: ignore` directive
   --> charmcraft/models/metadata.py:111:34
    |
109 |     # These are looser in the metadata.yaml schema than charmcraft requires.
110 |     name: pydantic.StrictStr  # type: ignore[assignment]
111 |     summary: pydantic.StrictStr  # type: ignore[assignment]
    |                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^
112 |     description: pydantic.StrictStr
113 |     display_name: pydantic.StrictStr | None = None  # type: ignore[assignment]
    |
help: Remove the unused suppression comment
108 | 
109 |     # These are looser in the metadata.yaml schema than charmcraft requires.
110 |     name: pydantic.StrictStr  # type: ignore[assignment]
    -     summary: pydantic.StrictStr  # type: ignore[assignment]
111 +     summary: pydantic.StrictStr
112 |     description: pydantic.StrictStr
113 |     display_name: pydantic.StrictStr | None = None  # type: ignore[assignment]
114 | 

warning[unused-type-ignore-comment]: Unused blanket `type: ignore` directive
   --> charmcraft/models/metadata.py:113:53
    |
111 |     summary: pydantic.StrictStr  # type: ignore[assignment]
112 |     description: pydantic.StrictStr
113 |     display_name: pydantic.StrictStr | None = None  # type: ignore[assignment]
    |                                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^
114 |
115 |     @override
    |
help: Remove the unused suppression comment
110 |     name: pydantic.StrictStr  # type: ignore[assignment]
111 |     summary: pydantic.StrictStr  # type: ignore[assignment]
112 |     description: pydantic.StrictStr
    -     display_name: pydantic.StrictStr | None = None  # type: ignore[assignment]
113 +     display_name: pydantic.StrictStr | None = None
114 | 
115 |     @override
116 |     @classmethod

warning[unused-type-ignore-comment]: Unused blanket `type: ignore` directive
  --> charmcraft/parts/lifecycle.py:28:32
   |
26 | from craft_cli import CraftError, emit
27 | from craft_parts import LifecycleManager, PartsError, Step
28 | from xdg import BaseDirectory  # type: ignore[import]
   |                                ^^^^^^^^^^^^^^^^^^^^^^
29 |
30 | from charmcraft import const, instrum
   |
help: Remove the unused suppression comment
25 | 
26 | from craft_cli import CraftError, emit
27 | from craft_parts import LifecycleManager, PartsError, Step
   - from xdg import BaseDirectory  # type: ignore[import]
28 + from xdg import BaseDirectory
29 | 
30 | from charmcraft import const, instrum
31 | 

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[unused-type-ignore-comment]: Unused blanket `type: ignore` directive
  --> charmcraft/parts/plugins/_poetry.py:37:39
   |
36 |     properties_class = PoetryPluginProperties
37 |     _options: PoetryPluginProperties  # type: ignore[reportIncompatibleVariableOverride]
   |                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
38 |
39 |     def get_build_environment(self) -> dict[str, str]:
   |
help: Remove the unused suppression comment
34 |     """Charmcraft-specific version of the poetry plugin."""
35 | 
36 |     properties_class = PoetryPluginProperties
   -     _options: PoetryPluginProperties  # type: ignore[reportIncompatibleVariableOverride]
37 +     _options: PoetryPluginProperties
38 | 
39 |     def get_build_environment(self) -> dict[str, str]:
40 |         return utils.extend_python_build_environment(super().get_build_environment())

warning[unused-type-ignore-comment]: Unused blanket `type: ignore` directive
  --> charmcraft/parts/plugins/_python.py:37:39
   |
36 |     properties_class = PythonPluginProperties
37 |     _options: PythonPluginProperties  # type: ignore[reportIncompatibleVariableOverride]
   |                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
38 |
39 |     @override
   |
help: Remove the unused suppression comment
34 |     """Charmcraft-specific version of the python plugin."""
35 | 
36 |     properties_class = PythonPluginProperties
   -     _options: PythonPluginProperties  # type: ignore[reportIncompatibleVariableOverride]
37 +     _options: PythonPluginProperties
38 | 
39 |     @override
40 |     def get_build_environment(self) -> dict[str, str]:

warning[unused-type-ignore-comment]: Unused blanket `type: ignore` directive
  --> charmcraft/services/analysis.py:35:41
   |
33 |     """Business logic for creating packages."""
34 |
35 |     _project: models.CharmcraftProject  # type: ignore[assignment]
   |                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^
36 |
37 |     def __init__(  # (too many arguments)
   |
help: Remove the unused suppression comment
32 | class AnalysisService(craft_application.AppService):
33 |     """Business logic for creating packages."""
34 | 
   -     _project: models.CharmcraftProject  # type: ignore[assignment]
35 +     _project: models.CharmcraftProject
36 | 
37 |     def __init__(  # (too many arguments)
38 |         self,

warning[unused-type-ignore-comment]: Unused blanket `type: ignore` directive
  --> charmcraft/services/image.py:25:16
   |
24 | import craft_application
25 | import docker  # type: ignore[import-untyped]
   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
26 | import docker.errors  # type: ignore[import-untyped]
27 | import docker.models.images  # type: ignore[import-untyped]
   |
help: Remove the unused suppression comment
22 | from collections.abc import Sequence
23 | 
24 | import craft_application
   - import docker  # type: ignore[import-untyped]
25 + import docker
26 | import docker.errors  # type: ignore[import-untyped]
27 | import docker.models.images  # type: ignore[import-untyped]
28 | from overrides import override

warning[unused-type-ignore-comment]: Unused blanket `type: ignore` directive
  --> charmcraft/services/image.py:26:23
   |
24 | import craft_application
25 | import docker  # type: ignore[import-untyped]
26 | import docker.errors  # type: ignore[import-untyped]
   |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
27 | import docker.models.images  # type: ignore[import-untyped]
28 | from overrides import override
   |
help: Remove the unused suppression comment
23 | 
24 | import craft_application
25 | import docker  # type: ignore[import-untyped]
   - import docker.errors  # type: ignore[import-untyped]
26 + import docker.errors
27 | import docker.models.images  # type: ignore[import-untyped]
28 | from overrides import override
29 | 

warning[unused-type-ignore-comment]: Unused blanket `type: ignore` directive
  --> charmcraft/services/image.py:27:30
   |
25 | import docker  # type: ignore[import-untyped]
26 | import docker.errors  # type: ignore[import-untyped]
27 | import docker.models.images  # type: ignore[import-untyped]
   |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
28 | from overrides import override
   |
help: Remove the unused suppression comment
24 | import craft_application
25 | import docker  # type: ignore[import-untyped]
26 | import docker.errors  # type: ignore[import-untyped]
   - import docker.models.images  # type: ignore[import-untyped]
27 + import docker.models.images
28 | from overrides import override
29 | 
30 | from charmcraft import const, errors, utils

warning[unused-type-ignore-comment]: Unused blanket `type: ignore` directive
   --> charmcraft/services/provider.py:99:24
    |
 97 |             instance_name=instance_name,
 98 |             # craft-application annotation is incorrect
 99 |             **kwargs,  # type: ignore[arg-type]
    |                        ^^^^^^^^^^^^^^^^^^^^^^^^
100 |         )
    |
help: Remove the unused suppression comment
96  |             base_name,
97  |             instance_name=instance_name,
98  |             # craft-application annotation is incorrect
    -             **kwargs,  # type: ignore[arg-type]
99  +             **kwargs,
100 |         )
101 | 
102 |     @override

warning[unused-type-ignore-comment]: Unused blanket `type: ignore` directive
  --> charmcraft/services/remotebuild.py:23:35
   |
21 | from typing import Any
22 |
23 | import lazr.restfulclient.errors  # type: ignore[import-untyped]
   |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
24 | from craft_application import launchpad
25 | from craft_application.services import remotebuild
   |
help: Remove the unused suppression comment
20 | from collections.abc import Mapping
21 | from typing import Any
22 | 
   - import lazr.restfulclient.errors  # type: ignore[import-untyped]
23 + import lazr.restfulclient.errors
24 | from craft_application import launchpad
25 | from craft_application.services import remotebuild
26 | from overrides import override

warning[unused-type-ignore-comment]: Unused blanket `type: ignore` directive
  --> charmcraft/store/client.py:29:34
   |
27 | from craft_cli import CraftError, emit
28 | from craft_store import endpoints
29 | from requests_toolbelt import (  # type: ignore[import]
   |                                  ^^^^^^^^^^^^^^^^^^^^^^
30 |     MultipartEncoder,
31 |     MultipartEncoderMonitor,
   |
help: Remove the unused suppression comment
26 | import requests
27 | from craft_cli import CraftError, emit
28 | from craft_store import endpoints
   - from requests_toolbelt import (  # type: ignore[import]
29 + from requests_toolbelt import (
30 |     MultipartEncoder,
31 |     MultipartEncoderMonitor,
32 | )

error[unresolved-attribute]: Attribute `login` is not defined on `AnonymousClient` in union `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 `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `logout` is not defined on `AnonymousClient` in union `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 `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `whoami` is not defined on `AnonymousClient` in union `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 `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `whoami` is not defined on `AnonymousClient` in union `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 `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `unregister_name` is not defined on `AnonymousClient` in union `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 `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `push_file` is not defined on `AnonymousClient` in union `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 `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `list_resource_revisions` is not defined on `AnonymousClient` in union `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 `unresolved-attribute` is enabled by default

error[invalid-argument-type]: Argument to function `__new__` is incorrect
   --> docs/conf.py:254:30
    |
252 |     docs_module_name = f"{library_name.replace('-', '_')}_docs"
253 |     docs_module = importlib.import_module(docs_module_name)
254 |     docs_path = pathlib.Path(docs_module.__file__).parent / library_name
    |                              ^^^^^^^^^^^^^^^^^^^^ Expected `str | PathLike[str]`, found `str | None`
255 |
256 |     if common_lib_path.is_symlink() and common_lib_path.readlink() == docs_path:
    |
info: Element `None` of this union is not assignable to `str | PathLike[str]`
info: Function defined here
   --> stdlib/pathlib/__init__.pyi:310:13
    |
308 |         def __new__(cls, *args: StrPath, **kwargs: Unused) -> Self: ...  # pyright: ignore[reportInconsistentConstructor]
309 |     else:
310 |         def __new__(cls, *args: StrPath, **kwargs: Unused) -> Self: ...
    |             ^^^^^^^      -------------- Parameter declared here
311 |
312 |     @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/1348/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1348/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly 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/1348/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1348/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly 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/1348/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1348/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: 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/1348/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1348/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly 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/1348/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1348/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly 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/1348/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1348/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly 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/1348/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1348/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly 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/1348/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1348/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly 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/1348/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1348/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your 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/1348/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1348/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly 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/1348/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1348/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your 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 `fastapi` has no member `FastAPI`
 --> docs/tutorial/code/fastapi/app.py:1:21
  |
1 | from fastapi import FastAPI
  |                     ^^^^^^^
2 |
3 | app = FastAPI()
  |
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Module `fastapi` has no member `FastAPI`
 --> docs/tutorial/code/fastapi/greeting_app.py:3:21
  |
1 | import os
2 |
3 | from fastapi import FastAPI
  |                     ^^^^^^^
4 |
5 | app = FastAPI()
  |
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Module `fastapi` has no member `FastAPI`
 --> docs/tutorial/code/fastapi/visitors_app.py:7:21
  |
5 | from typing import Annotated
6 |
7 | from fastapi import FastAPI, Header
  |                     ^^^^^^^
8 | import psycopg2
  |
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Module `fastapi` has no member `Header`
 --> docs/tutorial/code/fastapi/visitors_app.py:7:30
  |
5 | from typing import Annotated
6 |
7 | from fastapi import FastAPI, Header
  |                              ^^^^^^
8 | import psycopg2
  |
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/1348/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1348/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly 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/1348/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1348/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-attribute]: Module `flask` has no member `Flask`
 --> docs/tutorial/code/flask/app.py:5:7
  |
3 | import flask
4 |
5 | app = flask.Flask(__name__)
  |       ^^^^^^^^^^^
  |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Module `flask` has no member `Flask`
 --> docs/tutorial/code/flask/greeting_app.py:5:7
  |
3 | import flask
4 |
5 | app = flask.Flask(__name__)
  |       ^^^^^^^^^^^
6 | app.config.from_prefixed_env()
  |
info: rule `unresolved-attribute` 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/1348/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1348/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-attribute]: Module `flask` has no member `Flask`
  --> docs/tutorial/code/flask/visitors_app.py:9:7
   |
 7 | import psycopg2
 8 |
 9 | app = flask.Flask(__name__)
   |       ^^^^^^^^^^^
10 | app.config.from_prefixed_env()
   |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Module `flask` has no member `request`
  --> docs/tutorial/code/flask/visitors_app.py:18:22
   |
16 | def index():
17 |     with psycopg2.connect(DATABASE_URI) as conn, conn.cursor() as cur:
18 |         user_agent = flask.request.headers.get('User-Agent')
   |                      ^^^^^^^^^^^^^
19 |         timestamp = datetime.datetime.now()
   |
info: rule `unresolved-attribute` 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/1348/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1348/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make 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 `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 `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 `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 `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 `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 `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 `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 `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 `list[Unknown] | datetime | str | 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 `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 `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 `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:225:9
    |
223 |     return craft_platforms.BuildInfo(
224 |         build_base=craft_platforms.DistroBase("ubuntu", "22.04"),
225 |         build_on=arch,
    |         ^^^^^^^^^^^^^ Expected `DebianArchitecture`, found `str`
226 |         build_for="arm64",
227 |         platform="distro-1-test64",
    |
info: rule `invalid-argument-type` 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-return-type]: Return type does not match returned value
  --> tests/extensions/test_extensions.py:33:37
   |
32 |     @classmethod
33 |     def get_supported_bases(cls) -> list[tuple[str, ...]]:
   |                                     --------------------- Expected `list[tuple[str, ...]]` because of return type
34 |         """Return a list of tuple of supported bases."""
35 |         return cls.bases
   |                ^^^^^^^^^ expected `list[tuple[str, ...]]`, found `Unknown | list[tuple[str, str]]`
36 |
37 |     @staticmethod
   |
info: rule `invalid-return-type` 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-submodule]: Submodule `application` might not have been imported
  --> 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-submodule` 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 `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: 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 `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: 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 `BuildInfo | Path`
57 |         # Test that the cache lock gets created
58 |         assert lock_file.is_file()
   |
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 `BuildInfo | Path`
57 |         # Test that the cache lock gets created
58 |         assert lock_file.is_file()
   |
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 `BuildInfo | Path`
57 |         # Test that the cache lock gets created
58 |         assert lock_file.is_file()
   |
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 `BuildInfo | Path`
57 |         # Test that the cache lock gets created
58 |         assert lock_file.is_file()
   |
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 `BuildInfo | Path`
57 |         # Test that the cache lock gets created
58 |         assert lock_file.is_file()
   |
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 `BuildInfo | Path`
57 |         # Test that the cache lock gets created
58 |         assert lock_file.is_file()
   |
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 `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: 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 `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: 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 `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: 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 `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: 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 `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: 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 `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: 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 `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: 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 `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: 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 `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: 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 `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: 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 `BuildInfo | Path`
135 |         instance.execute_run(["test", "-d", "/root/.cache"], check=True)
136 |         instance.execute_run(
    |
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 `BuildInfo | Path`
135 |         instance.execute_run(["test", "-d", "/root/.cache"], check=True)
136 |         instance.execute_run(
    |
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 `BuildInfo | Path`
135 |         instance.execute_run(["test", "-d", "/root/.cache"], check=True)
136 |         instance.execute_run(
    |
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 `BuildInfo | Path`
135 |         instance.execute_run(["test", "-d", "/root/.cache"], check=True)
136 |         instance.execute_run(
    |
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 `BuildInfo | Path`
135 |         instance.execute_run(["test", "-d", "/root/.cache"], check=True)
136 |         instance.execute_run(
    |
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 `BuildInfo | Path`
135 |         instance.execute_run(["test", "-d", "/root/.cache"], check=True)
136 |         instance.execute_run(
    |
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 | from ops import testing
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/1348/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1348/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/commands/init-extensions/tests/unit/test_charm.py:10:6
   |
 9 | import charm
10 | from ops import testing
   |      ^^^
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/1348/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1348/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.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/1348/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1348/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.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/1348/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1348/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

warning[unused-type-ignore-comment]: Unused blanket `type: ignore` directive
   --> tests/spread/dependencies/strict-dependencies-errors/extra-binary-packages/src/charm.py:103:27
    |
102 | if __name__ == "__main__":  # pragma: nocover
103 |     ops.main(CharmCharm)  # type: ignore
    |                           ^^^^^^^^^^^^^^
    |
help: Remove the unused suppression comment
100 | 
101 | 
102 | if __name__ == "__main__":  # pragma: nocover
    -     ops.main(CharmCharm)  # type: ignore
103 +     ops.main(CharmCharm)

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/1348/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1348/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

warning[unused-type-ignore-comment]: Unused blanket `type: ignore` directive
   --> tests/spread/dependencies/strict-dependencies-errors/extra-packages/src/charm.py:103:27
    |
102 | if __name__ == "__main__":  # pragma: nocover
103 |     ops.main(CharmCharm)  # type: ignore
    |                           ^^^^^^^^^^^^^^
    |
help: Remove the unused suppression comment
100 | 
101 | 
102 | if __name__ == "__main__":  # pragma: nocover
    -     ops.main(CharmCharm)  # type: ignore
103 +     ops.main(CharmCharm)

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/1348/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1348/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

warning[unused-type-ignore-comment]: Unused blanket `type: ignore` directive
   --> tests/spread/dependencies/strict-dependencies-errors/missing-packages/src/charm.py:103:27
    |
102 | if __name__ == "__main__":  # pragma: nocover
103 |     ops.main(CharmCharm)  # type: ignore
    |                           ^^^^^^^^^^^^^^
    |
help: Remove the unused suppression comment
100 | 
101 | 
102 | if __name__ == "__main__":  # pragma: nocover
    -     ops.main(CharmCharm)  # type: ignore
103 +     ops.main(CharmCharm)

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/1348/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1348/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

warning[unused-type-ignore-comment]: Unused blanket `type: ignore` directive
   --> tests/spread/dependencies/strict-dependencies-errors/no-requirements/src/charm.py:103:27
    |
102 | if __name__ == "__main__":  # pragma: nocover
103 |     ops.main(CharmCharm)  # type: ignore
    |                           ^^^^^^^^^^^^^^
    |
help: Remove the unused suppression comment
100 | 
101 | 
102 | if __name__ == "__main__":  # pragma: nocover
    -     ops.main(CharmCharm)  # type: ignore
103 +     ops.main(CharmCharm)

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/1348/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1348/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

warning[unused-type-ignore-comment]: Unused blanket `type: ignore` directive
   --> tests/spread/dependencies/strict-dependencies/charm/src/charm.py:103:27
    |
102 | if __name__ == "__main__":  # pragma: nocover
103 |     ops.main(CharmCharm)  # type: ignore
    |                           ^^^^^^^^^^^^^^
    |
help: Remove the unused suppression comment
100 | 
101 | 
102 | if __name__ == "__main__":  # pragma: nocover
    -     ops.main(CharmCharm)  # type: ignore
103 +     ops.main(CharmCharm)

error[unresolved-import]: Module `charms.reactive` has no member `set_flag`
 --> tests/spread/smoketests/reactive/reactivecharm/reactive/reactivecharm.py:1:29
  |
1 | from charms.reactive import set_flag, when_not
  |                             ^^^^^^^^
  |
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Module `charms.reactive` has no member `when_not`
 --> tests/spread/smoketests/reactive/reactivecharm/reactive/reactivecharm.py:1:39
  |
1 | from charms.reactive import set_flag, when_not
  |                                       ^^^^^^^^
  |
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/1348/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1348/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

warning[unused-type-ignore-comment]: Unused blanket `type: ignore` directive
   --> tests/spread/ubuntu-20.04/charm/bases/src/charm.py:104:32
    |
103 | if __name__ == "__main__":  # pragma: nocover
104 |     ops.main(BasicBasesCharm)  # type: ignore
    |                                ^^^^^^^^^^^^^^
    |
help: Remove the unused suppression comment
101 | 
102 | 
103 | if __name__ == "__main__":  # pragma: nocover
    -     ops.main(BasicBasesCharm)  # type: ignore
104 +     ops.main(BasicBasesCharm)

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/1348/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1348/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

warning[unused-type-ignore-comment]: Unused blanket `type: ignore` directive
  --> tests/spread/ubuntu-20.04/charm/platforms/src/charm.py:27:31
   |
26 | if __name__ == "__main__":  # pragma: nocover
27 |     ops.main(PlatformsCharm)  # type: ignore
   |                               ^^^^^^^^^^^^^^
   |
help: Remove the unused suppression comment
24 | 
25 | 
26 | if __name__ == "__main__":  # pragma: nocover
   -     ops.main(PlatformsCharm)  # type: ignore
27 +     ops.main(PlatformsCharm)

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/1348/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1348/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

warning[unused-type-ignore-comment]: Unused blanket `type: ignore` directive
   --> tests/spread/ubuntu-22.04/charm/bases/src/charm.py:104:32
    |
103 | if __name__ == "__main__":  # pragma: nocover
104 |     ops.main(BasicBasesCharm)  # type: ignore
    |                                ^^^^^^^^^^^^^^
    |
help: Remove the unused suppression comment
101 | 
102 | 
103 | if __name__ == "__main__":  # pragma: nocover
    -     ops.main(BasicBasesCharm)  # type: ignore
104 +     ops.main(BasicBasesCharm)

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/1348/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1348/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

warning[unused-type-ignore-comment]: Unused blanket `type: ignore` directive
  --> tests/spread/ubuntu-22.04/charm/platforms/src/charm.py:27:31
   |
26 | if __name__ == "__main__":  # pragma: nocover
27 |     ops.main(PlatformsCharm)  # type: ignore
   |                               ^^^^^^^^^^^^^^
   |
help: Remove the unused suppression comment
24 | 
25 | 
26 | if __name__ == "__main__":  # pragma: nocover
   -     ops.main(PlatformsCharm)  # type: ignore
27 +     ops.main(PlatformsCharm)

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/1348/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1348/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

warning[unused-type-ignore-comment]: Unused blanket `type: ignore` directive
  --> tests/spread/ubuntu-24.04/charm/platforms/src/charm.py:27:31
   |
26 | if __name__ == "__main__":  # pragma: nocover
27 |     ops.main(PlatformsCharm)  # type: ignore
   |                               ^^^^^^^^^^^^^^
   |
help: Remove the unused suppression comment
24 | 
25 | 
26 | if __name__ == "__main__":  # pragma: nocover
   -     ops.main(PlatformsCharm)  # type: ignore
27 +     ops.main(PlatformsCharm)

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/1348/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1348/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly 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/1348/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1348/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.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/1348/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1348/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your 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 `charm` has no member `TestCmdCharm`
 --> tests/spread/ubuntu-24.04/test-cmd/tests/unit/test_charm.py:4:19
  |
2 | from ops import testing
3 |
4 | from charm import TestCmdCharm
  |                   ^^^^^^^^^^^^
  |
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/1348/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1348/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

warning[unused-type-ignore-comment]: Unused blanket `type: ignore` directive
  --> tests/spread/ubuntu-25.10/charm/platforms/src/charm.py:27:31
   |
26 | if __name__ == "__main__":  # pragma: nocover
27 |     ops.main(PlatformsCharm)  # type: ignore
   |                               ^^^^^^^^^^^^^^
   |
help: Remove the unused suppression comment
24 | 
25 | 
26 | if __name__ == "__main__":  # pragma: nocover
   -     ops.main(PlatformsCharm)  # type: ignore
27 +     ops.main(PlatformsCharm)

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/1348/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1348/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly 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/1348/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1348/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.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/1348/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1348/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your 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 `charm` has no member `TestCmdCharm`
 --> tests/spread/ubuntu-25.10/test-cmd/tests/unit/test_charm.py:4:19
  |
2 | from ops import testing
3 |
4 | from charm import TestCmdCharm
  |                   ^^^^^^^^^^^^
  |
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/1348/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1348/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

warning[unused-type-ignore-comment]: Unused blanket `type: ignore` directive
  --> tests/spread/ubuntu-26.04/charm/platforms/src/charm.py:27:31
   |
26 | if __name__ == "__main__":  # pragma: nocover
27 |     ops.main(PlatformsCharm)  # type: ignore
   |                               ^^^^^^^^^^^^^^
   |
help: Remove the unused suppression comment
24 | 
25 | 
26 | if __name__ == "__main__":  # pragma: nocover
   -     ops.main(PlatformsCharm)  # type: ignore
27 +     ops.main(PlatformsCharm)

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/1348/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1348/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly 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/1348/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1348/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.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/1348/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1348/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your 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 `charm` has no member `TestCmdCharm`
 --> tests/spread/ubuntu-26.04/test-cmd/tests/unit/test_charm.py:4:19
  |
2 | from ops import testing
3 |
4 | from charm import TestCmdCharm
  |                   ^^^^^^^^^^^^
  |
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]: Object of type `Mock` is not assignable to attribute `write` of type `def write(self, library: Library) -> None`
  --> 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: Implicit shadowing of function `write`, add an annotation 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[not-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 `not-subscriptable` is enabled by default

error[invalid-assignment]: Object of type `() -> Unknown` is not assignable to attribute `_get_pip` of type `def _get_pip(self) -> str`
  --> 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: Implicit shadowing of function `_get_pip`, add an annotation to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `() -> Unknown` is not assignable to attribute `_get_pip` of type `def _get_pip(self) -> str`
  --> 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: Implicit shadowing of function `_get_pip`, add an annotation 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

error[unresolved-attribute]: Attribute `group` is not defined on `None` in union `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 `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `group` is not defined on `None` in union `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 `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `group` is not defined on `None` in union `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 `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `group` is not defined on `None` in union `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 `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `group` is not defined on `None` in union `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 `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `group` is not defined on `None` in union `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 `unresolved-attribute` is enabled by default

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

Found 172 diagnostics

@renovate renovate bot force-pushed the renovate/main-github-actions branch from 209fc1f to 2051f34 Compare March 16, 2026 21:08
@github-actions
Copy link

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

Command output
error[unresolved-attribute]: Attribute `bases` is not defined on `PlatformCharm` in union `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 `unresolved-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

error[unresolved-attribute]: Attribute `split` is not defined on `None` in union `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 `unresolved-attribute` is enabled by default

error[unsupported-operator]: Unsupported `>=` operation
   --> charmcraft/linters.py:793:16
    |
791 |         for match in MIN_VERSION_REGEX.finditer(dep_spec):
792 |             spec_matched = True
793 |             if version >= cls.get_version_tuple(match.group(1)):
    |                -------^^^^-------------------------------------
    |                |
    |                Both operands have type `tuple[int | str, ...]`
794 |                 return True
795 |         for match in EXACT_VERSION_REGEX.finditer(dep_spec):
    |
info: Operation fails because operator `>=` is not supported between objects of type `int` and `str`
info: rule `unsupported-operator` is enabled by default

warning[unused-type-ignore-comment]: Unused blanket `type: ignore` directive
   --> charmcraft/models/metadata.py:110:31
    |
109 |     # These are looser in the metadata.yaml schema than charmcraft requires.
110 |     name: pydantic.StrictStr  # type: ignore[assignment]
    |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^
111 |     summary: pydantic.StrictStr  # type: ignore[assignment]
112 |     description: pydantic.StrictStr
    |
help: Remove the unused suppression comment
107 |     """
108 | 
109 |     # These are looser in the metadata.yaml schema than charmcraft requires.
    -     name: pydantic.StrictStr  # type: ignore[assignment]
110 +     name: pydantic.StrictStr
111 |     summary: pydantic.StrictStr  # type: ignore[assignment]
112 |     description: pydantic.StrictStr
113 |     display_name: pydantic.StrictStr | None = None  # type: ignore[assignment]

warning[unused-type-ignore-comment]: Unused blanket `type: ignore` directive
   --> charmcraft/models/metadata.py:111:34
    |
109 |     # These are looser in the metadata.yaml schema than charmcraft requires.
110 |     name: pydantic.StrictStr  # type: ignore[assignment]
111 |     summary: pydantic.StrictStr  # type: ignore[assignment]
    |                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^
112 |     description: pydantic.StrictStr
113 |     display_name: pydantic.StrictStr | None = None  # type: ignore[assignment]
    |
help: Remove the unused suppression comment
108 | 
109 |     # These are looser in the metadata.yaml schema than charmcraft requires.
110 |     name: pydantic.StrictStr  # type: ignore[assignment]
    -     summary: pydantic.StrictStr  # type: ignore[assignment]
111 +     summary: pydantic.StrictStr
112 |     description: pydantic.StrictStr
113 |     display_name: pydantic.StrictStr | None = None  # type: ignore[assignment]
114 | 

warning[unused-type-ignore-comment]: Unused blanket `type: ignore` directive
   --> charmcraft/models/metadata.py:113:53
    |
111 |     summary: pydantic.StrictStr  # type: ignore[assignment]
112 |     description: pydantic.StrictStr
113 |     display_name: pydantic.StrictStr | None = None  # type: ignore[assignment]
    |                                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^
114 |
115 |     @override
    |
help: Remove the unused suppression comment
110 |     name: pydantic.StrictStr  # type: ignore[assignment]
111 |     summary: pydantic.StrictStr  # type: ignore[assignment]
112 |     description: pydantic.StrictStr
    -     display_name: pydantic.StrictStr | None = None  # type: ignore[assignment]
113 +     display_name: pydantic.StrictStr | None = None
114 | 
115 |     @override
116 |     @classmethod

warning[unused-type-ignore-comment]: Unused blanket `type: ignore` directive
  --> charmcraft/parts/lifecycle.py:28:32
   |
26 | from craft_cli import CraftError, emit
27 | from craft_parts import LifecycleManager, PartsError, Step
28 | from xdg import BaseDirectory  # type: ignore[import]
   |                                ^^^^^^^^^^^^^^^^^^^^^^
29 |
30 | from charmcraft import const, instrum
   |
help: Remove the unused suppression comment
25 | 
26 | from craft_cli import CraftError, emit
27 | from craft_parts import LifecycleManager, PartsError, Step
   - from xdg import BaseDirectory  # type: ignore[import]
28 + from xdg import BaseDirectory
29 | 
30 | from charmcraft import const, instrum
31 | 

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[unused-type-ignore-comment]: Unused blanket `type: ignore` directive
  --> charmcraft/parts/plugins/_poetry.py:37:39
   |
36 |     properties_class = PoetryPluginProperties
37 |     _options: PoetryPluginProperties  # type: ignore[reportIncompatibleVariableOverride]
   |                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
38 |
39 |     def get_build_environment(self) -> dict[str, str]:
   |
help: Remove the unused suppression comment
34 |     """Charmcraft-specific version of the poetry plugin."""
35 | 
36 |     properties_class = PoetryPluginProperties
   -     _options: PoetryPluginProperties  # type: ignore[reportIncompatibleVariableOverride]
37 +     _options: PoetryPluginProperties
38 | 
39 |     def get_build_environment(self) -> dict[str, str]:
40 |         return utils.extend_python_build_environment(super().get_build_environment())

warning[unused-type-ignore-comment]: Unused blanket `type: ignore` directive
  --> charmcraft/parts/plugins/_python.py:37:39
   |
36 |     properties_class = PythonPluginProperties
37 |     _options: PythonPluginProperties  # type: ignore[reportIncompatibleVariableOverride]
   |                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
38 |
39 |     @override
   |
help: Remove the unused suppression comment
34 |     """Charmcraft-specific version of the python plugin."""
35 | 
36 |     properties_class = PythonPluginProperties
   -     _options: PythonPluginProperties  # type: ignore[reportIncompatibleVariableOverride]
37 +     _options: PythonPluginProperties
38 | 
39 |     @override
40 |     def get_build_environment(self) -> dict[str, str]:

warning[unused-type-ignore-comment]: Unused blanket `type: ignore` directive
  --> charmcraft/services/analysis.py:35:41
   |
33 |     """Business logic for creating packages."""
34 |
35 |     _project: models.CharmcraftProject  # type: ignore[assignment]
   |                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^
36 |
37 |     def __init__(  # (too many arguments)
   |
help: Remove the unused suppression comment
32 | class AnalysisService(craft_application.AppService):
33 |     """Business logic for creating packages."""
34 | 
   -     _project: models.CharmcraftProject  # type: ignore[assignment]
35 +     _project: models.CharmcraftProject
36 | 
37 |     def __init__(  # (too many arguments)
38 |         self,

warning[unused-type-ignore-comment]: Unused blanket `type: ignore` directive
  --> charmcraft/services/image.py:25:16
   |
24 | import craft_application
25 | import docker  # type: ignore[import-untyped]
   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
26 | import docker.errors  # type: ignore[import-untyped]
27 | import docker.models.images  # type: ignore[import-untyped]
   |
help: Remove the unused suppression comment
22 | from collections.abc import Sequence
23 | 
24 | import craft_application
   - import docker  # type: ignore[import-untyped]
25 + import docker
26 | import docker.errors  # type: ignore[import-untyped]
27 | import docker.models.images  # type: ignore[import-untyped]
28 | from overrides import override

warning[unused-type-ignore-comment]: Unused blanket `type: ignore` directive
  --> charmcraft/services/image.py:26:23
   |
24 | import craft_application
25 | import docker  # type: ignore[import-untyped]
26 | import docker.errors  # type: ignore[import-untyped]
   |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
27 | import docker.models.images  # type: ignore[import-untyped]
28 | from overrides import override
   |
help: Remove the unused suppression comment
23 | 
24 | import craft_application
25 | import docker  # type: ignore[import-untyped]
   - import docker.errors  # type: ignore[import-untyped]
26 + import docker.errors
27 | import docker.models.images  # type: ignore[import-untyped]
28 | from overrides import override
29 | 

warning[unused-type-ignore-comment]: Unused blanket `type: ignore` directive
  --> charmcraft/services/image.py:27:30
   |
25 | import docker  # type: ignore[import-untyped]
26 | import docker.errors  # type: ignore[import-untyped]
27 | import docker.models.images  # type: ignore[import-untyped]
   |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
28 | from overrides import override
   |
help: Remove the unused suppression comment
24 | import craft_application
25 | import docker  # type: ignore[import-untyped]
26 | import docker.errors  # type: ignore[import-untyped]
   - import docker.models.images  # type: ignore[import-untyped]
27 + import docker.models.images
28 | from overrides import override
29 | 
30 | from charmcraft import const, errors, utils

warning[unused-type-ignore-comment]: Unused blanket `type: ignore` directive
   --> charmcraft/services/provider.py:99:24
    |
 97 |             instance_name=instance_name,
 98 |             # craft-application annotation is incorrect
 99 |             **kwargs,  # type: ignore[arg-type]
    |                        ^^^^^^^^^^^^^^^^^^^^^^^^
100 |         )
    |
help: Remove the unused suppression comment
96  |             base_name,
97  |             instance_name=instance_name,
98  |             # craft-application annotation is incorrect
    -             **kwargs,  # type: ignore[arg-type]
99  +             **kwargs,
100 |         )
101 | 
102 |     @override

warning[unused-type-ignore-comment]: Unused blanket `type: ignore` directive
  --> charmcraft/services/remotebuild.py:23:35
   |
21 | from typing import Any
22 |
23 | import lazr.restfulclient.errors  # type: ignore[import-untyped]
   |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
24 | from craft_application import launchpad
25 | from craft_application.services import remotebuild
   |
help: Remove the unused suppression comment
20 | from collections.abc import Mapping
21 | from typing import Any
22 | 
   - import lazr.restfulclient.errors  # type: ignore[import-untyped]
23 + import lazr.restfulclient.errors
24 | from craft_application import launchpad
25 | from craft_application.services import remotebuild
26 | from overrides import override

warning[unused-type-ignore-comment]: Unused blanket `type: ignore` directive
  --> charmcraft/store/client.py:29:34
   |
27 | from craft_cli import CraftError, emit
28 | from craft_store import endpoints
29 | from requests_toolbelt import (  # type: ignore[import]
   |                                  ^^^^^^^^^^^^^^^^^^^^^^
30 |     MultipartEncoder,
31 |     MultipartEncoderMonitor,
   |
help: Remove the unused suppression comment
26 | import requests
27 | from craft_cli import CraftError, emit
28 | from craft_store import endpoints
   - from requests_toolbelt import (  # type: ignore[import]
29 + from requests_toolbelt import (
30 |     MultipartEncoder,
31 |     MultipartEncoderMonitor,
32 | )

error[unresolved-attribute]: Attribute `login` is not defined on `AnonymousClient` in union `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 `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `logout` is not defined on `AnonymousClient` in union `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 `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `whoami` is not defined on `AnonymousClient` in union `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 `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `whoami` is not defined on `AnonymousClient` in union `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 `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `unregister_name` is not defined on `AnonymousClient` in union `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 `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `push_file` is not defined on `AnonymousClient` in union `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 `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `list_resource_revisions` is not defined on `AnonymousClient` in union `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 `unresolved-attribute` is enabled by default

error[invalid-argument-type]: Argument to function `__new__` is incorrect
   --> docs/conf.py:332:30
    |
330 |     docs_module_name = f"{library_name.replace('-', '_')}_docs"
331 |     docs_module = importlib.import_module(docs_module_name)
332 |     docs_path = pathlib.Path(docs_module.__file__).parent / library_name
    |                              ^^^^^^^^^^^^^^^^^^^^ Expected `str | PathLike[str]`, found `str | None`
333 |
334 |     if common_lib_path.is_symlink() and common_lib_path.readlink() == docs_path:
    |
info: Element `None` of this union is not assignable to `str | PathLike[str]`
info: Function defined here
   --> stdlib/pathlib/__init__.pyi:310:13
    |
308 |         def __new__(cls, *args: StrPath, **kwargs: Unused) -> Self: ...  # pyright: ignore[reportInconsistentConstructor]
309 |     else:
310 |         def __new__(cls, *args: StrPath, **kwargs: Unused) -> Self: ...
    |             ^^^^^^^      -------------- Parameter declared here
311 |
312 |     @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/1348/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1348/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly 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/1348/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1348/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly 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/1348/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1348/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: 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/1348/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1348/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly 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/1348/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1348/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly 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/1348/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1348/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly 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/1348/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1348/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly 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/1348/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1348/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly 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/1348/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1348/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your 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/1348/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1348/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly 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/1348/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1348/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your 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 `fastapi` has no member `FastAPI`
 --> docs/tutorial/code/fastapi/app.py:1:21
  |
1 | from fastapi import FastAPI
  |                     ^^^^^^^
2 |
3 | app = FastAPI()
  |
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Module `fastapi` has no member `FastAPI`
 --> docs/tutorial/code/fastapi/greeting_app.py:3:21
  |
1 | import os
2 |
3 | from fastapi import FastAPI
  |                     ^^^^^^^
4 |
5 | app = FastAPI()
  |
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Module `fastapi` has no member `FastAPI`
 --> docs/tutorial/code/fastapi/visitors_app.py:7:21
  |
5 | from typing import Annotated
6 |
7 | from fastapi import FastAPI, Header
  |                     ^^^^^^^
8 | import psycopg2
  |
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Module `fastapi` has no member `Header`
 --> docs/tutorial/code/fastapi/visitors_app.py:7:30
  |
5 | from typing import Annotated
6 |
7 | from fastapi import FastAPI, Header
  |                              ^^^^^^
8 | import psycopg2
  |
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/1348/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1348/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly 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/1348/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1348/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-attribute]: Module `flask` has no member `Flask`
 --> docs/tutorial/code/flask/app.py:5:7
  |
3 | import flask
4 |
5 | app = flask.Flask(__name__)
  |       ^^^^^^^^^^^
  |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Module `flask` has no member `Flask`
 --> docs/tutorial/code/flask/greeting_app.py:5:7
  |
3 | import flask
4 |
5 | app = flask.Flask(__name__)
  |       ^^^^^^^^^^^
6 | app.config.from_prefixed_env()
  |
info: rule `unresolved-attribute` 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/1348/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1348/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-attribute]: Module `flask` has no member `Flask`
  --> docs/tutorial/code/flask/visitors_app.py:9:7
   |
 7 | import psycopg2
 8 |
 9 | app = flask.Flask(__name__)
   |       ^^^^^^^^^^^
10 | app.config.from_prefixed_env()
   |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Module `flask` has no member `request`
  --> docs/tutorial/code/flask/visitors_app.py:18:22
   |
16 | def index():
17 |     with psycopg2.connect(DATABASE_URI) as conn, conn.cursor() as cur:
18 |         user_agent = flask.request.headers.get('User-Agent')
   |                      ^^^^^^^^^^^^^
19 |         timestamp = datetime.datetime.now()
   |
info: rule `unresolved-attribute` 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/1348/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1348/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make 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 `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 `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 `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 `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 `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 `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 `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 `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 `list[Unknown] | datetime | str | 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 `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 `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 `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:225:9
    |
223 |     return craft_platforms.BuildInfo(
224 |         build_base=craft_platforms.DistroBase("ubuntu", "22.04"),
225 |         build_on=arch,
    |         ^^^^^^^^^^^^^ Expected `DebianArchitecture`, found `str`
226 |         build_for="arm64",
227 |         platform="distro-1-test64",
    |
info: rule `invalid-argument-type` 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-return-type]: Return type does not match returned value
  --> tests/extensions/test_extensions.py:33:37
   |
32 |     @classmethod
33 |     def get_supported_bases(cls) -> list[tuple[str, ...]]:
   |                                     --------------------- Expected `list[tuple[str, ...]]` because of return type
34 |         """Return a list of tuple of supported bases."""
35 |         return cls.bases
   |                ^^^^^^^^^ expected `list[tuple[str, ...]]`, found `Unknown | list[tuple[str, str]]`
36 |
37 |     @staticmethod
   |
info: rule `invalid-return-type` 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-submodule]: Submodule `application` might not have been imported
  --> 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-submodule` 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 `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: 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 `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: 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 `BuildInfo | Path`
57 |         # Test that the cache lock gets created
58 |         assert lock_file.is_file()
   |
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 `BuildInfo | Path`
57 |         # Test that the cache lock gets created
58 |         assert lock_file.is_file()
   |
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 `BuildInfo | Path`
57 |         # Test that the cache lock gets created
58 |         assert lock_file.is_file()
   |
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 `BuildInfo | Path`
57 |         # Test that the cache lock gets created
58 |         assert lock_file.is_file()
   |
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 `BuildInfo | Path`
57 |         # Test that the cache lock gets created
58 |         assert lock_file.is_file()
   |
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 `BuildInfo | Path`
57 |         # Test that the cache lock gets created
58 |         assert lock_file.is_file()
   |
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 `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: 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 `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: 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 `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: 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 `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: 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 `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: 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 `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: 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 `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: 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 `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: 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 `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: 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 `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: 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 `BuildInfo | Path`
135 |         instance.execute_run(["test", "-d", "/root/.cache"], check=True)
136 |         instance.execute_run(
    |
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 `BuildInfo | Path`
135 |         instance.execute_run(["test", "-d", "/root/.cache"], check=True)
136 |         instance.execute_run(
    |
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 `BuildInfo | Path`
135 |         instance.execute_run(["test", "-d", "/root/.cache"], check=True)
136 |         instance.execute_run(
    |
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 `BuildInfo | Path`
135 |         instance.execute_run(["test", "-d", "/root/.cache"], check=True)
136 |         instance.execute_run(
    |
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 `BuildInfo | Path`
135 |         instance.execute_run(["test", "-d", "/root/.cache"], check=True)
136 |         instance.execute_run(
    |
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 `BuildInfo | Path`
135 |         instance.execute_run(["test", "-d", "/root/.cache"], check=True)
136 |         instance.execute_run(
    |
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 | from ops import testing
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/1348/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1348/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `ops`
  --> tests/spread/commands/init-extensions/tests/unit/test_charm.py:10:6
   |
 9 | import charm
10 | from ops import testing
   |      ^^^
   |
info: Searched in the following paths during module resolution:
info:   1. /home/runner/work/charmcraft/charmcraft (first-party code)
info:   2. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   3. /snap/astral-ty/1348/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1348/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.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/1348/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1348/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.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/1348/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1348/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

warning[unused-type-ignore-comment]: Unused blanket `type: ignore` directive
   --> tests/spread/dependencies/strict-dependencies-errors/extra-binary-packages/src/charm.py:103:27
    |
102 | if __name__ == "__main__":  # pragma: nocover
103 |     ops.main(CharmCharm)  # type: ignore
    |                           ^^^^^^^^^^^^^^
    |
help: Remove the unused suppression comment
100 | 
101 | 
102 | if __name__ == "__main__":  # pragma: nocover
    -     ops.main(CharmCharm)  # type: ignore
103 +     ops.main(CharmCharm)

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/1348/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1348/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

warning[unused-type-ignore-comment]: Unused blanket `type: ignore` directive
   --> tests/spread/dependencies/strict-dependencies-errors/extra-packages/src/charm.py:103:27
    |
102 | if __name__ == "__main__":  # pragma: nocover
103 |     ops.main(CharmCharm)  # type: ignore
    |                           ^^^^^^^^^^^^^^
    |
help: Remove the unused suppression comment
100 | 
101 | 
102 | if __name__ == "__main__":  # pragma: nocover
    -     ops.main(CharmCharm)  # type: ignore
103 +     ops.main(CharmCharm)

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/1348/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1348/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

warning[unused-type-ignore-comment]: Unused blanket `type: ignore` directive
   --> tests/spread/dependencies/strict-dependencies-errors/missing-packages/src/charm.py:103:27
    |
102 | if __name__ == "__main__":  # pragma: nocover
103 |     ops.main(CharmCharm)  # type: ignore
    |                           ^^^^^^^^^^^^^^
    |
help: Remove the unused suppression comment
100 | 
101 | 
102 | if __name__ == "__main__":  # pragma: nocover
    -     ops.main(CharmCharm)  # type: ignore
103 +     ops.main(CharmCharm)

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/1348/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1348/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

warning[unused-type-ignore-comment]: Unused blanket `type: ignore` directive
   --> tests/spread/dependencies/strict-dependencies-errors/no-requirements/src/charm.py:103:27
    |
102 | if __name__ == "__main__":  # pragma: nocover
103 |     ops.main(CharmCharm)  # type: ignore
    |                           ^^^^^^^^^^^^^^
    |
help: Remove the unused suppression comment
100 | 
101 | 
102 | if __name__ == "__main__":  # pragma: nocover
    -     ops.main(CharmCharm)  # type: ignore
103 +     ops.main(CharmCharm)

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/1348/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1348/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

warning[unused-type-ignore-comment]: Unused blanket `type: ignore` directive
   --> tests/spread/dependencies/strict-dependencies/charm/src/charm.py:103:27
    |
102 | if __name__ == "__main__":  # pragma: nocover
103 |     ops.main(CharmCharm)  # type: ignore
    |                           ^^^^^^^^^^^^^^
    |
help: Remove the unused suppression comment
100 | 
101 | 
102 | if __name__ == "__main__":  # pragma: nocover
    -     ops.main(CharmCharm)  # type: ignore
103 +     ops.main(CharmCharm)

error[unresolved-import]: Module `charms.reactive` has no member `set_flag`
 --> tests/spread/smoketests/reactive/reactivecharm/reactive/reactivecharm.py:1:29
  |
1 | from charms.reactive import set_flag, when_not
  |                             ^^^^^^^^
  |
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Module `charms.reactive` has no member `when_not`
 --> tests/spread/smoketests/reactive/reactivecharm/reactive/reactivecharm.py:1:39
  |
1 | from charms.reactive import set_flag, when_not
  |                                       ^^^^^^^^
  |
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/1348/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1348/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

warning[unused-type-ignore-comment]: Unused blanket `type: ignore` directive
   --> tests/spread/ubuntu-20.04/charm/bases/src/charm.py:104:32
    |
103 | if __name__ == "__main__":  # pragma: nocover
104 |     ops.main(BasicBasesCharm)  # type: ignore
    |                                ^^^^^^^^^^^^^^
    |
help: Remove the unused suppression comment
101 | 
102 | 
103 | if __name__ == "__main__":  # pragma: nocover
    -     ops.main(BasicBasesCharm)  # type: ignore
104 +     ops.main(BasicBasesCharm)

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/1348/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1348/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

warning[unused-type-ignore-comment]: Unused blanket `type: ignore` directive
  --> tests/spread/ubuntu-20.04/charm/platforms/src/charm.py:27:31
   |
26 | if __name__ == "__main__":  # pragma: nocover
27 |     ops.main(PlatformsCharm)  # type: ignore
   |                               ^^^^^^^^^^^^^^
   |
help: Remove the unused suppression comment
24 | 
25 | 
26 | if __name__ == "__main__":  # pragma: nocover
   -     ops.main(PlatformsCharm)  # type: ignore
27 +     ops.main(PlatformsCharm)

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/1348/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1348/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

warning[unused-type-ignore-comment]: Unused blanket `type: ignore` directive
   --> tests/spread/ubuntu-22.04/charm/bases/src/charm.py:104:32
    |
103 | if __name__ == "__main__":  # pragma: nocover
104 |     ops.main(BasicBasesCharm)  # type: ignore
    |                                ^^^^^^^^^^^^^^
    |
help: Remove the unused suppression comment
101 | 
102 | 
103 | if __name__ == "__main__":  # pragma: nocover
    -     ops.main(BasicBasesCharm)  # type: ignore
104 +     ops.main(BasicBasesCharm)

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/1348/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1348/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

warning[unused-type-ignore-comment]: Unused blanket `type: ignore` directive
  --> tests/spread/ubuntu-22.04/charm/platforms/src/charm.py:27:31
   |
26 | if __name__ == "__main__":  # pragma: nocover
27 |     ops.main(PlatformsCharm)  # type: ignore
   |                               ^^^^^^^^^^^^^^
   |
help: Remove the unused suppression comment
24 | 
25 | 
26 | if __name__ == "__main__":  # pragma: nocover
   -     ops.main(PlatformsCharm)  # type: ignore
27 +     ops.main(PlatformsCharm)

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/1348/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1348/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

warning[unused-type-ignore-comment]: Unused blanket `type: ignore` directive
  --> tests/spread/ubuntu-24.04/charm/platforms/src/charm.py:27:31
   |
26 | if __name__ == "__main__":  # pragma: nocover
27 |     ops.main(PlatformsCharm)  # type: ignore
   |                               ^^^^^^^^^^^^^^
   |
help: Remove the unused suppression comment
24 | 
25 | 
26 | if __name__ == "__main__":  # pragma: nocover
   -     ops.main(PlatformsCharm)  # type: ignore
27 +     ops.main(PlatformsCharm)

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/1348/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1348/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly 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/1348/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1348/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.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/1348/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1348/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your 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 `charm` has no member `TestCmdCharm`
 --> tests/spread/ubuntu-24.04/test-cmd/tests/unit/test_charm.py:4:19
  |
2 | from ops import testing
3 |
4 | from charm import TestCmdCharm
  |                   ^^^^^^^^^^^^
  |
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/1348/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1348/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

warning[unused-type-ignore-comment]: Unused blanket `type: ignore` directive
  --> tests/spread/ubuntu-25.10/charm/platforms/src/charm.py:27:31
   |
26 | if __name__ == "__main__":  # pragma: nocover
27 |     ops.main(PlatformsCharm)  # type: ignore
   |                               ^^^^^^^^^^^^^^
   |
help: Remove the unused suppression comment
24 | 
25 | 
26 | if __name__ == "__main__":  # pragma: nocover
   -     ops.main(PlatformsCharm)  # type: ignore
27 +     ops.main(PlatformsCharm)

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/1348/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1348/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly 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/1348/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1348/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.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/1348/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1348/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your 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 `charm` has no member `TestCmdCharm`
 --> tests/spread/ubuntu-25.10/test-cmd/tests/unit/test_charm.py:4:19
  |
2 | from ops import testing
3 |
4 | from charm import TestCmdCharm
  |                   ^^^^^^^^^^^^
  |
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/1348/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1348/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

warning[unused-type-ignore-comment]: Unused blanket `type: ignore` directive
  --> tests/spread/ubuntu-26.04/charm/platforms/src/charm.py:27:31
   |
26 | if __name__ == "__main__":  # pragma: nocover
27 |     ops.main(PlatformsCharm)  # type: ignore
   |                               ^^^^^^^^^^^^^^
   |
help: Remove the unused suppression comment
24 | 
25 | 
26 | if __name__ == "__main__":  # pragma: nocover
   -     ops.main(PlatformsCharm)  # type: ignore
27 +     ops.main(PlatformsCharm)

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/1348/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1348/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly 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/1348/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1348/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.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/1348/lib/python3.12/site-packages (site-packages)
info:   4. /snap/astral-ty/1348/lib64/python3.12/site-packages (site-packages)
info:   5. /home/runner/work/charmcraft/charmcraft/.venv/lib/python3.12/site-packages (site-packages)
info:   6. /home/runner/work/charmcraft/charmcraft/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your 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 `charm` has no member `TestCmdCharm`
 --> tests/spread/ubuntu-26.04/test-cmd/tests/unit/test_charm.py:4:19
  |
2 | from ops import testing
3 |
4 | from charm import TestCmdCharm
  |                   ^^^^^^^^^^^^
  |
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]: Object of type `Mock` is not assignable to attribute `write` of type `def write(self, library: Library) -> None`
  --> 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: Implicit shadowing of function `write`, add an annotation 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[not-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 `not-subscriptable` is enabled by default

error[invalid-assignment]: Object of type `() -> Unknown` is not assignable to attribute `_get_pip` of type `def _get_pip(self) -> str`
  --> 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: Implicit shadowing of function `_get_pip`, add an annotation to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `() -> Unknown` is not assignable to attribute `_get_pip` of type `def _get_pip(self) -> str`
  --> 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: Implicit shadowing of function `_get_pip`, add an annotation 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

error[unresolved-attribute]: Attribute `group` is not defined on `None` in union `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 `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `group` is not defined on `None` in union `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 `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `group` is not defined on `None` in union `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 `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `group` is not defined on `None` in union `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 `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `group` is not defined on `None` in union `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 `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `group` is not defined on `None` in union `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 `unresolved-attribute` is enabled by default

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

Found 172 diagnostics

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

Labels

PR: Dependencies This PR updates project dependencies.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants