Repository navigation
chore: add type annotations to cloudinit.distros.azurelinux - #7117
Open
wanjinhao1 wants to merge 1 commit into
Open
wanjinhao1 wants to merge 1 commit into
wanjinhao1 wants to merge 1 commit into
Conversation
Member
|
@wanjinhao1 please sign the CLA |
Member
|
Please sign the CLA and resolve conflicts |
Enable mypy check_untyped_defs for cloudinit.distros.azurelinux by moving distro attributes to class-level (matching the style used by cloudinit.distros.mariner) so their types are statically known. Refs canonicalGH-5445
wanjinhao1
force-pushed
the
agent/fix-5445-azurelinux-typing
branch
from
November 2, 2026 04:45
b3b8f3b to
86aaa4a
Compare
Author
|
Signed the CLA via ubuntu.com/legal/contributors, and rebased this branch onto current main (resolved the pyproject.toml mypy-override conflict: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed Commit Message
Additional Context
Part of GH-5445 (
check_untyped_defsmypy enablement). Per the tracking issue I left a comment claimingcloudinit.distros.azurelinuxbefore starting.network_conf_fnneeds a# type: ignore[assignment]because the parentcloudinit.distros.rhel.Distrodeclares it as astr, while this distro (like debian/mariner) uses a dict for per-renderer paths.No functional change, so no new unit tests and no doc updates are needed.
Test Steps
python3 -m mypy cloudinit/distros/azurelinux.py tests/unittests/distros/test_azurelinux.py→ Success: no issues foundpython3 -m pytest tests/unittests/distros/test_azurelinux.py→ 2 passedpython3 -m ruff check,python3 -m black --check,python3 -m isort --check-onlyon the changed file → all passMerge type
AI assistance disclosure: this PR was prepared with AI coding assistance by the account owner (@wanjinhao1), who reviewed and verified the changes.