Skip to content

style: resolve ty type-checking errors in config service - #1231

Merged
lengau merged 1 commit into
canonical:mainfrom
LoweRAM:work/fix-lint
Oct 22, 2026
Merged

lengau merged 1 commit into
canonical:mainfrom
LoweRAM:work/fix-lint

Conversation

@LoweRAM

@LoweRAM LoweRAM commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

Resolve ty check diagnostics in craft_application/services/config.py introduced by updated type signatures in dependencies:

  • Ignore missing-argument for field.default_factory() where union signature includes (dict[str, Any], /) -> Any.
  • Ignore invalid-argument-type for passing field_info.annotation to _convert_type.

Verified by running make lint and make test-fast.


  • I've followed the contribution guidelines.
  • I've signed the CLA.
  • I've successfully run make lint && make test.
  • I've added or updated any relevant documentation.
  • In documents I changed, I added a meta description if one was missing.
  • I've updated the relevant release notes.

@lengau
lengau marked this pull request as ready for review October 22, 2026 18:58
@lengau
lengau self-requested a review as a code owner October 22, 2026 18:58
@lengau
lengau requested review from bepri and mr-cal and a lite review from Copilot and removed request for lengau October 22, 2026 18:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The suppressions may hide a runtime-invalid default-factory call and an inaccurate _convert_type typing contract.

1 open issue
What changed in this PR

This pull request addresses ty type-checking diagnostics in the configuration service caused by updated dependency signatures.

Changes:

  • Adds a suppression for the default-factory missing-argument diagnostic.
  • Adds a suppression for the field-annotation argument-type diagnostic.
File Description
craft_application/​services/​config.py Adds targeted ty suppressions for Pydantic default-factory invocation and field-annotation conversion; review comments identify a potentially unsupported factory signature and an inaccurate helper type contract.

Review effort: Lite

Comment thread craft_application/services/config.py
@lengau
lengau merged commit 384e328 into canonical:main Oct 22, 2026
40 of 47 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants