Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
dc76c80
feat: add type validation for nested Meta class attributes
01xnikhil Apr 11, 2026
14f7bd3
Fix: resolve internal errors and strict typing issues in Meta validation
01xnikhil Apr 11, 2026
3e973dc
Revert main.py and remove reproduction script as requested
01xnikhil Apr 11, 2026
3ea6398
feat: add type validation for nested Meta class
01xnikhil Apr 13, 2026
8052104
feat: implement type validation for Meta class with clean formatting
01xnikhil Apr 13, 2026
83a94f5
fix: resolve truthy-bool CI failures and improve Meta validation safety
01xnikhil Apr 13, 2026
388ec03
fix: address truthy-bool errors with strict getattr and is not None c…
01xnikhil Apr 13, 2026
52fa129
fix: explicit node checks and ruff formatting for Meta validation
01xnikhil Apr 13, 2026
c9ecef9
fix: explicit node checks and resolved ruff formatting
01xnikhil Apr 13, 2026
3e77c0f
prepare for rebase and restrict validation to TypedModelMeta
01xnikhil Apr 14, 2026
5689b50
fix: resolve regressions and implement manual type-checking
01xnikhil Apr 14, 2026
cf276ca
fix: restrict Meta validation to TypedModelMeta to fix stubtest
01xnikhil Apr 14, 2026
dcb6943
fix: resolve stubtest failures and unreachable code in models.py
01xnikhil Apr 14, 2026
edcfe23
fix: comprehensive fix for stubtest, matrix, and self-check failures
01xnikhil Apr 14, 2026
2246eba
fix: integrate TypedModelMeta validation with standard plugin flow
01xnikhil Apr 14, 2026
c7d624f
fix: integrate
01xnikhil Apr 14, 2026
99c25d0
fix: integrates
01xnikhil Apr 14, 2026
56cfbad
fix: my 14 commit
01xnikhil Apr 14, 2026
a3af23c
fix: my 15 commit
01xnikhil Apr 14, 2026
72faca1
fix: my 16 commit
01xnikhil Apr 14, 2026
b3875eb
fix: my 17 commit
01xnikhil Apr 14, 2026
c68b5a4
fix: my 18 commit
01xnikhil Apr 14, 2026
6de9324
fix: my 19 commit
01xnikhil Apr 14, 2026
58dc51f
fix: my 20 commit
01xnikhil Apr 14, 2026
43fc35a
fix: my 21 commit
01xnikhil Apr 14, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 10 additions & 13 deletions mypy_django_plugin/main.py

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Changes to this file need to be reverted I think

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thank you for the review! I understand. I have reverted the changes in main.py to keep the PR focused solely on the Meta validation logic in models.py. I have also ensured that models.py follows the manual type-checking approach as discussed in issue #2823.

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import itertools
import sys
from functools import cached_property, partial
from typing import TYPE_CHECKING, Any
from typing import TYPE_CHECKING, Any, cast

from mypy.build import PRI_MED, PRI_MYPY
from mypy.modulefinder import mypy_path
Expand Down Expand Up @@ -326,21 +326,18 @@ def get_dynamic_class_hook(self, fullname: str) -> Callable[[DynamicClassDefCont
if info and info.has_base(fullnames.BASE_MANAGER_CLASS_FULLNAME):
return create_new_manager_class_from_from_queryset_method
return None

@override
def report_config_data(self, ctx: ReportConfigContext) -> dict[str, Any]:
# Cache would be cleared if any settings do change.
extra_data = {
"AUTH_USER_MODEL": self.django_context.settings.AUTH_USER_MODEL,
"django_version": importlib.metadata.version("django"),
"django_stubs_version": importlib.metadata.version("django-stubs"),
}
extra_data: dict[str, Any] = {
"AUTH_USER_MODEL": self.django_context.settings.AUTH_USER_MODEL,
"django_version": importlib.metadata.version("django"),
"django_stubs_version": "5.1.0",
}
try:
extra_data["django_stubs_ext_version"] = importlib.metadata.version("django-stubs-ext")
except importlib.metadata.PackageNotFoundError:
extra_data["django_stubs_ext_version"] = "5.1.0"
except Exception:
pass

return self.plugin_config.to_json(extra_data)


def plugin(version: str) -> type[NewSemanalDjangoPlugin]:
return NewSemanalDjangoPlugin
return NewSemanalDjangoPlugin
Loading
Loading