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

Remove class Meta from Model and Form class stubs #2000

Merged
merged 24 commits into from
Apr 2, 2024

Conversation

jorenham
Copy link
Contributor

@jorenham jorenham commented Mar 11, 2024

This fixes several abstract models and model-forms with incorrect annotations for a non-existant Meta type, e.g.

In [1]: from django import forms

In [2]: forms.BaseForm.Meta
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
Cell In[2], line 1
----> 1 forms.BaseForm.Meta

AttributeError: type object 'BaseForm' has no attribute 'Meta'

Additionally, the django_stubs_ext.db.models.ModelMeta type alias was added, which can be used as a less-incorrect variant of django_stubs_ext.db.models.TypedModelMeta when annotating the Meta class attribute of a Model, e.g.:

class SupportsModelMetaAndSpam(typing.Protocol):
    Meta: type[django_stubs_ext.db.models.ModelMeta]
    spam: str

@jorenham
Copy link
Contributor Author

Congratz on the 2000th issue+PR btw 🎉

Copy link
Member

@sobolevn sobolevn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the whole reason for this annotation is that all BaseForm subclasses do have Meta attribute. Including user-defined classes.

@flaeppe do you agree with this change?

@flaeppe
Copy link
Member

flaeppe commented Mar 12, 2024

I think the whole reason for this annotation is that all BaseForm subclasses do have Meta attribute. Including user-defined classes.

@flaeppe do you agree with this change?

Yes, I do. But arguably incomplete, since class Meta exists on BaseModelForm and behaves the same way as for Model.Meta: it only exists for subclasses of BaseModelForm.

Ref: https://github.com/django/django/blob/80fe2f439102dc748ff8ddd661d94935915bd3e7/django/forms/models.py#L270-L277

In any case it should be removed from BaseForm.

@jorenham
Copy link
Contributor Author

There is actually a much larger issue with the way that Meta is currently typed:

from typing import Protocol

class SupportsMeta(Protocol):
    class Meta:
        ...

class MyModel:
    class Meta:
        verbose_name = 'my model'

obj_with_meta: SupportsMeta = MyModel()
"""
Pyright:

Expression of type "MyModel" cannot be assigned to declared type "SupportsMeta"
  "MyModel" is incompatible with protocol "SupportsMeta"
    "Meta" is an incompatible type
      "Untitled.MyModel.Meta" is incompatible with "Untitled.SupportsMeta.Meta"
      Type "type[Untitled.MyModel.Meta]" cannot be assigned to type "type[Untitled.SupportsMeta.Meta]"  (reportAssignmentType)
"""

Solving this appeared to be harder than expected, though... The best I could come up with was this:

from typing import Any, Protocol

class _MetaVerboseName(Protocol):
    verbose_name: str

class _MetaVerboseNamePlural(Protocol):
    verbose_name_plural: str

# ... [one protocol for each allowed Meta attribute]

# emulates type with >=1 of the allowed Meta class attributes
type AnyMeta = _MetaVerboseName | _MetaVerboseNamePlural


# must be made generic, otherwise the meta type won't be covariant
class SupportsMeta[M: AnyMeta](Protocol):
    Meta: type[M]

type SupportsAnyMeta = SupportsMeta[Any]


class MyModel:
    class Meta:
        verbose_name = 'my model'
        verbose_name_plural = 'our models'

obj_with_meta: SupportsAnyMeta = MyModel()

Even in pyright strict mode, this is valid.

@sobolevn
Copy link
Member

Yes, using a protocol is a good idea in this case! Thanks for working on this issue :)

@jorenham
Copy link
Contributor Author

@sobolevn Would you like me to introduce this fix in this PR, or keep it as-is and open up a new one for it?

@sobolevn
Copy link
Member

I think we can continue working here, but it is up to you: what feels easier.

@flaeppe
Copy link
Member

flaeppe commented Mar 12, 2024

In the README there's currently a different (but more relaxed?) approach mentioned for model Meta:

https://github.com/typeddjango/django-stubs/?tab=readme-ov-file#type-checking-of-model-meta-attributes

Also, not sure how much it could impact. Not too familiar with nested class definitions and how type checkers like them. But I think Meta could be declared a @property i.e. read only attribute on the protocol?

Quite ingenious idea with the union approach to get rid of the issue supporting partial protocols (wanted to but couldn't find any issue link right now)

@jorenham
Copy link
Contributor Author

@flaeppe the Protocol solution I proposed would make the TypedModelMeta redundant

@flaeppe
Copy link
Member

flaeppe commented Mar 12, 2024

Yes, I understood that. Just wanted to mention it in case you hadn't seen it.

@jorenham
Copy link
Contributor Author

I think we can continue working here, but it is up to you: what feels easier.

I'll make the 2000th PR a big one then :)

@jorenham
Copy link
Contributor Author

Yes, I understood that. Just wanted to mention it in case you hadn't seen it.

Yea thanks for that; it saves me from having to figure out the attribute annotations myself :)

@jorenham
Copy link
Contributor Author

@sobolevn I don't see pyright allows int <: str in this case. Adding ClassVar everywhere doesn't help either. Perhaps a bug?

@jorenham
Copy link
Contributor Author

jorenham commented Mar 12, 2024

@sobolevn Ah I understand now. If you remove the correct verbose_name: str, leaving only the verbose_name_plural: int, it'll give an error as expected.

Because of the union; pyright only requires one of the attributes to be correct. I.e. pyright uses short-circuit evaluation on the union. Unfortunately, that's technically correct: Since a hypothetical subtype of _MetaVerboseName could have a verbose_name_plural: int.

I can think of only way around this: Make each individual protocols @final, and additionally create separate @final Protocols for each of the possible combinations.
However, since we have 24 attributes, that would require math.factorial(24) == 620_448_401_733_239_439_360_000 protocols...

@jorenham
Copy link
Contributor Author

@intgr I don't think it's a good idea to require changes to the implementation for the purposes of typing, of which TypedModelMeta is an example.

I tend to agree with your "all or nothing" mentality regarding typing. But since "all" is practically impossible here, we should look at the remaining $1 + 0.99 \approx 2$ options:

  1. Remove Meta altogether (no, not that one; please calm down mr. Zuckerberg...)
  2. Scrape Django projects on Github to find the 99% most frequently used Meta attribute combinations, and create union'ed Protocols for those.

My preference would be to go for option 1 first, and place option 1.99 under the "future work" section.

@jorenham
Copy link
Contributor Author

@jorenham do you want to contribute a pyright CI job? I can be just hidden under || true or allow-errors: true or whatever.

Yea sure, I'll have a look in the coming days

@intgr intgr added the pyright Related to pyright type checker label Mar 22, 2024
@intgr
Copy link
Collaborator

intgr commented Mar 22, 2024

Remove Meta altogether

Indeed. But if you want to propose that, please open a separate PR. As nice as number 2000 is, most of the discussion here would be irrelevant for that proposal.

Model.Meta

As we've established here, having Meta there does nothing for typechecking inner attributes of Meta.

And it seems Model metaclass magic even tries to hide the Meta attribute of models. For example, despite Permission class having explicit class Meta:, it's not actually accessible "from the outside":

>>> from django.contrib.auth.models import Permission
>>> Permission.Meta
AttributeError: type object 'Permission' has no attribute 'Meta'
>>> Permission().Meta
AttributeError: 'Permission' object has no attribute 'Meta'

In almost all situations, the "correct" approach would be to access Model._meta anyway, not .Meta. (Despite being named with underscore, _meta is stable public API in Django).

So 👍 from me. Does anyone see any downsides or issues that could cause?

BaseForm.Meta

I haven't used Django forms for years, so I don't have an informed position on this. Is class Meta required or optional in forms? Is there an equivalent of _meta in form classes? Is the form.Meta attribute accessible from the outside?

@intgr
Copy link
Collaborator

intgr commented Mar 22, 2024

Scrape Django projects on Github to find the 99% most frequently used Meta attribute combinations, and create union'ed Protocols for those.

👎 I don't think what will work. We don't want to flag the remaining 1% as errors if they're actually correct. And if we add a "loose protocol" to the union for those use cases, then it also spoils typechecking for the remaining 99%. Besides that, it would be an extremely ugly hack.

@sobolevn
Copy link
Member

sobolevn commented Mar 22, 2024

Yes, I also agree. Hacking something should be justified: right now using Protocols here does not seem like a proper solution. We need something else.

@jorenham
Copy link
Contributor Author

@intgr model forms also cast the same black magic spell as models on Meta to turn it into _meta. Here's the incantation: https://github.com/django/django/blob/5.0.3/django/forms/models.py#L277

@jorenham
Copy link
Contributor Author

But you make fair points @intgr and @sobolevn ; I'll remove the messy Meta magic.

But for the sake of backwards compatibility; I assume that we're gonna want to keep TypedModelMeta for now, right? And perhaps mark it as deprecated, e.g. with @typing_extensions.deprecated?

@intgr intgr added the blocked Blocked by some other PR, discussion or third party dependency. label Mar 22, 2024
Copy link
Collaborator

@intgr intgr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few suggestions.

I didn't notice before that you had updated this. I was expecting a separate PR ("if you want to propose that, please open a separate PR"). But no big deal; since you already pushed here, no need for additional bureaucracy.

ext/django_stubs_ext/db/models/__init__.py Outdated Show resolved Hide resolved
scripts/stubtest/allowlist_todo.txt Outdated Show resolved Hide resolved
django-stubs/contrib/flatpages/forms.pyi Outdated Show resolved Hide resolved
@intgr intgr changed the title Fix annotations of Meta types within models and forms Remove class Meta from Form and Model class stubs Apr 2, 2024
@intgr intgr self-assigned this Apr 2, 2024
@intgr
Copy link
Collaborator

intgr commented Apr 2, 2024

I assume that we're gonna want to keep TypedModelMeta for now, right?

Yes, I haven't seen any reasons to remove it.

Co-authored-by: Marti Raudsepp <marti@juffo.org>
@jorenham
Copy link
Contributor Author

jorenham commented Apr 2, 2024

A few suggestions.

I didn't notice before that you had updated this. I was expecting a separate PR ("if you want to propose that, please open a separate PR"). But no big deal; since you already pushed here, no need for additional bureaucracy.

Oh woops I didn't notice. But either way, it would've been sad if the 2000th PR wouldn't have made it :)

Copy link
Collaborator

@intgr intgr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thanks!

@intgr intgr changed the title Remove class Meta from Form and Model class stubs Remove class Meta from Model and Form class stubs Apr 2, 2024
@intgr intgr merged commit 1f33a82 into typeddjango:master Apr 2, 2024
40 checks passed
jooola referenced this pull request in libretime/libretime May 5, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [django-stubs](https://github.com/typeddjango/django-stubs)
([changelog](https://github.com/typeddjango/django-stubs/releases)) |
`>=1.14.0,<5` -> `>=1.14.0,<6` |
[![age](https://developer.mend.io/api/mc/badges/age/pypi/django-stubs/5.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/pypi/django-stubs/5.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/pypi/django-stubs/4.2.7/5.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/django-stubs/4.2.7/5.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>typeddjango/django-stubs (django-stubs)</summary>

###
[`v5.0.0`](https://github.com/typeddjango/django-stubs/releases/tag/5.0.0)

[Compare
Source](https://github.com/typeddjango/django-stubs/compare/4.2.7...5.0.0)

#### Announcements

- `QuerySet` class no longer derives from `Collection`. If you run into
errors like `incompatible type "_QuerySet[User, User]"; expected
"Collection[User]"`, [please read this
announcement](https://github.com/typeddjango/django-stubs/discussions/2095).

#### Headline changes

- Remove incorrect `Collection` base class and `__contains__` method
from `QuerySet` by [@&#8203;fidoriel](https://github.com/fidoriel) in
[https://github.com/typeddjango/django-stubs/pull/1925](https://github.com/typeddjango/django-stubs/pull/1925)
- Pyright joins the workflow in an advisory capacity by
[@&#8203;jorenham](https://github.com/jorenham) in
[https://github.com/typeddjango/django-stubs/pull/2019](https://github.com/typeddjango/django-stubs/pull/2019)
- feat: Allow setting django_settings_module from env by
[@&#8203;armanckeser](https://github.com/armanckeser) in
[https://github.com/typeddjango/django-stubs/pull/2021](https://github.com/typeddjango/django-stubs/pull/2021)
- Add `ManyRelatedManager.through` attribute and generic type parameter
by [@&#8203;flaeppe](https://github.com/flaeppe) in
[https://github.com/typeddjango/django-stubs/pull/2026](https://github.com/typeddjango/django-stubs/pull/2026)

#### What's Changed

- Make `StrPromise` not inherit from `Sequence[str]` by
[@&#8203;intgr](https://github.com/intgr) in
[https://github.com/typeddjango/django-stubs/pull/1841](https://github.com/typeddjango/django-stubs/pull/1841)
- Update and prepare for Django 5.0 by
[@&#8203;intgr](https://github.com/intgr) in
[https://github.com/typeddjango/django-stubs/pull/1859](https://github.com/typeddjango/django-stubs/pull/1859)
- Ensure mypy plugin processes inherited many to many fields by
[@&#8203;flaeppe](https://github.com/flaeppe) in
[https://github.com/typeddjango/django-stubs/pull/1864](https://github.com/typeddjango/django-stubs/pull/1864)
- Include ModelBase subclasses in plugin base class hook condition by
[@&#8203;flaeppe](https://github.com/flaeppe) in
[https://github.com/typeddjango/django-stubs/pull/1863](https://github.com/typeddjango/django-stubs/pull/1863)
- \[5.0] Added many new a-prefixed asynchronous methods by
[@&#8203;bigfootjon](https://github.com/bigfootjon) in
[https://github.com/typeddjango/django-stubs/pull/1741](https://github.com/typeddjango/django-stubs/pull/1741)
- Remove section regarding custom queryset methods from README by
[@&#8203;flaeppe](https://github.com/flaeppe) in
[https://github.com/typeddjango/django-stubs/pull/1865](https://github.com/typeddjango/django-stubs/pull/1865)
- Fix type of `AppConfig.models_module` by
[@&#8203;Viicos](https://github.com/Viicos) in
[https://github.com/typeddjango/django-stubs/pull/1866](https://github.com/typeddjango/django-stubs/pull/1866)
- Allow `None` in settings `MIGRATION_MODULES` dict values by
[@&#8203;asottile](https://github.com/asottile) in
[https://github.com/typeddjango/django-stubs/pull/1871](https://github.com/typeddjango/django-stubs/pull/1871)
- Add type hints for `JSONField.from_db_value` by
[@&#8203;flaeppe](https://github.com/flaeppe) in
[https://github.com/typeddjango/django-stubs/pull/1879](https://github.com/typeddjango/django-stubs/pull/1879)
- Fix/pyright unknown by
[@&#8203;dephiros](https://github.com/dephiros) in
[https://github.com/typeddjango/django-stubs/pull/1873](https://github.com/typeddjango/django-stubs/pull/1873)
- Fix type hints of `converters` in `urls.resolvers` by
[@&#8203;Viicos](https://github.com/Viicos) in
[https://github.com/typeddjango/django-stubs/pull/1892](https://github.com/typeddjango/django-stubs/pull/1892)
- Update mypy to 1.8.0 by
[@&#8203;sobolevn](https://github.com/sobolevn) in
[https://github.com/typeddjango/django-stubs/pull/1885](https://github.com/typeddjango/django-stubs/pull/1885)
- Add `@type_check_only` to all Protocols and known stubs-only classes
by [@&#8203;intgr](https://github.com/intgr) in
[https://github.com/typeddjango/django-stubs/pull/1894](https://github.com/typeddjango/django-stubs/pull/1894)
- Fix types for UniqueConstraint instantiation by
[@&#8203;flaeppe](https://github.com/flaeppe) in
[https://github.com/typeddjango/django-stubs/pull/1880](https://github.com/typeddjango/django-stubs/pull/1880)
- Add `ModuleType` as a possible type to `URLResolver.urlconf_name` by
[@&#8203;Viicos](https://github.com/Viicos) in
[https://github.com/typeddjango/django-stubs/pull/1891](https://github.com/typeddjango/django-stubs/pull/1891)
- Fix type hint of `URLPattern.default_args` by
[@&#8203;Viicos](https://github.com/Viicos) in
[https://github.com/typeddjango/django-stubs/pull/1895](https://github.com/typeddjango/django-stubs/pull/1895)
- Update ruff and silence `PYI046` by
[@&#8203;sobolevn](https://github.com/sobolevn) in
[https://github.com/typeddjango/django-stubs/pull/1907](https://github.com/typeddjango/django-stubs/pull/1907)
- Use PEP 570 syntax by [@&#8203;Viicos](https://github.com/Viicos) in
[https://github.com/typeddjango/django-stubs/pull/1908](https://github.com/typeddjango/django-stubs/pull/1908)
- Fix readme settings example by
[@&#8203;Viicos](https://github.com/Viicos) in
[https://github.com/typeddjango/django-stubs/pull/1910](https://github.com/typeddjango/django-stubs/pull/1910)
- Fix type hint of `EmailBackend.ssl_keyfile` and
`EmailBackend.ssl_certfile` by
[@&#8203;Viicos](https://github.com/Viicos) in
[https://github.com/typeddjango/django-stubs/pull/1911](https://github.com/typeddjango/django-stubs/pull/1911)
- Add type of `django.VERSION` by
[@&#8203;Viicos](https://github.com/Viicos) in
[https://github.com/typeddjango/django-stubs/pull/1916](https://github.com/typeddjango/django-stubs/pull/1916)
- Added `CommandParser` to `commands.__init__` by
[@&#8203;jamesbraza](https://github.com/jamesbraza) in
[https://github.com/typeddjango/django-stubs/pull/1927](https://github.com/typeddjango/django-stubs/pull/1927)
- \[5.0] add `assume_scheme` to forms.URLField by
[@&#8203;asottile](https://github.com/asottile) in
[https://github.com/typeddjango/django-stubs/pull/1929](https://github.com/typeddjango/django-stubs/pull/1929)
- Fix return type of `BaseModelAdmin.formfield_for_dbfield` by
[@&#8203;Viicos](https://github.com/Viicos) in
[https://github.com/typeddjango/django-stubs/pull/1934](https://github.com/typeddjango/django-stubs/pull/1934)
- Revert `pre-commit==3.6.1` by
[@&#8203;sobolevn](https://github.com/sobolevn) in
[https://github.com/typeddjango/django-stubs/pull/1936](https://github.com/typeddjango/django-stubs/pull/1936)
- Fix type hint of `Response.set_cookie.max_age` by
[@&#8203;Viicos](https://github.com/Viicos) in
[https://github.com/typeddjango/django-stubs/pull/1941](https://github.com/typeddjango/django-stubs/pull/1941)
- 5.0: Add ChoicesType by [@&#8203;q0w](https://github.com/q0w) in
[https://github.com/typeddjango/django-stubs/pull/1942](https://github.com/typeddjango/django-stubs/pull/1942)
- Add through_defaults for RelatedManager methods by
[@&#8203;mfosterw](https://github.com/mfosterw) in
[https://github.com/typeddjango/django-stubs/pull/1943](https://github.com/typeddjango/django-stubs/pull/1943)
- Update type hints of `core.signing` by
[@&#8203;Viicos](https://github.com/Viicos) in
[https://github.com/typeddjango/django-stubs/pull/1945](https://github.com/typeddjango/django-stubs/pull/1945)
- \[5.0] Update `core.validators` by
[@&#8203;Viicos](https://github.com/Viicos) in
[https://github.com/typeddjango/django-stubs/pull/1947](https://github.com/typeddjango/django-stubs/pull/1947)
- \[5.0] Update `core.paginator` by
[@&#8203;Viicos](https://github.com/Viicos) in
[https://github.com/typeddjango/django-stubs/pull/1946](https://github.com/typeddjango/django-stubs/pull/1946)
- Generic `forms.ModelChoiceField` by
[@&#8203;UnknownPlatypus](https://github.com/UnknownPlatypus) in
[https://github.com/typeddjango/django-stubs/pull/1889](https://github.com/typeddjango/django-stubs/pull/1889)
- Support processing of other relations and fields when one is broken by
[@&#8203;flaeppe](https://github.com/flaeppe) in
[https://github.com/typeddjango/django-stubs/pull/1877](https://github.com/typeddjango/django-stubs/pull/1877)
- Allowing `set` in `model_to_dict`'s `exclude` by
[@&#8203;jamesbraza](https://github.com/jamesbraza) in
[https://github.com/typeddjango/django-stubs/pull/1952](https://github.com/typeddjango/django-stubs/pull/1952)
- \[5.0] Add django.db.models.GeneratedField by
[@&#8203;palfrey](https://github.com/palfrey) in
[https://github.com/typeddjango/django-stubs/pull/1944](https://github.com/typeddjango/django-stubs/pull/1944)
- Fix type hint of `BaseEngine.template_dirs` by
[@&#8203;Viicos](https://github.com/Viicos) in
[https://github.com/typeddjango/django-stubs/pull/1954](https://github.com/typeddjango/django-stubs/pull/1954)
- Update type hints of contrib.auth.hashers by
[@&#8203;yhay81](https://github.com/yhay81) in
[https://github.com/typeddjango/django-stubs/pull/1955](https://github.com/typeddjango/django-stubs/pull/1955)
- deps: Upgrade pre-commit for newer versions of python by
[@&#8203;delfick](https://github.com/delfick) in
[https://github.com/typeddjango/django-stubs/pull/1961](https://github.com/typeddjango/django-stubs/pull/1961)
- 5.0: Add auth.middleware.auser by
[@&#8203;q0w](https://github.com/q0w) in
[https://github.com/typeddjango/django-stubs/pull/1966](https://github.com/typeddjango/django-stubs/pull/1966)
- 5.0: Add ModelAdmin.show_facets by
[@&#8203;q0w](https://github.com/q0w) in
[https://github.com/typeddjango/django-stubs/pull/1967](https://github.com/typeddjango/django-stubs/pull/1967)
- ruff: Fix config warnings by [@&#8203;q0w](https://github.com/q0w)
in
[https://github.com/typeddjango/django-stubs/pull/1964](https://github.com/typeddjango/django-stubs/pull/1964)
- 5.0: Add BaseConstraint.violation_error_code by
[@&#8203;q0w](https://github.com/q0w) in
[https://github.com/typeddjango/django-stubs/pull/1969](https://github.com/typeddjango/django-stubs/pull/1969)
- 5.0: Add Signal.asend and Signal.asend_robust by
[@&#8203;q0w](https://github.com/q0w) in
[https://github.com/typeddjango/django-stubs/pull/1965](https://github.com/typeddjango/django-stubs/pull/1965)
- 5.0: Add QuerySet.(a)update_or_create new create_defaults arg by
[@&#8203;q0w](https://github.com/q0w) in
[https://github.com/typeddjango/django-stubs/pull/1970](https://github.com/typeddjango/django-stubs/pull/1970)
- 5.0: Add AdminSite.get_log_entries by
[@&#8203;q0w](https://github.com/q0w) in
[https://github.com/typeddjango/django-stubs/pull/1963](https://github.com/typeddjango/django-stubs/pull/1963)
- 5.0: Add gis ClosestPoint by [@&#8203;q0w](https://github.com/q0w)
in
[https://github.com/typeddjango/django-stubs/pull/1968](https://github.com/typeddjango/django-stubs/pull/1968)
- 5.0: Rename save_existing arg instance to obj by
[@&#8203;q0w](https://github.com/q0w) in
[https://github.com/typeddjango/django-stubs/pull/1971](https://github.com/typeddjango/django-stubs/pull/1971)
- 5.0: Remove admin.helpers.checkbox by
[@&#8203;q0w](https://github.com/q0w) in
[https://github.com/typeddjango/django-stubs/pull/1972](https://github.com/typeddjango/django-stubs/pull/1972)
- 5.0: Change annotation_select_mask from set\[str] to list\[str] by
[@&#8203;q0w](https://github.com/q0w) in
[https://github.com/typeddjango/django-stubs/pull/1973](https://github.com/typeddjango/django-stubs/pull/1973)
- fixup: Pass violation_error_code to init by
[@&#8203;q0w](https://github.com/q0w) in
[https://github.com/typeddjango/django-stubs/pull/1975](https://github.com/typeddjango/django-stubs/pull/1975)
- Avoid returning None from get_field_related_model_cls by
[@&#8203;SingingTree](https://github.com/SingingTree) in
[https://github.com/typeddjango/django-stubs/pull/1956](https://github.com/typeddjango/django-stubs/pull/1956)
- 5.0: Pass positional args name and violation_error_message to
BaseConstraint by [@&#8203;q0w](https://github.com/q0w) in
[https://github.com/typeddjango/django-stubs/pull/1974](https://github.com/typeddjango/django-stubs/pull/1974)
- 5.0: Remove pytz support by [@&#8203;q0w](https://github.com/q0w) in
[https://github.com/typeddjango/django-stubs/pull/1980](https://github.com/typeddjango/django-stubs/pull/1980)
- 5.0: Remove global setting USE_L10N by
[@&#8203;q0w](https://github.com/q0w) in
[https://github.com/typeddjango/django-stubs/pull/1979](https://github.com/typeddjango/django-stubs/pull/1979)
- 5.0: Remove OSMGeoAdmin, GeoModelAdmin by
[@&#8203;q0w](https://github.com/q0w) in
[https://github.com/typeddjango/django-stubs/pull/1981](https://github.com/typeddjango/django-stubs/pull/1981)
- 5.0: Remove extra_tests arg for DiscoverRunner.build_suite/run_tests
by [@&#8203;q0w](https://github.com/q0w) in
[https://github.com/typeddjango/django-stubs/pull/1978](https://github.com/typeddjango/django-stubs/pull/1978)
- 5.0: Remove django.utils baseconv and datetime_safe modules by
[@&#8203;q0w](https://github.com/q0w) in
[https://github.com/typeddjango/django-stubs/pull/1977](https://github.com/typeddjango/django-stubs/pull/1977)
- 5.0: Add request arg to ModelAdmin.lookup_allowed by
[@&#8203;q0w](https://github.com/q0w) in
[https://github.com/typeddjango/django-stubs/pull/1976](https://github.com/typeddjango/django-stubs/pull/1976)
- Add URL converter protocol type by
[@&#8203;adamchainz](https://github.com/adamchainz) in
[https://github.com/typeddjango/django-stubs/pull/1984](https://github.com/typeddjango/django-stubs/pull/1984)
- Fix type annotation for RegisterLookupMixin.class_lookups by
[@&#8203;avoronov-box](https://github.com/avoronov-box) in
[https://github.com/typeddjango/django-stubs/pull/1962](https://github.com/typeddjango/django-stubs/pull/1962)
- Update django to 5.0.3 by
[@&#8203;sobolevn](https://github.com/sobolevn) in
[https://github.com/typeddjango/django-stubs/pull/1990](https://github.com/typeddjango/django-stubs/pull/1990)
- Remove some deprecated Django 3.x APIs by
[@&#8203;sobolevn](https://github.com/sobolevn) in
[https://github.com/typeddjango/django-stubs/pull/1991](https://github.com/typeddjango/django-stubs/pull/1991)
- Fix BaseModelAdmin.view_on_site annotation by
[@&#8203;cuu508](https://github.com/cuu508) in
[https://github.com/typeddjango/django-stubs/pull/1993](https://github.com/typeddjango/django-stubs/pull/1993)
- Allow immutable `extra_context` on `TemplateView`s by
[@&#8203;samueljsb](https://github.com/samueljsb) in
[https://github.com/typeddjango/django-stubs/pull/1994](https://github.com/typeddjango/django-stubs/pull/1994)
- Add BoundField.**html**() by
[@&#8203;pelme](https://github.com/pelme) in
[https://github.com/typeddjango/django-stubs/pull/1999](https://github.com/typeddjango/django-stubs/pull/1999)
- Allow timedelta type for session.set_expiry() argument by
[@&#8203;mlazar-endear](https://github.com/mlazar-endear) in
[https://github.com/typeddjango/django-stubs/pull/2001](https://github.com/typeddjango/django-stubs/pull/2001)
- Bump `pytest-mypy-plugins` to 3.1.1 by
[@&#8203;sobolevn](https://github.com/sobolevn) in
[https://github.com/typeddjango/django-stubs/pull/2003](https://github.com/typeddjango/django-stubs/pull/2003)
- Update mypy, add a bit more metadata by
[@&#8203;sobolevn](https://github.com/sobolevn) in
[https://github.com/typeddjango/django-stubs/pull/1997](https://github.com/typeddjango/django-stubs/pull/1997)
- 5.0: Update `django.contrib.auth` by
[@&#8203;ngnpope](https://github.com/ngnpope) in
[https://github.com/typeddjango/django-stubs/pull/2009](https://github.com/typeddjango/django-stubs/pull/2009)
- 5.0: Update `django.conf` by
[@&#8203;ngnpope](https://github.com/ngnpope) in
[https://github.com/typeddjango/django-stubs/pull/2008](https://github.com/typeddjango/django-stubs/pull/2008)
- 5.0: Update `django.views` by
[@&#8203;ngnpope](https://github.com/ngnpope) in
[https://github.com/typeddjango/django-stubs/pull/2007](https://github.com/typeddjango/django-stubs/pull/2007)
- 5.0: Update `django.test` by
[@&#8203;ngnpope](https://github.com/ngnpope) in
[https://github.com/typeddjango/django-stubs/pull/2005](https://github.com/typeddjango/django-stubs/pull/2005)
- 5.0: Update `django.utils` by
[@&#8203;ngnpope](https://github.com/ngnpope) in
[https://github.com/typeddjango/django-stubs/pull/2006](https://github.com/typeddjango/django-stubs/pull/2006)
- Specify d.c.serializers.base.DeserializedObject.object type by
[@&#8203;j00bar](https://github.com/j00bar) in
[https://github.com/typeddjango/django-stubs/pull/2010](https://github.com/typeddjango/django-stubs/pull/2010)
- Clean the cache on each run of `stubtest` by
[@&#8203;sobolevn](https://github.com/sobolevn) in
[https://github.com/typeddjango/django-stubs/pull/2015](https://github.com/typeddjango/django-stubs/pull/2015)
- Keep abstract Django models internally in the plugin by
[@&#8203;flaeppe](https://github.com/flaeppe) in
[https://github.com/typeddjango/django-stubs/pull/2017](https://github.com/typeddjango/django-stubs/pull/2017)
- Add GitHub actions release workflow by
[@&#8203;flaeppe](https://github.com/flaeppe) in
[https://github.com/typeddjango/django-stubs/pull/1950](https://github.com/typeddjango/django-stubs/pull/1950)
- Adding missing `Q` methods: `check()`, `flatten()` by
[@&#8203;Alexerson](https://github.com/Alexerson) in
[https://github.com/typeddjango/django-stubs/pull/1899](https://github.com/typeddjango/django-stubs/pull/1899)
- Improve types in `utils.termcolors` by
[@&#8203;Viicos](https://github.com/Viicos) in
[https://github.com/typeddjango/django-stubs/pull/1901](https://github.com/typeddjango/django-stubs/pull/1901)
- Set the calculated metaclass when creating type info in the plugin by
[@&#8203;flaeppe](https://github.com/flaeppe) in
[https://github.com/typeddjango/django-stubs/pull/2025](https://github.com/typeddjango/django-stubs/pull/2025)
- Do not annotate PRs with pyright by
[@&#8203;sobolevn](https://github.com/sobolevn) in
[https://github.com/typeddjango/django-stubs/pull/2023](https://github.com/typeddjango/django-stubs/pull/2023)
- Use `PRI_MYPY` in `get_additional_deps` hook by
[@&#8203;sobolevn](https://github.com/sobolevn) in
[https://github.com/typeddjango/django-stubs/pull/2024](https://github.com/typeddjango/django-stubs/pull/2024)
- Update `_default_manager` and `_base_manager` to be `Manager` by
[@&#8203;flaeppe](https://github.com/flaeppe) in
[https://github.com/typeddjango/django-stubs/pull/2022](https://github.com/typeddjango/django-stubs/pull/2022)
- Determine the type of queryset methods on unions by
[@&#8203;delfick](https://github.com/delfick) in
[https://github.com/typeddjango/django-stubs/pull/2027](https://github.com/typeddjango/django-stubs/pull/2027)
- Add first stub for get_model_admin by
[@&#8203;nebiyuelias1](https://github.com/nebiyuelias1) in
[https://github.com/typeddjango/django-stubs/pull/2029](https://github.com/typeddjango/django-stubs/pull/2029)
- 5.0: Update `django.contrib.admin` by
[@&#8203;ngnpope](https://github.com/ngnpope) in
[https://github.com/typeddjango/django-stubs/pull/2004](https://github.com/typeddjango/django-stubs/pull/2004)
- \[5.0] Update `core.files` by
[@&#8203;Viicos](https://github.com/Viicos) in
[https://github.com/typeddjango/django-stubs/pull/1949](https://github.com/typeddjango/django-stubs/pull/1949)
- \[5.0] Update `core.cache.backends`, add `RedisCache` and related
classes by [@&#8203;Viicos](https://github.com/Viicos) in
[https://github.com/typeddjango/django-stubs/pull/1948](https://github.com/typeddjango/django-stubs/pull/1948)
- Fix `AsyncClient.defaults` attribute typing by
[@&#8203;flaeppe](https://github.com/flaeppe) in
[https://github.com/typeddjango/django-stubs/pull/1878](https://github.com/typeddjango/django-stubs/pull/1878)
- Relax type for `fields` argument of `Model.refresh_from_db()` by
[@&#8203;mthuurne](https://github.com/mthuurne) in
[https://github.com/typeddjango/django-stubs/pull/2035](https://github.com/typeddjango/django-stubs/pull/2035)
- \[5.0] Add missing stubs for geos by
[@&#8203;nebiyuelias1](https://github.com/nebiyuelias1) in
[https://github.com/typeddjango/django-stubs/pull/2034](https://github.com/typeddjango/django-stubs/pull/2034)
- Make `AdminSite.get_model_admin` generic by
[@&#8203;Viicos](https://github.com/Viicos) in
[https://github.com/typeddjango/django-stubs/pull/2038](https://github.com/typeddjango/django-stubs/pull/2038)
- \[5.0] Add `db_default=` parameter to models `Field` classes by
[@&#8203;Skorpyon](https://github.com/Skorpyon) in
[https://github.com/typeddjango/django-stubs/pull/1876](https://github.com/typeddjango/django-stubs/pull/1876)
- Remove `class Meta` from `Model` and `Form` class stubs by
[@&#8203;jorenham](https://github.com/jorenham) in
[https://github.com/typeddjango/django-stubs/pull/2000](https://github.com/typeddjango/django-stubs/pull/2000)
- Add datetime.timedelta as valid type for
HttpRequest.get_signed_cookie() max_age argument. by
[@&#8203;pelme](https://github.com/pelme) in
[https://github.com/typeddjango/django-stubs/pull/2045](https://github.com/typeddjango/django-stubs/pull/2045)
- CI: Update Django 4.2 version used for test suite by
[@&#8203;intgr](https://github.com/intgr) in
[https://github.com/typeddjango/django-stubs/pull/2049](https://github.com/typeddjango/django-stubs/pull/2049)
- Refine return type for `ManyToOneRel.get_accessor_name()` by
[@&#8203;mthuurne](https://github.com/mthuurne) in
[https://github.com/typeddjango/django-stubs/pull/2052](https://github.com/typeddjango/django-stubs/pull/2052)
- Add `DeferredAttribute.__get__()` by
[@&#8203;mthuurne](https://github.com/mthuurne) in
[https://github.com/typeddjango/django-stubs/pull/2050](https://github.com/typeddjango/django-stubs/pull/2050)
- Add missing methods and superclass to `FieldFile` by
[@&#8203;mthuurne](https://github.com/mthuurne) in
[https://github.com/typeddjango/django-stubs/pull/2051](https://github.com/typeddjango/django-stubs/pull/2051)
- Add `db_comment=` parameter to Postgres and GIS model fields by
[@&#8203;saJaeHyukc](https://github.com/saJaeHyukc) in
[https://github.com/typeddjango/django-stubs/pull/2054](https://github.com/typeddjango/django-stubs/pull/2054)
- Correct type for `db.models.sql.query.Query.join()` argument by
[@&#8203;mthuurne](https://github.com/mthuurne) in
[https://github.com/typeddjango/django-stubs/pull/2055](https://github.com/typeddjango/django-stubs/pull/2055)
- 5.0: Update `django.db.backends.oracle.base` by
[@&#8203;sudosubin](https://github.com/sudosubin) in
[https://github.com/typeddjango/django-stubs/pull/2057](https://github.com/typeddjango/django-stubs/pull/2057)
- 5.0: Update `django.test.client` by
[@&#8203;sudosubin](https://github.com/sudosubin) in
[https://github.com/typeddjango/django-stubs/pull/2059](https://github.com/typeddjango/django-stubs/pull/2059)
- 5.0: Update `django.test.html` by
[@&#8203;sudosubin](https://github.com/sudosubin) in
[https://github.com/typeddjango/django-stubs/pull/2060](https://github.com/typeddjango/django-stubs/pull/2060)
- 5.0: Update `django.test.runner` by
[@&#8203;sudosubin](https://github.com/sudosubin) in
[https://github.com/typeddjango/django-stubs/pull/2061](https://github.com/typeddjango/django-stubs/pull/2061)
- 5.0: Update `django.template`, `django.templatetags` by
[@&#8203;sudosubin](https://github.com/sudosubin) in
[https://github.com/typeddjango/django-stubs/pull/2063](https://github.com/typeddjango/django-stubs/pull/2063)
- 5.0: Update `django.test.testcases` by
[@&#8203;sudosubin](https://github.com/sudosubin) in
[https://github.com/typeddjango/django-stubs/pull/2062](https://github.com/typeddjango/django-stubs/pull/2062)
- 5.0: Update `django.http` by
[@&#8203;sudosubin](https://github.com/sudosubin) in
[https://github.com/typeddjango/django-stubs/pull/2064](https://github.com/typeddjango/django-stubs/pull/2064)
- 5.0: Update `django.core.management` by
[@&#8203;sudosubin](https://github.com/sudosubin) in
[https://github.com/typeddjango/django-stubs/pull/2067](https://github.com/typeddjango/django-stubs/pull/2067)
- 5.0: Update `django.core.handlers` by
[@&#8203;sudosubin](https://github.com/sudosubin) in
[https://github.com/typeddjango/django-stubs/pull/2066](https://github.com/typeddjango/django-stubs/pull/2066)
- 5.0: Update `django.contrib.sessions.serializers`,
`django.core.serializers` by
[@&#8203;sudosubin](https://github.com/sudosubin) in
[https://github.com/typeddjango/django-stubs/pull/2068](https://github.com/typeddjango/django-stubs/pull/2068)
- Update django app related types by
[@&#8203;sudosubin](https://github.com/sudosubin) in
[https://github.com/typeddjango/django-stubs/pull/2071](https://github.com/typeddjango/django-stubs/pull/2071)
- Add a `returncode` attribute to `CommandError` by
[@&#8203;flaeppe](https://github.com/flaeppe) in
[https://github.com/typeddjango/django-stubs/pull/2072](https://github.com/typeddjango/django-stubs/pull/2072)
- Disable mypy `ignore_missing_imports` option by
[@&#8203;sudosubin](https://github.com/sudosubin) in
[https://github.com/typeddjango/django-stubs/pull/2058](https://github.com/typeddjango/django-stubs/pull/2058)
- fix typing for URL validator.**call** by
[@&#8203;asottile](https://github.com/asottile) in
[https://github.com/typeddjango/django-stubs/pull/2074](https://github.com/typeddjango/django-stubs/pull/2074)
- Use field generic types for descriptors by
[@&#8203;md384](https://github.com/md384) in
[https://github.com/typeddjango/django-stubs/pull/2048](https://github.com/typeddjango/django-stubs/pull/2048)
- 5.0: Update `django.core.servers.basehttp` by
[@&#8203;sudosubin](https://github.com/sudosubin) in
[https://github.com/typeddjango/django-stubs/pull/2070](https://github.com/typeddjango/django-stubs/pull/2070)
- Update `django.template.base.Template.render()` argument type by
[@&#8203;Majsvaffla](https://github.com/Majsvaffla) in
[https://github.com/typeddjango/django-stubs/pull/1160](https://github.com/typeddjango/django-stubs/pull/1160)
- 5.0: Add `django.utils.choices` by
[@&#8203;sudosubin](https://github.com/sudosubin) in
[https://github.com/typeddjango/django-stubs/pull/2075](https://github.com/typeddjango/django-stubs/pull/2075)
- 5.0: Update `django.contrib.sitemaps`, `django.contrib.staticfiles` by
[@&#8203;sudosubin](https://github.com/sudosubin) in
[https://github.com/typeddjango/django-stubs/pull/2076](https://github.com/typeddjango/django-stubs/pull/2076)
- Update pyright report options (`reportMissingTypeArgument`,
`reportPrivateUsage`) by
[@&#8203;sudosubin](https://github.com/sudosubin) in
[https://github.com/typeddjango/django-stubs/pull/2077](https://github.com/typeddjango/django-stubs/pull/2077)
- 5.0: Update `django.contrib.postgres` by
[@&#8203;sudosubin](https://github.com/sudosubin) in
[https://github.com/typeddjango/django-stubs/pull/2078](https://github.com/typeddjango/django-stubs/pull/2078)
- Add `path` signature for async views by
[@&#8203;jlost](https://github.com/jlost) in
[https://github.com/typeddjango/django-stubs/pull/2085](https://github.com/typeddjango/django-stubs/pull/2085)
- Remove incorrect `Reversible` base class from `QuerySet` by
[@&#8203;intgr](https://github.com/intgr) in
[https://github.com/typeddjango/django-stubs/pull/2094](https://github.com/typeddjango/django-stubs/pull/2094)
- Version 5.0.0 release (django-stubs, django-stubs-ext) by
[@&#8203;flaeppe](https://github.com/flaeppe) in
[https://github.com/typeddjango/django-stubs/pull/2087](https://github.com/typeddjango/django-stubs/pull/2087)

#### New Contributors

- [@&#8203;Viicos](https://github.com/Viicos) made their first
contribution in
[https://github.com/typeddjango/django-stubs/pull/1866](https://github.com/typeddjango/django-stubs/pull/1866)
- [@&#8203;dephiros](https://github.com/dephiros) made their first
contribution in
[https://github.com/typeddjango/django-stubs/pull/1873](https://github.com/typeddjango/django-stubs/pull/1873)
- [@&#8203;jamesbraza](https://github.com/jamesbraza) made their first
contribution in
[https://github.com/typeddjango/django-stubs/pull/1927](https://github.com/typeddjango/django-stubs/pull/1927)
- [@&#8203;mfosterw](https://github.com/mfosterw) made their first
contribution in
[https://github.com/typeddjango/django-stubs/pull/1943](https://github.com/typeddjango/django-stubs/pull/1943)
- [@&#8203;palfrey](https://github.com/palfrey) made their first
contribution in
[https://github.com/typeddjango/django-stubs/pull/1944](https://github.com/typeddjango/django-stubs/pull/1944)
- [@&#8203;yhay81](https://github.com/yhay81) made their first
contribution in
[https://github.com/typeddjango/django-stubs/pull/1955](https://github.com/typeddjango/django-stubs/pull/1955)
- [@&#8203;delfick](https://github.com/delfick) made their first
contribution in
[https://github.com/typeddjango/django-stubs/pull/1961](https://github.com/typeddjango/django-stubs/pull/1961)
- [@&#8203;SingingTree](https://github.com/SingingTree) made their
first contribution in
[https://github.com/typeddjango/django-stubs/pull/1956](https://github.com/typeddjango/django-stubs/pull/1956)
- [@&#8203;avoronov-box](https://github.com/avoronov-box) made their
first contribution in
[https://github.com/typeddjango/django-stubs/pull/1962](https://github.com/typeddjango/django-stubs/pull/1962)
- [@&#8203;cuu508](https://github.com/cuu508) made their first
contribution in
[https://github.com/typeddjango/django-stubs/pull/1993](https://github.com/typeddjango/django-stubs/pull/1993)
- [@&#8203;samueljsb](https://github.com/samueljsb) made their first
contribution in
[https://github.com/typeddjango/django-stubs/pull/1994](https://github.com/typeddjango/django-stubs/pull/1994)
- [@&#8203;pelme](https://github.com/pelme) made their first
contribution in
[https://github.com/typeddjango/django-stubs/pull/1999](https://github.com/typeddjango/django-stubs/pull/1999)
- [@&#8203;mlazar-endear](https://github.com/mlazar-endear) made their
first contribution in
[https://github.com/typeddjango/django-stubs/pull/2001](https://github.com/typeddjango/django-stubs/pull/2001)
- [@&#8203;j00bar](https://github.com/j00bar) made their first
contribution in
[https://github.com/typeddjango/django-stubs/pull/2010](https://github.com/typeddjango/django-stubs/pull/2010)
- [@&#8203;jorenham](https://github.com/jorenham) made their first
contribution in
[https://github.com/typeddjango/django-stubs/pull/2019](https://github.com/typeddjango/django-stubs/pull/2019)
- [@&#8203;fidoriel](https://github.com/fidoriel) made their first
contribution in
[https://github.com/typeddjango/django-stubs/pull/1925](https://github.com/typeddjango/django-stubs/pull/1925)
- [@&#8203;armanckeser](https://github.com/armanckeser) made their
first contribution in
[https://github.com/typeddjango/django-stubs/pull/2021](https://github.com/typeddjango/django-stubs/pull/2021)
- [@&#8203;nebiyuelias1](https://github.com/nebiyuelias1) made their
first contribution in
[https://github.com/typeddjango/django-stubs/pull/2029](https://github.com/typeddjango/django-stubs/pull/2029)
- [@&#8203;Skorpyon](https://github.com/Skorpyon) made their first
contribution in
[https://github.com/typeddjango/django-stubs/pull/1876](https://github.com/typeddjango/django-stubs/pull/1876)
- [@&#8203;saJaeHyukc](https://github.com/saJaeHyukc) made their first
contribution in
[https://github.com/typeddjango/django-stubs/pull/2054](https://github.com/typeddjango/django-stubs/pull/2054)
- [@&#8203;sudosubin](https://github.com/sudosubin) made their first
contribution in
[https://github.com/typeddjango/django-stubs/pull/2057](https://github.com/typeddjango/django-stubs/pull/2057)
- [@&#8203;md384](https://github.com/md384) made their first
contribution in
[https://github.com/typeddjango/django-stubs/pull/2048](https://github.com/typeddjango/django-stubs/pull/2048)
- [@&#8203;Majsvaffla](https://github.com/Majsvaffla) made their first
contribution in
[https://github.com/typeddjango/django-stubs/pull/1160](https://github.com/typeddjango/django-stubs/pull/1160)
- [@&#8203;jlost](https://github.com/jlost) made their first
contribution in
[https://github.com/typeddjango/django-stubs/pull/2085](https://github.com/typeddjango/django-stubs/pull/2085)

**Full Changelog**:
typeddjango/django-stubs@4.2.7...5.0.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/libretime/libretime).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zMjEuMiIsInVwZGF0ZWRJblZlciI6IjM3LjMyMS4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiLCJweXRob24iXX0=-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Blocked by some other PR, discussion or third party dependency. pyright Related to pyright type checker
Development

Successfully merging this pull request may close these issues.

4 participants