Skip to content

Handle missing PyYAML type stubs in mypy lint run#18

Merged
electrocucaracha merged 2 commits into
mainfrom
copilot/fix-super-linter-errors
May 22, 2026
Merged

Handle missing PyYAML type stubs in mypy lint run#18
electrocucaracha merged 2 commits into
mainfrom
copilot/fix-super-linter-errors

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 22, 2026

The super-linter failure was caused by mypy requiring yaml stubs in an environment where types-PyYAML could not be installed. This PR scopes the fix to type-checking only so lint remains stable without changing runtime behavior.

  • Mypy resilience for PyYAML import

    • Added an explicit mypy suppression on the yaml import in llm.py to avoid dependency on external stub installation during lint runs.
    • No functional changes to commit-message generation or YAML parsing paths.
  • Code change

    import yaml  # type: ignore[import-untyped]

Copilot AI linked an issue May 22, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Fix super-linter failures in CI workflow Handle missing PyYAML type stubs in mypy lint run May 22, 2026
Copilot AI requested a review from electrocucaracha May 22, 2026 17:54
@electrocucaracha electrocucaracha marked this pull request as ready for review May 22, 2026 18:48
@electrocucaracha electrocucaracha requested a review from Copilot May 22, 2026 19:29
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR improves CI lint stability by making the mypy type-check step resilient to missing third-party type stubs for the yaml (PyYAML) import, without changing runtime behavior.

Changes:

  • Suppressed mypy’s import-untyped error for the yaml import in llm.py to prevent super-linter/mypy failures when types-PyYAML isn’t available.

@electrocucaracha electrocucaracha merged commit 63044b7 into main May 22, 2026
11 checks passed
@electrocucaracha electrocucaracha deleted the copilot/fix-super-linter-errors branch May 22, 2026 19:34
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.

Super-linter has failed

3 participants