diff --git a/sapl/compilacao/views.py b/sapl/compilacao/views.py index 9b7f79d95..0b6a476a9 100644 --- a/sapl/compilacao/views.py +++ b/sapl/compilacao/views.py @@ -53,8 +53,7 @@ TipoNotaCrud = Crud.build(TipoNota, 'tipo_nota') TipoVideCrud = Crud.build(TipoVide, 'tipo_vide') TipoPublicacaoCrud = Crud.build(TipoPublicacao, 'tipo_publicacao') VeiculoPublicacaoCrud = Crud.build(VeiculoPublicacao, 'veiculo_publicacao') -TipoDispositivoCrud = Crud.build( - TipoDispositivo, 'tipo_dispositivo') +TipoDispositivoCrud = Crud.build(TipoDispositivo, 'tipo_dispositivo') logger = logging.getLogger(BASE_DIR.name) diff --git a/sapl/crud/base.py b/sapl/crud/base.py index 074c1719b..a5c029655 100644 --- a/sapl/crud/base.py +++ b/sapl/crud/base.py @@ -16,20 +16,19 @@ from django.http.response import Http404 from django.shortcuts import redirect from django.utils.decorators import classonlymethod from django.utils.encoding import force_text -from django.utils.translation import string_concat from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import string_concat from django.views.generic import (CreateView, DeleteView, DetailView, ListView, UpdateView) from django.views.generic.base import ContextMixin from django.views.generic.list import MultipleObjectMixin from sapl.crispy_layout_mixin import CrispyLayoutFormMixin, get_field_display -from sapl.rules.map_rules import (RP_ADD, RP_CHANGE, RP_DELETE, - RP_DETAIL, RP_LIST) +from sapl.rules.map_rules import (RP_ADD, RP_CHANGE, RP_DELETE, RP_DETAIL, + RP_LIST) from sapl.settings import BASE_DIR from sapl.utils import normalize - logger = logging.getLogger(BASE_DIR.name) ACTION_LIST, ACTION_CREATE, ACTION_DETAIL, ACTION_UPDATE, ACTION_DELETE = \ diff --git a/sapl/materia/views.py b/sapl/materia/views.py index e1a686f1f..7be1e8560 100644 --- a/sapl/materia/views.py +++ b/sapl/materia/views.py @@ -84,7 +84,7 @@ class MateriaTaView(IntegracaoTaView): class ProposicaoTaView(IntegracaoTaView): model = Proposicao model_type_foreignkey = TipoProposicao - # TODO implmentar o mapa de fields e utiliza-lo em IntegracaoTaView + # TODO implementar o mapa de fields e utiliza-lo em IntegracaoTaView fields = { } diff --git a/sapl/parlamentares/views.py b/sapl/parlamentares/views.py index 4e937bd54..38228d920 100644 --- a/sapl/parlamentares/views.py +++ b/sapl/parlamentares/views.py @@ -64,8 +64,7 @@ class ProposicaoParlamentarCrud(CrudBaseForListAndDetailExternalAppView): class ListView(CrudBaseForListAndDetailExternalAppView.ListView): def get_queryset(self): - return super().get_queryset().filter( - data_envio__isnull=False) + return super().get_queryset().filter(data_envio__isnull=False) class ParticipacaoParlamentarCrud(CrudBaseForListAndDetailExternalAppView): diff --git a/sapl/rules/tests/test_rules.py b/sapl/rules/tests/test_rules.py index 0dcd808b0..3662477b9 100644 --- a/sapl/rules/tests/test_rules.py +++ b/sapl/rules/tests/test_rules.py @@ -7,11 +7,11 @@ from django.utils import six from django.utils.translation import ugettext_lazy as _ from sapl.base.models import CasaLegislativa, ProblemaMigracao -from sapl.compilacao.models import TipoDispositivo,\ - PerfilEstruturalTextoArticulado, TipoDispositivoRelationship +from sapl.compilacao.models import (PerfilEstruturalTextoArticulado, + TipoDispositivo, + TipoDispositivoRelationship) from sapl.materia.models import AcompanhamentoMateria -from sapl.rules import SAPL_GROUPS -from sapl.rules import map_rules +from sapl.rules import SAPL_GROUPS, map_rules from sapl.test_urls import create_perms_post_migrate from scripts.lista_permissions_in_decorators import \ lista_permissions_in_decorators diff --git a/sapl/sessao/views.py b/sapl/sessao/views.py index 1a7110e11..d5ce1bdad 100644 --- a/sapl/sessao/views.py +++ b/sapl/sessao/views.py @@ -70,7 +70,7 @@ def reordernar_materias_expediente(request, pk): def reordernar_materias_ordem(request, pk): ordens = OrdemDia.objects.filter( sessao_plenaria_id=pk) - for ordem_num, o in enumerate(ordens,1): + for ordem_num, o in enumerate(ordens, 1): o.numero_ordem = ordem_num o.save() diff --git a/scripts/lista_permissions_in_decorators.py b/scripts/lista_permissions_in_decorators.py index 8138cd0f7..4d504e6c0 100644 --- a/scripts/lista_permissions_in_decorators.py +++ b/scripts/lista_permissions_in_decorators.py @@ -2,7 +2,6 @@ import ast import inspect import os - if __name__ == '__main__': import django