Comments (1)
This should be possible, to detect request.user.is_authenticated()
and remove the parentheses.
The change was made in Django 1.10: https://docs.djangoproject.com/en/1.10/releases/1.10/#using-user-is-authenticated-and-user-is-anonymous-as-methods , so that is what django-upgrade would target.
Since itβs so old, this feature is not really a priority for me, but Iβm happy to review a PR.
from django-upgrade.
Related Issues (20)
- default_app_config fixer HOT 3
- Rewrite `queryset.filter(pk=obj.pk).exists()` to `queryset.contains(obj)` HOT 3
- Strip skip decorators for old Django versions
- Django 4.1 Deprecated MemcachedCache HOT 1
- Default file storage is unset by django-upgrade HOT 1
- Check for unnecessary r strings in path HOT 3
- Support removal of `django.core.urlresolvers` on Django 2.0 HOT 5
- Cache support HOT 3
- Add `@admin.display` decorators in models file too HOT 5
- Introduce instruction on how to contribute with the project
- Django 6.0: Remove `FORMS_URLFIELD_ASSUME_HTTPS` transitional setting
- `timezone.utc` isn't replaced when `datetime` isn't imported HOT 4
- Rewrite `redirect(reverse(...))` calls to `redirect(...)` HOT 4
- `.choices` dropped for choices not subclassing the `*Choices` class HOT 6
- `request.is_ajax()` method is removed since Django 4.0. HOT 1
- Add fixer for django.db.models.AutoField in Django 3.2 HOT 1
- Template Tag "trans" to "translate" HOT 2
- Ruff integration HOT 7
- Rewrite `CheckConstraint` argument `check` -> `condition` on Django 5.1+
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-upgrade.