Comments (3)
Ah right, currently the fixer only considers regexes that end with $
, which prevents it from applying in this situation. I think we could maybe allow non-$-terminated regexes for include()
only. It's not safe to convert for views since the lack of $ means the regex matches any characters at the end.
from django-upgrade.
Agree, it's looking safe for the include()
case, should be quite a simple update to support this case.
Should I step in for a patch ? I've seen you started some refactoring to fix #250 so maybe we should wait for this before doing more work on this fixer?
PS: @amrishparmar See #121 for reference on why it's not safe for views.
from django-upgrade.
Yeah it needs to wait until #250 is fixed. If you want to make an alternate PR before I get to work on it, feel free.
from django-upgrade.
Related Issues (20)
- NullBooleanField fixer can remove still-used import
- Django 5.1: Fixer for CI*Field - db_collation replacement HOT 1
- does it require internet access? HOT 3
- 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
- Convert is_authenticated() to is_authenticated HOT 1
- Add fixer for django.db.models.AutoField in Django 3.2 HOT 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.