Closed devkral closed 1 year ago
I think, I get why UserType exists.
AbstractBaseUser lacks some attributes (PermissionMixin).
But the dependency can still be made optional
Merging #250 (a4877fd) into main (8878561) will decrease coverage by
0.12%
. The diff coverage is84.31%
.
@@ Coverage Diff @@
## main #250 +/- ##
==========================================
- Coverage 88.48% 88.36% -0.12%
==========================================
Files 28 28
Lines 2830 2846 +16
==========================================
+ Hits 2504 2515 +11
- Misses 326 331 +5
Impacted Files | Coverage Δ | |
---|---|---|
strawberry_django_plus/permissions.py | 82.59% <66.66%> (ø) |
|
strawberry_django_plus/utils/query.py | 82.71% <82.60%> (-3.40%) |
:arrow_down: |
strawberry_django_plus/integrations/guardian.py | 94.44% <85.71%> (+0.15%) |
:arrow_up: |
strawberry_django_plus/optimizer.py | 87.00% <85.71%> (-0.17%) |
:arrow_down: |
strawberry_django_plus/type.py | 89.50% <100.00%> (+0.11%) |
:arrow_up: |
strawberry_django_plus/utils/typing.py | 88.88% <100.00%> (ø) |
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
I worked around the problems and fixed the problem that mixing 3party users with internal users could causes crashes in is_staff, is_superuser checks
I have some problems with pyupgrade and pyright.
It will incorrectly upgrade some if TYPE_CHECKING clauses
.
On the other hand pyright does not accept None, therefor the type(None) clauses
sry for the noise, running pyright locally gives different results. Shall I rebase?
@devkral sure, rebase or merge the main
branch, it will get squashed later so only the diff matters :)
Ping me when this is ready for the next review
cleaned up and rebased
the issues are fixed
@devkral thanks for putting the time for this and to fix all the review comments :)
fixes #248 , #249
The tests are deeply integrated with User so I cannot provide tests or have you an idea? Would it be sufficient to change the settings via decorator/context and then do import tests (I think not as the modules are already imported)