Skip to content

elbepack: add type annotation to global dict variables#462

Closed
t-8ch wants to merge 3 commits into
masterfrom
b4/mypy
Closed

elbepack: add type annotation to global dict variables#462
t-8ch wants to merge 3 commits into
masterfrom
b4/mypy

Conversation

@t-8ch

@t-8ch t-8ch commented May 27, 2026

Copy link
Copy Markdown
Contributor

No description provided.

# Describe the purpose of this series. The information you put here
# will be used by the project maintainer to make a decision whether
# your patches should be reviewed, and in what priority order. Please be
# very detailed and link to any relevant discussions or sites that the
# maintainer can review to better understand your proposed changes. If you
# only have a single patch in your series, the contents of the cover
# letter will be appended to the "under-the-cut" portion of the patch.

# Lines starting with # will be removed from the cover letter. You can
# use them to add notes or reminders to yourself. If you want to use
# markdown headers in your cover letter, start the line with ">#".

# You can add trailers to the cover letter. Any email addresses found in
# these trailers will be added to the addresses specified/generated
# during the b4 send stage. You can also run "b4 prep --auto-to-cc" to
# auto-populate the To: and Cc: trailers based on the code being
# modified.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>

--- b4-submit-tracking ---
# This section is used internally by b4 prep for tracking purposes.
{
  "series": {
    "revision": 1,
    "change-id": "20260527-mypy-6bd783e6135b",
    "prefixes": [],
    "presubject": ""
  }
}
t-8ch added 2 commits May 27, 2026 14:25
Make sure Debian oldstable does not regress.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
mypy 2.x complains about these variables:

elbepack/log.py:50: error: Need type annotation for "_queues" (hint: "_queues: dict[<type>, <type>] = ...")  [var-annotated]
elbepack/commands/check-build.py:30: error: Need type annotation for "_checks" (hint: "_checks: dict[<type>, <type>] = ...")  [var-annotated]
elbepack/finetuning.py:28: error: Need type annotation for "_actions" (hint: "_actions: dict[<type>, <type>] = ...")  [var-annotated]

Add explicit annotation to prevent the warnings.
Shuffle some code around to make the references work.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
@t-8ch

t-8ch commented May 28, 2026

Copy link
Copy Markdown
Contributor Author

Applied manually.

@t-8ch t-8ch closed this May 28, 2026
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.

1 participant