Skip to content

Integrate mypy into CI#4800

Merged
bruntib merged 2 commits intoEricsson:masterfrom
barnabasdomozi:mypy_ci
Apr 8, 2026
Merged

Integrate mypy into CI#4800
bruntib merged 2 commits intoEricsson:masterfrom
barnabasdomozi:mypy_ci

Conversation

@barnabasdomozi
Copy link
Copy Markdown
Collaborator

@barnabasdomozi barnabasdomozi commented Mar 10, 2026

Added pyproject.toml, which defines the mypy configuration. As a first step, only the codechecker_common/ folder is checked by mypy. This can be extended later.

The first issue detected by mypy is that Report.report_hash could be None in several cases in the codebase.
Also added installation of stub package types-psutil for mypy.

@barnabasdomozi barnabasdomozi force-pushed the mypy_ci branch 4 times, most recently from f7208c5 to e979030 Compare March 10, 2026 16:05
- uses: actions/checkout@v2
- uses: actions/setup-python@v4
with:
python-version: '3.12'
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.

We should use the same python version for all test targets.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

The latest mypy version no longer supports Python 3.9, which has reached end of life:
https://devguide.python.org/versions/

Added pyproject.toml, which defines the mypy configuration.
As a first step, only the codechecker_common/ folder is checked
by mypy. This can be extended later.

The first issue detected by mypy is that Report.report_hash
could be None in several cases in the codebase.
Also added installation of stub package types-psutil for mypy.
@barnabasdomozi barnabasdomozi force-pushed the mypy_ci branch 2 times, most recently from 5eed9a6 to 01f59b4 Compare April 7, 2026 12:00
@bruntib bruntib merged commit 1e17d8b into Ericsson:master Apr 8, 2026
9 of 10 checks passed
@barnabasdomozi barnabasdomozi deleted the mypy_ci branch April 8, 2026 11:11
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.

2 participants