Skip to content

More fields #15

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

Merged
merged 5 commits into from
Feb 5, 2019
Merged

More fields #15

merged 5 commits into from
Feb 5, 2019

Conversation

aleksanb
Copy link
Contributor

@aleksanb aleksanb commented Feb 4, 2019

This pr adds __get__ signatures for even more fields which are used in our codebase.

These are taken from the corresponding
django/contrib/postgres/fields/ranges.py file.
@aleksanb
Copy link
Contributor Author

aleksanb commented Feb 4, 2019

DecimalField should subclass Field and not IntegerField, so i changed it.

@aleksanb
Copy link
Contributor Author

aleksanb commented Feb 4, 2019

Unsure how to proceed with the lack of Psychopg stubs, we probably want stubs for the following two files at least: https://github.com/psycopg/psycopg2/blob/master/lib/extras.py and https://github.com/psycopg/psycopg2/blob/master/lib/_range.py, but unsure as to how this would be integrated.

@mkurnikov
Copy link
Member

mkurnikov commented Feb 4, 2019

Shouldn't psycopg2 stubs be added in their own psycopg2-stubs package in pypi? And we'll just depend on it.

@aleksanb
Copy link
Contributor Author

aleksanb commented Feb 4, 2019

Probably, yes. I didn't really want to be maintaining a separate repo for stubs that I'd only consume through django-stubs, though.

@mkurnikov
Copy link
Member

Can it be fixed with # type: ignore on the psycopg2 import line? I don't want to add psycopg2 stubs in this repo, they really do not belong here.

@aleksanb
Copy link
Contributor Author

aleksanb commented Feb 5, 2019

@mkurnikov updated with type: ignore for now.

@mkurnikov
Copy link
Member

Thanks!

@mkurnikov mkurnikov merged commit af30bb6 into typeddjango:master Feb 5, 2019
@aleksanb aleksanb deleted the more-fields branch February 5, 2019 13:55
@TonyRippy TonyRippy mentioned this pull request Dec 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants