Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style: type annotate constraints.py #1159

Merged

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
Copy link
Contributor Author

/merge

@jujubot jujubot merged commit 3911d1f into juju:main Oct 16, 2024
12 of 13 checks passed
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