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

Improve server_default / existing_server_default typing #1468

Open
CaselIT opened this issue Apr 30, 2024 · 2 comments
Open

Improve server_default / existing_server_default typing #1468

CaselIT opened this issue Apr 30, 2024 · 2 comments
Labels
bug Something isn't working pep 484 typing related issues

Comments

@CaselIT
Copy link
Member

CaselIT commented Apr 30, 2024

The public typing have an incorrect type for it.
Use the correct one defined here:

_ServerDefault = Union["TextClause", "FetchedValue", "Function[Any]", str]

@CaselIT CaselIT added bug Something isn't working pep 484 typing related issues labels Apr 30, 2024
@Olegt0rr
Copy link

Olegt0rr commented Sep 5, 2024

Wonder about default value False.

existing_server_default: Optional[
Union[str, bool, Identity, Computed]
] = False,

and some other places - the same.

Changing it to None failed some tests with mssql generated sql 0_o

@CaselIT
Copy link
Member Author

CaselIT commented Sep 5, 2024

That's not the issue. False there has a particular meaning

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pep 484 typing related issues
Projects
None yet
Development

No branches or pull requests

2 participants