diff --git a/compilacao/views.py b/compilacao/views.py index d572c30b0..c705a36e0 100644 --- a/compilacao/views.py +++ b/compilacao/views.py @@ -138,7 +138,7 @@ def choice_models_in_extenal_views(): return result -class CompMixin(object): +class CompMixin: @property def title(self): @@ -1002,7 +1002,7 @@ class DispositivoEditView(TextEditView): return result -class ActionsEditMixin(object): +class ActionsEditMixin: def render_to_json_response(self, context, **response_kwargs): @@ -1346,7 +1346,7 @@ class ActionsEditView(ActionsEditMixin, TemplateView): return self.render_to_json_response(context, **response_kwargs) -class DispositivoSuccessUrlMixin(object): +class DispositivoSuccessUrlMixin: def get_success_url(self): return reverse_lazy( diff --git a/crispy_layout_mixin.py b/crispy_layout_mixin.py index 0ece800e0..46dadf7a7 100644 --- a/crispy_layout_mixin.py +++ b/crispy_layout_mixin.py @@ -65,7 +65,7 @@ def get_field_display(obj, fieldname): return verbose_name, display -class CrispyLayoutFormMixin(object): +class CrispyLayoutFormMixin: def get_layout(self): filename = join( diff --git a/crud.py b/crud.py index 41548d106..646c19d77 100644 --- a/crud.py +++ b/crud.py @@ -170,7 +170,7 @@ class CrudDeleteMixin(FormMessagesMixin): return self.list_url -class Crud(object): +class Crud: def __init__(self, model, help_path, base_mixin=BaseCrudMixin, diff --git a/legacy/migration.py b/legacy/migration.py index 6ccd362cf..1da5ddf67 100644 --- a/legacy/migration.py +++ b/legacy/migration.py @@ -120,7 +120,7 @@ def exec_sql(sql, db='default'): def iter_sql_records(sql, db): - class Record(object): + class Record: pass cursor = exec_sql(sql, db) fieldnames = [name[0] for name in cursor.description] @@ -149,7 +149,7 @@ def make_stub(model, id): return new -class DataMigrator(object): +class DataMigrator: def __init__(self): self.field_renames, self.model_renames = get_renames() diff --git a/legacy/router.py b/legacy/router.py index 1e3c92135..68b235059 100644 --- a/legacy/router.py +++ b/legacy/router.py @@ -1,4 +1,4 @@ -class LegacyRouter(object): +class LegacyRouter: def db_for_read(self, model, **hints): if model._meta.app_label == 'legacy': diff --git a/legacy/scripts/scrap_original_forms.py b/legacy/scripts/scrap_original_forms.py index d9fab3bf5..3527875a5 100644 --- a/legacy/scripts/scrap_original_forms.py +++ b/legacy/scripts/scrap_original_forms.py @@ -240,7 +240,7 @@ def extract_fieldsets_for_current(model): raise Exception(e, model) -class Under(object): +class Under: def __init__(self, arg): self.arg = arg diff --git a/sessao/views.py b/sessao/views.py index 01187c21d..93588e01d 100644 --- a/sessao/views.py +++ b/sessao/views.py @@ -39,7 +39,7 @@ tipo_expediente_crud = Crud(TipoExpediente, 'tipo_expediente') registro_votacao_crud = Crud(RegistroVotacao, '') -class PresencaMixin(object): +class PresencaMixin: def get_parlamentares(self): self.object = self.get_object()