Skip to content

Conversation

@james-garner-canonical
Copy link
Contributor

@james-garner-canonical james-garner-canonical commented Oct 15, 2024

Description

While looking into #1105, I found it useful to type annotate juju/constraints.py while figuring out how things work.

QA Steps

There should be no runtime changes in behaviour. Unit and integration tests should continue to pass, especially tests/unit/test_constraints.py.

Notes & Discussion

I also broke the longer regexes down across multiple lines and added comments to help me understand them.

I don't mind cutting this PR back to use more minimal type annotations, etc if that's deemed more appropriate in review (e.g. Dict[str, Union[int, float, bool]] instead of the custom TypedDicts).

@james-garner-canonical james-garner-canonical marked this pull request as ready for review October 15, 2024 05:13
@dimaqq
Copy link
Contributor

dimaqq commented Oct 16, 2024

Let's rebase and merge this.

@james-garner-canonical james-garner-canonical force-pushed the 2024-10/style/type-hint-constraints branch from 554ca7d to c49e474 Compare October 16, 2024 08:43
@james-garner-canonical
Copy link
Contributor Author

/merge

@jujubot jujubot merged commit 3911d1f into juju:main Oct 16, 2024
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.

3 participants