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

Use typing.Optional and typing.Union to be compatible with python3.9 … #15255

Closed
wants to merge 1 commit into from

Conversation

bwesen
Copy link

@bwesen bwesen commented Mar 14, 2024

…in styles.py

Description

Fix some minor python3.10-esque typing changes in modules/styles.py so it still works on python3.9 as well

Checklist:

@bwesen bwesen requested a review from AUTOMATIC1111 as a code owner March 14, 2024 13:16
@bwesen
Copy link
Author

bwesen commented Mar 14, 2024

Don't know why the warning "Pull requests can't target master branch" is there, as the PR targets the dev branch...

@w-e-w w-e-w mentioned this pull request Mar 14, 2024
4 tasks
@w-e-w
Copy link
Collaborator

w-e-w commented Mar 15, 2024

this kind of annotations is used all over webui
the way to fix this for old python is to add from __future__ import annotations in at the top

I was the one who fogot to add from __future__ import annotations when I was working on styles.py

@AUTOMATIC1111
Copy link
Owner

closed in favor of the other solution

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