Skip to content

Conversation

sinclert-canonical
Copy link
Contributor

This PR updates the typing signatures to leverage Python 3.10+ syntax.

It is an effort to harmonize typing syntax within the project, as there are some discrepancies regarding how some of it is used throughout the files (i.e. see Optional usages here, and <type> | None usages here).

In short:

- Dict[<type>, <type>]
+ dict[<type>, <type>]

- List[<type>]
+ list[<type>]

- Set[<type>]
+ set[<type>]

- Tuple[<type>]
+ tuple[<type>]

- Optional[<type>]
+ <type> | None

Additional considerations:

  • I have not updated the syntax on the postgresql-k8s charm lib, as I thought the Python version requirements may be different for that piece of software.

Copy link

codecov bot commented Jan 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.55%. Comparing base (68fb053) to head (4ca633f).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #816      +/-   ##
==========================================
- Coverage   75.57%   75.55%   -0.03%     
==========================================
  Files          12       12              
  Lines        3108     3105       -3     
  Branches      464      464              
==========================================
- Hits         2349     2346       -3     
  Misses        620      620              
  Partials      139      139              

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

Copy link
Member

@marceloneppel marceloneppel left a comment

Choose a reason for hiding this comment

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

Thanks, @sinclert-canonical! LGTM.

@sinclert-canonical sinclert-canonical merged commit da22c0f into main Jan 13, 2025
99 checks passed
@sinclert-canonical sinclert-canonical deleted the sinclert/optional-return-syntax branch January 13, 2025 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants