Browse Source

Arruma detalhes da PEP8

pull/506/head
Eduardo Calil 9 years ago
parent
commit
b2b1f485be
  1. 4
      sapl/base/views.py
  2. 6
      sapl/comissoes/views.py
  3. 7
      sapl/materia/views.py
  4. 8
      sapl/parlamentares/views.py
  5. 6
      sapl/protocoloadm/urls.py
  6. 17
      sapl/protocoloadm/views.py
  7. 2
      sapl/sessao/views.py
  8. 3
      sapl/utils.py
  9. 2
      scripts/inicializa_grupos_autorizacoes.py

4
sapl/base/views.py

@ -3,8 +3,8 @@ from django.core.urlresolvers import reverse
from django.http import HttpResponseRedirect
from django.views.generic.base import TemplateView
from sapl.crud.base import Crud, CrudBaseMixin, CrudCreateView,\
CrudDetailView, CrudUpdateView
from sapl.crud.base import (Crud, CrudBaseMixin, CrudCreateView,
CrudDetailView, CrudUpdateView)
from sapl.utils import permissao_tb_aux
from .forms import CasaLegislativaForm

6
sapl/comissoes/views.py

@ -1,12 +1,12 @@
from django.core.urlresolvers import reverse
from django.contrib.auth.mixins import PermissionRequiredMixin
from django.core.urlresolvers import reverse
from django.views.generic import ListView
from sapl.crud.base import (Crud, CrudBaseMixin, CrudCreateView,
CrudUpdateView, CrudDeleteView)
CrudDeleteView, CrudUpdateView)
from sapl.crud.masterdetail import MasterDetailCrud
from sapl.materia.models import Tramitacao
from sapl.utils import permissoes_comissoes, permissao_tb_aux
from sapl.utils import permissao_tb_aux, permissoes_comissoes
from .models import (CargoComissao, Comissao, Composicao, Participacao,
Periodo, TipoComissao)

7
sapl/materia/views.py

@ -18,12 +18,13 @@ from django_filters.views import FilterView
from sapl.base.models import CasaLegislativa
from sapl.compilacao.views import IntegracaoTaView
from sapl.crispy_layout_mixin import SaplFormLayout, form_actions, to_row
from sapl.crud.base import (Crud, CrudBaseMixin, CrudCreateView, CrudListView,
CrudUpdateView, CrudDeleteView, make_pagination)
from sapl.crud.base import (Crud, CrudBaseMixin, CrudCreateView,
CrudDeleteView, CrudListView, CrudUpdateView,
make_pagination)
from sapl.crud.masterdetail import MasterDetailCrud
from sapl.norma.models import LegislacaoCitada
from sapl.utils import (autor_label, autor_modal, get_base_url,
permissoes_materia, permissao_tb_aux)
permissao_tb_aux, permissoes_materia)
from .forms import (AcompanhamentoMateriaForm, AnexadaForm, AutoriaForm,
DespachoInicialForm, DocumentoAcessorioForm,

8
sapl/parlamentares/views.py

@ -1,5 +1,4 @@
from django.contrib import messages
from django.contrib.auth.decorators import user_passes_test
from django.contrib.auth.mixins import PermissionRequiredMixin
from django.contrib.auth.models import Permission
from django.contrib.contenttypes.models import ContentType
@ -9,11 +8,10 @@ from django.utils.datastructures import MultiValueDictKeyError
from django.utils.translation import ugettext_lazy as _
from django.views.generic import FormView
from sapl.crud.base import (Crud, CrudCreateView, CrudListView, CrudUpdateView,
CrudBaseMixin, CrudDeleteView)
from sapl.crud.base import (Crud, CrudBaseMixin, CrudCreateView,
CrudDeleteView, CrudListView, CrudUpdateView)
from sapl.crud.masterdetail import MasterDetailCrud
from sapl.utils import permissoes_parlamentares, permissao_tb_aux
from sapl.utils import permissao_tb_aux, permissoes_parlamentares
from .forms import (ComposicaoColigacaoForm, FiliacaoForm, LegislaturaForm,
ParlamentarCreateForm, ParlamentarForm)

6
sapl/protocoloadm/urls.py

@ -22,10 +22,8 @@ from sapl.protocoloadm.views import (AnularProtocoloAdmView,
ProtocoloPesquisaView,
StatusTramitacaoAdministrativoCrud,
TipoDocumentoAdministrativoCrud,
TipoInstituicaoCrud,
TramitacaoAdmCrud,
get_nome_autor,
pesquisa_autores)
TipoInstituicaoCrud, TramitacaoAdmCrud,
get_nome_autor, pesquisa_autores)
from .apps import AppConfig

17
sapl/protocoloadm/views.py

@ -1,8 +1,6 @@
import json
from datetime import date, datetime
import sapl.crud.base
from sapl.crud.masterdetail import MasterDetailCrud
from braces.views import FormValidMessageMixin
from django.contrib.auth.mixins import PermissionRequiredMixin
from django.core.exceptions import ObjectDoesNotExist
@ -15,18 +13,21 @@ from django.views.generic import CreateView, DetailView, FormView, ListView
from django.views.generic.base import TemplateView
from django_filters.views import FilterView
from sapl.crud.base import (Crud, CrudBaseMixin, CrudListView, make_pagination,
CrudCreateView, CrudUpdateView, CrudDeleteView)
import sapl.crud.base
from sapl.crud.base import (Crud, CrudBaseMixin, CrudCreateView,
CrudDeleteView, CrudListView, CrudUpdateView,
make_pagination)
from sapl.crud.masterdetail import MasterDetailCrud
from sapl.materia.models import Proposicao, TipoMateriaLegislativa
from sapl.utils import (create_barcode, get_client_ip, permissoes_protocoloadm,
permissoes_adm)
from sapl.utils import (create_barcode, get_client_ip, permissoes_adm,
permissoes_protocoloadm)
from .forms import (AnularProcoloAdmForm, DocumentoAcessorioAdministrativoForm,
DocumentoAdministrativoFilterSet,
DocumentoAdministrativoForm, ProposicaoSimpleForm,
ProtocoloDocumentForm, ProtocoloFilterSet,
ProtocoloMateriaForm, TramitacaoAdmForm,
TramitacaoAdmEditForm)
ProtocoloMateriaForm, TramitacaoAdmEditForm,
TramitacaoAdmForm)
from .models import (Autor, DocumentoAcessorioAdministrativo,
DocumentoAdministrativo, Protocolo,
StatusTramitacaoAdministrativo,

2
sapl/sessao/views.py

@ -23,7 +23,7 @@ from sapl.materia.models import (Autoria, DocumentoAcessorio,
from sapl.norma.models import NormaJuridica
from sapl.parlamentares.models import Parlamentar
from sapl.sessao.serializers import SessaoPlenariaSerializer
from sapl.utils import permissoes_sessao, permissoes_painel, permissao_tb_aux
from sapl.utils import permissao_tb_aux, permissoes_painel, permissoes_sessao
from .forms import (BancadaForm, ExpedienteForm, ExpedienteMateriaForm,
ListMateriaForm, MateriaOrdemDiaForm, MesaForm,

3
sapl/utils.py

@ -1,6 +1,5 @@
from datetime import date
from functools import wraps
import os.path
import magic
from django.apps import apps
@ -8,11 +7,9 @@ from django.conf import settings
from django.contrib import admin
from django.contrib.auth.models import Permission
from django.contrib.contenttypes.models import ContentType
from django.core.checks import Warning, register
from django.core.exceptions import ValidationError
from django.utils.translation import ugettext_lazy as _
from floppyforms import ClearableFileInput
import magic
def get_settings_auth_user_model():

2
scripts/inicializa_grupos_autorizacoes.py

@ -1,4 +1,4 @@
from django.contrib.auth.models import User, Group, Permission
from django.contrib.auth.models import Group, Permission, User
from django.contrib.contenttypes.models import ContentType

Loading…
Cancel
Save