From 035282b699223d83e8036d3ee8c9290f15cc58df Mon Sep 17 00:00:00 2001 From: Shrikrishna Singh Date: Fri, 10 Apr 2020 19:29:17 +0530 Subject: [PATCH] Lint the code --- .../migrations/0016_auto_20200410_1926.py | 34 ++++++++---- junction/devices/migrations/0001_initial.py | 2 +- .../migrations/0027_auto_20200410_1926.py | 52 ++++++++++++++----- junction/proposals/views.py | 7 ++- 4 files changed, 70 insertions(+), 25 deletions(-) diff --git a/junction/conferences/migrations/0016_auto_20200410_1926.py b/junction/conferences/migrations/0016_auto_20200410_1926.py index c989aabf..f5fa93d1 100644 --- a/junction/conferences/migrations/0016_auto_20200410_1926.py +++ b/junction/conferences/migrations/0016_auto_20200410_1926.py @@ -10,23 +10,39 @@ class Migration(migrations.Migration): dependencies = [ - ('conferences', '0015_auto_20200322_1904'), + ("conferences", "0015_auto_20200322_1904"), ] operations = [ migrations.AddField( - model_name='historicalconferenceproposalreviewer', - name='history_change_reason', + model_name="historicalconferenceproposalreviewer", + name="history_change_reason", field=models.CharField(max_length=100, null=True), ), migrations.AlterField( - model_name='historicalconferenceproposalreviewer', - name='created_by', - field=models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to=settings.AUTH_USER_MODEL, verbose_name='Created By'), + model_name="historicalconferenceproposalreviewer", + name="created_by", + field=models.ForeignKey( + blank=True, + db_constraint=False, + null=True, + on_delete=django.db.models.deletion.DO_NOTHING, + related_name="+", + to=settings.AUTH_USER_MODEL, + verbose_name="Created By", + ), ), migrations.AlterField( - model_name='historicalconferenceproposalreviewer', - name='modified_by', - field=models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to=settings.AUTH_USER_MODEL, verbose_name='Modified By'), + model_name="historicalconferenceproposalreviewer", + name="modified_by", + field=models.ForeignKey( + blank=True, + db_constraint=False, + null=True, + on_delete=django.db.models.deletion.DO_NOTHING, + related_name="+", + to=settings.AUTH_USER_MODEL, + verbose_name="Modified By", + ), ), ] diff --git a/junction/devices/migrations/0001_initial.py b/junction/devices/migrations/0001_initial.py index 58927534..5d4121cc 100644 --- a/junction/devices/migrations/0001_initial.py +++ b/junction/devices/migrations/0001_initial.py @@ -33,7 +33,7 @@ class Migration(migrations.Migration): auto_now=True, verbose_name="Last Modified At" ), ), - ('uuid', models.UUIDField(max_length=32, unique=True, db_index=True)), + ("uuid", models.UUIDField(max_length=32, unique=True, db_index=True)), ("is_verified", models.BooleanField(default=False)), ("verification_code", models.IntegerField()), ( diff --git a/junction/proposals/migrations/0027_auto_20200410_1926.py b/junction/proposals/migrations/0027_auto_20200410_1926.py index 55b64063..a8cb5ad3 100644 --- a/junction/proposals/migrations/0027_auto_20200410_1926.py +++ b/junction/proposals/migrations/0027_auto_20200410_1926.py @@ -10,33 +10,57 @@ class Migration(migrations.Migration): dependencies = [ - ('proposals', '0026_auto_20200323_2010'), + ("proposals", "0026_auto_20200323_2010"), ] operations = [ migrations.AddField( - model_name='historicalproposal', - name='history_change_reason', + model_name="historicalproposal", + name="history_change_reason", field=models.CharField(max_length=100, null=True), ), migrations.AddField( - model_name='historicalproposalsectionreviewervote', - name='history_change_reason', + model_name="historicalproposalsectionreviewervote", + name="history_change_reason", field=models.CharField(max_length=100, null=True), ), migrations.AlterField( - model_name='historicalproposal', - name='author', - field=models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to=settings.AUTH_USER_MODEL, verbose_name='Primary Speaker'), + model_name="historicalproposal", + name="author", + field=models.ForeignKey( + blank=True, + db_constraint=False, + null=True, + on_delete=django.db.models.deletion.DO_NOTHING, + related_name="+", + to=settings.AUTH_USER_MODEL, + verbose_name="Primary Speaker", + ), ), migrations.AlterField( - model_name='historicalproposal', - name='proposal_section', - field=models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='proposals.ProposalSection', verbose_name='Proposal Section'), + model_name="historicalproposal", + name="proposal_section", + field=models.ForeignKey( + blank=True, + db_constraint=False, + null=True, + on_delete=django.db.models.deletion.DO_NOTHING, + related_name="+", + to="proposals.ProposalSection", + verbose_name="Proposal Section", + ), ), migrations.AlterField( - model_name='historicalproposal', - name='proposal_type', - field=models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='proposals.ProposalType', verbose_name='Proposal Type'), + model_name="historicalproposal", + name="proposal_type", + field=models.ForeignKey( + blank=True, + db_constraint=False, + null=True, + on_delete=django.db.models.deletion.DO_NOTHING, + related_name="+", + to="proposals.ProposalType", + verbose_name="Proposal Type", + ), ), ] diff --git a/junction/proposals/views.py b/junction/proposals/views.py index 7dc868fb..44df7332 100644 --- a/junction/proposals/views.py +++ b/junction/proposals/views.py @@ -41,7 +41,12 @@ class ProposalView(viewsets.ReadOnlyModelViewSet): queryset = Proposal.objects.filter(status=2) serializer_class = serializers.ProposalSerializer filter_backend = (filters.DjangoFilterBackend,) - filterset_fields = ("conference", "review_status", "proposal_type", "proposal_section") + filterset_fields = ( + "conference", + "review_status", + "proposal_type", + "proposal_section", + ) def get_queryset(self): data = super(ProposalView, self).get_queryset()