diff --git a/comissoes/urls.py b/comissoes/urls.py index 3095fac45..a4c27f283 100644 --- a/comissoes/urls.py +++ b/comissoes/urls.py @@ -1,11 +1,14 @@ from django.conf.urls import patterns, url -from comissoes.views import ComissaoListView, ComissaoDetailView, ComissaoUpdateView +from comissoes.views import ( + ComissaoListView, ComissaoDetailView, ComissaoUpdateView) urlpatterns = patterns( 'comissoes.views', url(r'^$', ComissaoListView.as_view(), name='comissao_list'), - url(r'^(?P\d+)$', ComissaoDetailView.as_view(), name='comissao_detail'), - url(r'^(?P\d+)/edit$', ComissaoUpdateView.as_view(), name='comissao_update'), + url(r'^(?P\d+)$', ComissaoDetailView.as_view(), + name='comissao_detail'), + url(r'^(?P\d+)/edit$', ComissaoUpdateView.as_view(), + name='comissao_update'), ) diff --git a/comissoes/views.py b/comissoes/views.py index 9bd88c25b..50ae72751 100644 --- a/comissoes/views.py +++ b/comissoes/views.py @@ -1,6 +1,7 @@ from braces.views import FormMessagesMixin from django.core.urlresolvers import reverse_lazy -from django.views.generic import CreateView, DeleteView, ListView, UpdateView, DetailView +from django.views.generic import ( + CreateView, DeleteView, ListView, UpdateView, DetailView) from comissoes.models import Comissao from .forms import ComissaoForm diff --git a/legacy/scripts/scrap_original_forms.py b/legacy/scripts/scrap_original_forms.py index f7a126b28..1fc7456cf 100644 --- a/legacy/scripts/scrap_original_forms.py +++ b/legacy/scripts/scrap_original_forms.py @@ -228,9 +228,12 @@ def extract_fieldsets_for_current(model): reverse_field_renames.update(adjustments) for fieldset in fieldsets: - rows = [colsplit([reverse_field_renames.get(name, '%s_FIXME' % name) - for name, __ in line]) - for line in fieldset['lines'] if line] + rows = [ + colsplit( + [reverse_field_renames.get(name, '%s_FIXME' % name) + for name, __ in line]) + for line in fieldset['lines'] if line + ] yield [fieldset['legend']] + rows except Exception as e: print_title_and_fieldsets(model) diff --git a/materia/forms.py b/materia/forms.py index bda7d4ea0..575cac3ad 100644 --- a/materia/forms.py +++ b/materia/forms.py @@ -2,9 +2,10 @@ from crispy_forms.helper import FormHelper from django import forms from django.utils.translation import ugettext as _ -from .models import (Origem, MateriaLegislativa, Anexada, TipoAutor, Autor, - Autoria, DocumentoAcessorio, Numeracao, Orgao, Relatoria, - TipoProposicao, Proposicao, StatusTramitacao, UnidadeTramitacao, Tramitacao, ) +from .models import ( + Origem, MateriaLegislativa, Anexada, TipoAutor, Autor, Autoria, + DocumentoAcessorio, Numeracao, Orgao, Relatoria, TipoProposicao, + Proposicao, StatusTramitacao, UnidadeTramitacao, Tramitacao) from sapl.layout import SaplFormLayout diff --git a/protocoloadm/forms.py b/protocoloadm/forms.py index a87f8adf4..f6ca28cb2 100644 --- a/protocoloadm/forms.py +++ b/protocoloadm/forms.py @@ -65,7 +65,8 @@ class DocumentoAcessorioAdministrativoForm(forms.ModelForm): exclude = [] def __init__(self, *args, **kwargs): - super(DocumentoAcessorioAdministrativoForm, self).__init__(*args, **kwargs) + super(DocumentoAcessorioAdministrativoForm, self).__init__( + *args, **kwargs) self.helper = FormHelper() self.helper.layout = SaplFormLayout( @@ -131,7 +132,8 @@ class StatusTramitacaoAdministrativoForm(forms.ModelForm): exclude = [] def __init__(self, *args, **kwargs): - super(StatusTramitacaoAdministrativoForm, self).__init__(*args, **kwargs) + super(StatusTramitacaoAdministrativoForm, self).__init__( + *args, **kwargs) self.helper = FormHelper() self.helper.layout = SaplFormLayout( diff --git a/sessao/forms.py b/sessao/forms.py index 2e73289fd..1652c1066 100644 --- a/sessao/forms.py +++ b/sessao/forms.py @@ -43,12 +43,12 @@ class SessaoPlenariaForm(forms.ModelForm): ('sessao_legislativa', 3)], [('data_inicio', 12)], [('data_fim', 12)], - [('dia',2), - ('hora_inicio',2), - ('hora_fim',2), - ('tipo_expediente',6)], + [('dia', 2), + ('hora_inicio', 2), + ('hora_fim', 2), + ('tipo_expediente', 6)], [('url_audio', 6), ('url_video', 6)]], - + ) diff --git a/sessao/models.py b/sessao/models.py index bce1e6733..79354a2b1 100644 --- a/sessao/models.py +++ b/sessao/models.py @@ -52,7 +52,8 @@ class SessaoPlenaria(models.Model): verbose_name_plural = _('Sessões Plenárias') def __str__(self): - return _('%(numero)sª Sessão %(tipo_nome)s da %(sessao_legislativa_numero)sª Sessão Legislativa' + return _('%(numero)sª Sessão %(tipo_nome)s' + ' da %(sessao_legislativa_numero)sª Sessão Legislativa' ' da %(legislatura_id)sª Legislatura') % { 'numero': self.numero, @@ -212,9 +213,11 @@ class RegistroVotacao(models.Model): verbose_name_plural = _('Votações') def __str__(self): - return _('Ordem: %(ordem)s - Votação: %(votacao)s - Matéria: %(materia)s') % { - 'ordem': self.ordem, 'votacao': self.tipo_resultado_votacao, 'materia': self.materia} - + return _('Ordem: %(ordem)s - Votação: %(votacao)s - ' + 'Matéria: %(materia)s') % { + 'ordem': self.ordem, + 'votacao': self.tipo_resultado_votacao, + 'materia': self.materia} class VotoParlamentar(models.Model): # RegistroVotacaoParlamentar diff --git a/sessao/urls.py b/sessao/urls.py index 7f80e11b3..bb96c74c7 100644 --- a/sessao/urls.py +++ b/sessao/urls.py @@ -1,12 +1,16 @@ from django.conf.urls import patterns, url -from sessao.views import SessaoPlenariaListView, SessaoPlenariaDetailView, SessaoPlenariaCreateView, SessaoPlenariaUpdateView +from sessao.views import (SessaoPlenariaListView, SessaoPlenariaDetailView, + SessaoPlenariaCreateView, SessaoPlenariaUpdateView) urlpatterns = patterns( 'sessao.views', url(r'^$', SessaoPlenariaListView.as_view(), name='sessao_list'), - url(r'^(?P\d+)$', SessaoPlenariaDetailView.as_view(), name='sessao_detail'), - url(r'^create$', SessaoPlenariaCreateView.as_view(), name='sessao_create'), - url(r'^(?P\d+)/edit$', SessaoPlenariaUpdateView.as_view(), name='sessao_update'), + url(r'^(?P\d+)$', SessaoPlenariaDetailView.as_view(), + name='sessao_detail'), + url(r'^create$', SessaoPlenariaCreateView.as_view(), + name='sessao_create'), + url(r'^(?P\d+)/edit$', SessaoPlenariaUpdateView.as_view(), + name='sessao_update'), ) diff --git a/sessao/views.py b/sessao/views.py index 32288ebef..ebb17b96e 100644 --- a/sessao/views.py +++ b/sessao/views.py @@ -1,10 +1,12 @@ from braces.views import FormMessagesMixin from django.core.urlresolvers import reverse_lazy -from django.views.generic import CreateView, DeleteView, ListView, UpdateView, DetailView +from django.views.generic import ( + CreateView, DeleteView, ListView, UpdateView, DetailView) from sessao.models import SessaoPlenaria from .forms import SessaoPlenariaForm + class SessaoPlenariaListView(ListView): model = SessaoPlenaria