mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-11 06:21:58 +08:00
Add end-of-file-fixer hook to pre-commit (#668)
This commit is contained in:
@@ -11,6 +11,7 @@ repos:
|
||||
- id: check-executables-have-shebangs
|
||||
- id: debug-statements
|
||||
- id: check-merge-conflict
|
||||
- id: end-of-file-fixer
|
||||
- repo: https://github.com/asottile/pyupgrade
|
||||
rev: v2.20.0
|
||||
hooks:
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
|
||||
|
||||
@@ -14,4 +14,4 @@ then
|
||||
fi
|
||||
else
|
||||
echo "git working tree is not clean, aborting"
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -25,4 +25,3 @@
|
||||
@non_atomic_requests
|
||||
def view_func(request: HttpRequest, arg: str) -> HttpResponse: ...
|
||||
reveal_type(view_func) # N: Revealed type is "def (request: django.http.request.HttpRequest, arg: builtins.str) -> django.http.response.HttpResponse"
|
||||
|
||||
|
||||
@@ -253,4 +253,4 @@
|
||||
class User(models.Model):
|
||||
username = models.TextField()
|
||||
username2 = models.TextField()
|
||||
age = models.IntegerField()
|
||||
age = models.IntegerField()
|
||||
|
||||
@@ -8,4 +8,3 @@
|
||||
models.Index("foo", name="test", opclasses=["bar"])
|
||||
models.Index("foo", name="test", condition=models.Q(foo=1))
|
||||
models.Index("foo", name="test", include=["bar"])
|
||||
|
||||
|
||||
@@ -254,4 +254,4 @@
|
||||
def base_init(cls) -> 'AbstractModel':
|
||||
return cls(text='mytext')
|
||||
class MyModel(AbstractModel):
|
||||
pass
|
||||
pass
|
||||
|
||||
@@ -69,4 +69,3 @@
|
||||
reveal_type(request.user) # N: Revealed type is "django.contrib.auth.models.User"
|
||||
custom_settings: |
|
||||
INSTALLED_APPS = ('django.contrib.contenttypes', 'django.contrib.auth')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user