Skip to content

Commit 94480e0

Browse files
committed
Newer pylint test versions expect additional columns in expected test outputs, so adding these in. Also, fixing the consider-using-f-string warnings from tests (#338)
1 parent 38a3b08 commit 94480e0

11 files changed

+20
-19
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ nosetests.xml
3434
.project
3535
.pydevproject
3636
.env
37+
.idea
3738
env.txt
3839
.venv
3940

pylint_django/tests/input/external_factory_boy_noerror.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Test to validate that pylint_django doesn't produce
33
Instance of 'SubFactory' has no 'pk' member (no-member) warnings
44
"""
5-
# pylint: disable=attribute-defined-outside-init, missing-docstring, too-few-public-methods
5+
# pylint: disable=attribute-defined-outside-init, missing-docstring, too-few-public-methods, consider-using-f-string
66
import factory
77

88
from django import test
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
imported-auth-user:5:0::User model imported from django.contrib.auth.models
2-
imported-auth-user:6:0::User model imported from django.contrib.auth.models
3-
hard-coded-auth-user:10:31:PullRequest:Hard-coded 'auth.User'
1+
imported-auth-user:5:0:5:40::User model imported from django.contrib.auth.models:UNDEFINED
2+
imported-auth-user:6:0:6:43::User model imported from django.contrib.auth.models:UNDEFINED
3+
hard-coded-auth-user:10:31:10:42:PullRequest:Hard-coded 'auth.User':UNDEFINED
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
http-response-with-json-dumps:9:11:say_yes:Instead of HttpResponse(json.dumps(data)) use JsonResponse(data)
2-
http-response-with-json-dumps:14:11:say_yes2:Instead of HttpResponse(json.dumps(data)) use JsonResponse(data)
3-
redundant-content-type-for-json-response:23:11:redundant_content_type:Redundant content_type parameter for JsonResponse()
4-
http-response-with-content-type-json:28:11:content_type_json:Instead of HttpResponse(content_type='application/json') use JsonResponse()
1+
http-response-with-json-dumps:9:11:9:64:say_yes:Instead of HttpResponse(json.dumps(data)) use JsonResponse(data):UNDEFINED
2+
http-response-with-json-dumps:14:11:14:46:say_yes2:Instead of HttpResponse(json.dumps(data)) use JsonResponse(data):UNDEFINED
3+
redundant-content-type-for-json-response:23:11:23:67:redundant_content_type:Redundant content_type parameter for JsonResponse():UNDEFINED
4+
http-response-with-content-type-json:28:11:28:67:content_type_json:Instead of HttpResponse(content_type='application/json') use JsonResponse():UNDEFINED
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
model-has-unicode:9:0:SomeModel:Found __unicode__ method on model (SomeModel). Python3 uses __str__.
1+
model-has-unicode:9:0:19:29:SomeModel:Found __unicode__ method on model (SomeModel). Python3 uses __str__.:UNDEFINED
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
model-no-explicit-unicode:18:0:SomeModel:Model does not explicitly define __unicode__ (SomeModel)
1+
model-no-explicit-unicode:18:0:19:8:SomeModel:Model does not explicitly define __unicode__ (SomeModel):UNDEFINED
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
modelform-uses-exclude:10:8:PersonForm.Meta:Use explicit fields instead of exclude in ModelForm
1+
modelform-uses-exclude:10:8:10:28:PersonForm.Meta:Use explicit fields instead of exclude in ModelForm:UNDEFINED

pylint_django/tests/input/func_noerror_foreign_key_attributes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""
22
Checks that Pylint does not complain about foreign key sets on models
33
"""
4-
# pylint: disable=missing-docstring
4+
# pylint: disable=missing-docstring consider-using-f-string
55

66
from django.db import models
77

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
unused-argument:18:25:user_detail:Unused argument 'user_id':HIGH
2-
unused-argument:24:27:UserView.get:Unused argument 'user_id':INFERENCE
1+
unused-argument:18:25:18:32:user_detail:Unused argument 'user_id':HIGH
2+
unused-argument:24:27:24:34:UserView.get:Unused argument 'user_id':INFERENCE
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
new-db-field-with-default:28:8:Migration:pylint_django.tests.input.migrations.0002_new_column AddField with default value
1+
new-db-field-with-default:28:8:32:9:Migration:pylint_django.tests.input.migrations.0002_new_column AddField with default value:UNDEFINED
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
missing-backwards-migration-callable:12:8:Migration:Always include backwards migration callable
2-
missing-backwards-migration-callable:13:8:Migration:Always include backwards migration callable
3-
missing-backwards-migration-callable:15:8:Migration:Always include backwards migration callable
4-
missing-backwards-migration-callable:17:8:Migration:Always include backwards migration callable
1+
missing-backwards-migration-callable:12:8:12:30:Migration:Always include backwards migration callable:UNDEFINED
2+
missing-backwards-migration-callable:13:8:14:26:Migration:Always include backwards migration callable:UNDEFINED
3+
missing-backwards-migration-callable:15:8:16:31:Migration:Always include backwards migration callable:UNDEFINED
4+
missing-backwards-migration-callable:17:8:18:45:Migration:Always include backwards migration callable:UNDEFINED

0 commit comments

Comments
 (0)