Skip to content

Conversation

@ByteOtter
Copy link
Contributor

What this PR does / why we need it:

Fixes the remaining typing errors thrown by mypy.

Adds two new dependencies: boto3-stubs for boto3 type information and mypy as dev dependency to allow setup of the dev environment via poetry.

Which issue(s) this PR fixes:
Fixes #152

Special notes for your reviewer:

Release note:

@ByteOtter ByteOtter marked this pull request as ready for review January 12, 2026 17:11
@ByteOtter ByteOtter self-assigned this Jan 12, 2026
@codecov
Copy link

codecov bot commented Jan 12, 2026

Codecov Report

❌ Patch coverage is 96.62921% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.55%. Comparing base (9bc3c1f) to head (afc8be6).

Files with missing lines Patch % Lines
src/gardenlinux/distro_version/__init__.py 95.45% 1 Missing ⚠️
src/gardenlinux/git/repository.py 66.66% 1 Missing ⚠️
src/gardenlinux/github/release/__init__.py 85.71% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #296   +/-   ##
=======================================
  Coverage   91.54%   91.55%           
=======================================
  Files          42       42           
  Lines        2070     2083   +13     
=======================================
+ Hits         1895     1907   +12     
- Misses        175      176    +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ByteOtter ByteOtter requested a review from vivus-ignis January 12, 2026 17:20

class LegacyDistroVersion(BaseDistroVersion):
def __init__(self, major, patch):
def __init__(self: Self, major: int, patch: int) -> None:
Copy link
Contributor

Choose a reason for hiding this comment

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

AFAIK self can be left without typing hint as the type checkers are "smart" enough to know what self mean for Python classes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I thought so too, but mypy seemed to disagree

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.

Improve Code Quality of python lib

3 participants