dependabot[bot]
01a31d2fd5
Bump pytest from 6.2.5 to 7.0.0 ( #845 )
...
Bumps [pytest](https://github.com/pytest-dev/pytest ) from 6.2.5 to 7.0.0.
- [Release notes](https://github.com/pytest-dev/pytest/releases )
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst )
- [Commits](https://github.com/pytest-dev/pytest/compare/6.2.5...7.0.0 )
---
updated-dependencies:
- dependency-name: pytest
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-07 09:12:33 +03:00
Rob Percival
74083c9f8a
Correct return type of get_commands() ( #838 )
...
According to the docstring for this function, "the instantiated module can be placed in the dictionary in place of the application name".
2022-01-31 20:28:32 +03:00
dependabot[bot]
8843acde3e
Bump black from 21.12b0 to 22.1.0 ( #836 )
...
Bumps [black](https://github.com/psf/black ) from 21.12b0 to 22.1.0.
- [Release notes](https://github.com/psf/black/releases )
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md )
- [Commits](https://github.com/psf/black/commits/22.1.0 )
---
updated-dependencies:
- dependency-name: black
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-31 08:45:07 +03:00
Petter Friberg
8aae836a26
Model.__init__ supporting same typing as assigment (#835 )
...
* `Model.__init__` supporting same typing as assigment
* Update mypy_django_plugin/django/context.py
2022-01-29 12:07:26 +03:00
Seth Yastrov
c556668d7a
Attempt to fix 'INTERNAL ERROR using annotate'. ( #753 )
...
KeyError: "Failed qualified lookup: '_AnyAttrAllowed' (fullname =
'django._AnyAttrAllowed')."
https://github.com/typeddjango/django-stubs/issues/745
2022-01-28 21:43:03 +03:00
Cory Dolphin
28d6dc992c
Export Datasource, Driver from gdal ( #797 )
2022-01-28 21:42:26 +03:00
emma-blossom
73290597f8
Make SomeModel._default_manager return a BaseManager[SomeModel] instead of BaseManager[Model] ( #817 )
...
* _default_manager has more specific type for TypeVars
* remove unnecessary # type: ignore
* add test for _base_manager
* add overloads for classproperty.__get__
* readd # type: ignore for WSGIRequestHandler.connection, fails in github's pipeline
* fix _base_manager test: mypy reveals an inferred type
Co-authored-by: Michael Pöhle <michael.poehle@polyteia.de >
2022-01-28 21:42:11 +03:00
Maarten ter Huurne
060dc3b41a
Add object_list to BaseListView ( #833 )
...
While `object_list` isn't defined at construction, `BaseListView.get()`
sets it when handling a request, so in practice it is defined whenever
a list view is doing its work.
The Django documentation describes `object_list` as "the list of
objects (usually, but not necessarily a queryset)", so I picked
`Sequence` as the type.
Closes #790
2022-01-28 21:41:30 +03:00
rolandcrosby-check
5d3768e593
Allow *args to be Any for generic views ( #831 )
2022-01-26 10:00:26 +03:00
Petter Friberg
515e382d4a
Fix .filter-kwargs lookup crash during cached runs ( #828 )
...
* Fix .filter-kwargs lookup crash during cached runs
* Update mypy_django_plugin/lib/helpers.py
Co-authored-by: Nikita Sobolev <mail@sobolevn.me >
2022-01-24 13:24:09 +03:00
Petter Friberg
220f0e4cf0
Reuse reverse managers instead of recreating ( #825 )
2022-01-22 21:13:05 +03:00
Petter Friberg
edec5a1c99
Notify when Manager.from_queryset happens inside model class body ( #824 )
...
* Refactor to more easily support additional config options
* Notify when Manager.from_queryset happens inside model class body
- A warning will be emitted whenever `Manager.from_queryset` happens
inside of a model class body
* Resolve generated default manager types before final iteration
A default manager on a model should always exist, eventually. Although,
we extend to look through dynamically generated managers on each
iteration instead of deferring until the final iteration.
2022-01-21 19:46:56 +03:00
dependabot[bot]
140bb38a79
Bump pre-commit from 2.16.0 to 2.17.0 ( #823 )
...
Bumps [pre-commit](https://github.com/pre-commit/pre-commit ) from 2.16.0 to 2.17.0.
- [Release notes](https://github.com/pre-commit/pre-commit/releases )
- [Changelog](https://github.com/pre-commit/pre-commit/blob/master/CHANGELOG.md )
- [Commits](https://github.com/pre-commit/pre-commit/compare/v2.16.0...v2.17.0 )
---
updated-dependencies:
- dependency-name: pre-commit
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-19 09:58:07 +03:00
Nikita Sobolev
c04201c859
Delete FUNDING.yml
2022-01-17 15:04:29 +03:00
sobolevn
5bbe353e92
Add FUNDING.yml and drop python3.6
2022-01-17 15:00:27 +03:00
Aleksander Vognild Burkow
27e5908762
Update project to use mypy 931 ( #819 )
2022-01-17 14:58:16 +03:00
Petter Friberg
a9e41a8ba9
Fix suggested changes from #820 ( #821 )
2022-01-16 21:13:47 +03:00
Petter Friberg
99f28387fb
Set custom queryset methods as manager attrs instead of method copies ( #820 )
...
Instead of copying methods over from a QuerySet passed to a basemanager
when invoking '<BaseManager>.from_queryset', any QuerySet methods are
declared as attributes on the manager.
This allows us to properly lookup any QuerySet method types via a
'get_attribute_hook' and will thus remove disorienting phantom errors
occuring from mypy trying to resolve types only existing in the module
where the _original_ (and real) queryset method was declared.
2022-01-16 12:14:33 +03:00
rolandcrosby-check
1da693ebff
Fix extra_context argument type in admin views ( #816 )
...
The `extra_context` argument to `ModelAdmin.changeform_view`,
`add_view`, `change_view`, `changelist_view`, `delete_view`, and
`history_view` is used to pass extra context variables to a template, so
all of these arguments should have type `Optional[Dict[str, Any]]`.
Instead, these are currently typed as `Optional[Dict[str, bool]]`,
`Optional[Dict[str, str]]`, or `None`.
2022-01-13 23:03:03 +03:00
rolandcrosby-check
3c1e9e3884
Allow Iterable[Iterable[Any]] as args_generator argument to format_html_join ( #722 )
...
* Allow List[Tuple[Any]] as args_generator argument to format_html_join
format_html_join's args_generator argument can be anything that contains
tuples of things that can be coerced to strings or that have a
`__html__` method.
Fixes #721 .
* Use `Iterable[Iterable[Any]]` as `args_generator` type
* Run linter
2022-01-12 09:44:14 +03:00
dependabot[bot]
4cdf8a8d39
Bump pytest-mypy-plugins from 1.9.2 to 1.9.3 ( #815 )
...
Bumps [pytest-mypy-plugins](https://github.com/TypedDjango/pytest-mypy-plugins ) from 1.9.2 to 1.9.3.
- [Release notes](https://github.com/TypedDjango/pytest-mypy-plugins/releases )
- [Changelog](https://github.com/typeddjango/pytest-mypy-plugins/blob/master/CHANGELOG.md )
- [Commits](https://github.com/TypedDjango/pytest-mypy-plugins/compare/1.9.2...1.9.3 )
---
updated-dependencies:
- dependency-name: pytest-mypy-plugins
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-12 09:42:53 +03:00
rolandcrosby-check
7701957e4f
Fix annotation of ModelAdmin.get_object ( #812 )
...
* Fix annotation of ModelAdmin.get_object
The type annotation in django-stubs indicated that the type of the
`from_field` argument to `ModelAdmin.get_object` should be `None`. In
fact, `None` is the default value of that argument. If the argument is
not `None`, [it is passed to a model's `_meta.get_field` method][impl], which
takes an argument of type `Union[Callable[..., Any], str`.
[impl]: ac5cc6cf01/django/contrib/admin/options.py (L767)
* Fix formatting
2022-01-08 10:48:29 +03:00
dependabot[bot]
fafb200e90
Bump requests from 2.27.0 to 2.27.1 ( #807 )
...
Bumps [requests](https://github.com/psf/requests ) from 2.27.0 to 2.27.1.
- [Release notes](https://github.com/psf/requests/releases )
- [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md )
- [Commits](https://github.com/psf/requests/compare/v2.27.0...v2.27.1 )
---
updated-dependencies:
- dependency-name: requests
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-06 12:39:00 +03:00
Tom Carrick
118f50307c
Allow expressions in UniqueConstraint ( #806 )
...
* Allow expressions in UniqueConstraint
* Use ellipsis
* And for fields
2022-01-06 12:07:24 +03:00
Abhyudai
3761c16c51
Change return type of queryset.bulk_update to int ( #683 )
...
- the change was made in the commit cd124295d8 .
2022-01-05 18:42:47 +03:00
Gergely Kalmár
c65e2c48db
Add typing to mypy plugin ( #804 )
2022-01-05 16:21:14 +03:00
Nikita Sobolev
ed68fbc99f
Update typecheck_tests.py
2022-01-04 20:32:50 +03:00
Nikita Sobolev
9cad4fbfeb
Delete misspel.yml
2022-01-04 20:32:18 +03:00
dependabot[bot]
3a27d8bb91
Bump requests from 2.26.0 to 2.27.0 ( #803 )
...
Bumps [requests](https://github.com/psf/requests ) from 2.26.0 to 2.27.0.
- [Release notes](https://github.com/psf/requests/releases )
- [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md )
- [Commits](https://github.com/psf/requests/compare/v2.26.0...v2.27.0 )
---
updated-dependencies:
- dependency-name: requests
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-04 11:19:24 +03:00
Carl Johan Hambro
49bed6c28d
Fix type for templatetag ( #801 )
2021-12-31 11:56:10 +03:00
Gabriel Augendre
3b02222beb
Update syndication Feed class ( #800 )
...
* Update syndication Feed class
* Fix typing
2021-12-30 16:33:29 +03:00
Cory Dolphin
9483865284
Make geos.GEOSGeometryBase.equals_exact accept float ( #796 )
2021-12-29 11:16:16 +03:00
Gabriel Augendre
1834242e46
Fix Feed.get_object signature ( #798 )
...
get_object's default implementation returns None but subclasses
are allowed to override this method and make it return anything.
The returned object would then be passed to other methods
to publish different data for different URL parameters.
https://docs.djangoproject.com/en/4.0/ref/contrib/syndication/
2021-12-29 11:07:43 +03:00
sobolevn
3b303480b3
Rename requirements.txt file for dependabot to work
2021-12-25 11:11:15 +03:00
Nikita Sobolev
b883e192e4
Adds better id and pk handling ( #791 )
2021-12-18 13:09:22 +03:00
w0rp
4a0dd04611
Set types for on_delete functions ( #772 )
...
Set types for on_delete functions so they can be provided as values to
the on_delete attribute of ForeignKey in Pyright's strict mode.
2021-12-17 22:20:01 +03:00
Nikita Sobolev
feb0bfa4a6
Updates deps ( #788 )
...
* Updates deps
* Updates deps
2021-12-16 22:39:12 +03:00
Nikita Sobolev
02a39f722d
Replace toml with tomli ( #787 )
...
* Replace `toml` with `tomli`
* Replace `toml` with `tomli`
2021-12-16 22:19:34 +03:00
Nikita Sobolev
b50a9077f8
Adds django@4.0 support ( #786 )
...
* Adds django@4.0 support
* Fixes CI
* Fixes CI
* Ignore new error for django4.0
* Fixes
2021-12-16 21:51:46 +03:00
sobolevn
e9b328a935
Updates deps, adds mypy@0.920 compat, adds dependabot
2021-12-16 13:11:06 +03:00
Nikita Sobolev
eb80b949af
Refs #774 ( #777 )
...
* Refs #774
* Update test_create.yml
2021-12-15 15:53:24 +03:00
Chris Beaven
1219d62b6a
Add Model._base_manager ( #776 )
2021-12-15 09:08:45 +03:00
Chris Beaven
daf6c659f0
Update autoreload to Django 3.2 ( #775 )
...
* Update autoreload stub to Django 3.2
* Fix some subclass return types
* types for watchmanreloader attributes
* Don't reference an redundant attribute in WatchmanReloader
2021-12-15 09:06:32 +03:00
w0rp
059471101c
Fix the get_field type for Pyright ( #773 )
...
This PR fixes the type of get_field so it won't report errors in
Pyright's strictest type checking mode.
2021-12-13 20:05:23 +03:00
Vadim Safonov
ccbbf86d0e
Update signature for Django 3.1 Paginator ( #770 )
2021-12-09 22:35:32 +03:00
Chris Beaven
69d4b1a86d
More accurate template.Parser parse_until type ( #769 )
2021-12-09 11:26:26 +03:00
Marti Raudsepp
6436a10d5a
Add more precise RunSQL, RunPython migration hints ( #768 )
2021-12-08 15:11:35 +03:00
Marti Raudsepp
79d34d6f46
Add ValidationError type hints ( #767 )
2021-12-08 15:09:20 +03:00
Kevin Marsh
e5361f1e04
Fix QuerySet.create and Manager.create annotation since it doesn't accept *args (only **kwargs) ( #762 )
2021-11-30 18:37:54 +03:00
Stanislav Mikhailov
593d04d6e9
Fixed the types in ManyToManyField according to their definition in Django. ( #758 )
2021-11-24 01:13:45 +03:00