Browse Source

Adequa a PEP8

pull/508/head
Eduardo Calil 9 years ago
parent
commit
14d629057d
  1. 4
      sapl/base/views.py
  2. 6
      sapl/comissoes/views.py
  3. 3
      sapl/materia/forms.py
  4. 2
      sapl/materia/models.py
  5. 7
      sapl/materia/urls.py
  6. 13
      sapl/materia/views.py
  7. 8
      sapl/parlamentares/views.py
  8. 6
      sapl/protocoloadm/urls.py
  9. 17
      sapl/protocoloadm/views.py
  10. 2
      sapl/sessao/views.py
  11. 3
      sapl/utils.py
  12. 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)

3
sapl/materia/forms.py

@ -7,8 +7,7 @@ from django import forms
from django.contrib.auth.models import Group, User
from django.contrib.auth.password_validation import validate_password
from django.core.exceptions import ObjectDoesNotExist, ValidationError
from django.db import models
from django.db import transaction
from django.db import models, transaction
from django.db.models import Max
from django.forms import ModelForm
from django.utils.translation import ugettext_lazy as _

2
sapl/materia/models.py

@ -1,5 +1,5 @@
from django.db import models
from django.contrib.auth.models import Group, User
from django.db import models
from django.utils.translation import ugettext_lazy as _
from model_utils import Choices

7
sapl/materia/urls.py

@ -3,10 +3,9 @@ from django.conf.urls import include, url
from sapl.materia.views import (AcompanhamentoConfirmarView,
AcompanhamentoExcluirView,
AcompanhamentoMateriaView, AnexadaCrud,
AutorCrud, AutoriaCrud, DespachoInicialCrud,
ConfirmarEmailView,
DocumentoAcessorioCrud, LegislacaoCitadaCrud,
MateriaLegislativaCrud,
AutorCrud, AutoriaCrud, ConfirmarEmailView,
DespachoInicialCrud, DocumentoAcessorioCrud,
LegislacaoCitadaCrud, MateriaLegislativaCrud,
MateriaLegislativaPesquisaView, MateriaTaView,
NumeracaoCrud, OrgaoCrud, OrigemCrud,
ProposicaoCrud, ProposicaoTaView,

13
sapl/materia/views.py

@ -7,16 +7,16 @@ from crispy_forms.layout import HTML, Button
from django.conf import settings
from django.contrib import messages
from django.contrib.auth.mixins import PermissionRequiredMixin
from django.contrib.auth.tokens import default_token_generator
from django.contrib.auth.models import User
from django.utils.http import urlsafe_base64_encode, urlsafe_base64_decode
from django.core.exceptions import ObjectDoesNotExist, MultipleObjectsReturned
from django.contrib.auth.tokens import default_token_generator
from django.core.exceptions import MultipleObjectsReturned, ObjectDoesNotExist
from django.core.mail import send_mail
from django.core.urlresolvers import reverse
from django.http.response import HttpResponseRedirect
from django.shortcuts import redirect
from django.template import Context, loader
from django.utils.encoding import force_bytes
from django.utils.http import urlsafe_base64_decode, urlsafe_base64_encode
from django.utils.translation import ugettext_lazy as _
from django.views.generic import CreateView, TemplateView, UpdateView
from django_filters.views import FilterView
@ -25,13 +25,12 @@ 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,
CrudDetailView, CrudListView,
CrudUpdateView, CrudDeleteView, make_pagination)
CrudDeleteView, CrudDetailView, 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_autor, permissoes_materia,
permissao_tb_aux)
permissao_tb_aux, permissoes_autor, permissoes_materia)
from .forms import (AcompanhamentoMateriaForm, AnexadaForm, AutorForm,
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