Miscellaneous style fixes spotted by landscape (#874)

This commit is contained in:
Riccardo Magliocchetti 2016-08-05 00:30:33 +02:00 committed by Maxime Beauchemin
parent 82a8e6316f
commit 7c810dbd20
7 changed files with 12 additions and 16 deletions

View File

@ -310,7 +310,7 @@ class FormFactory(object):
"description": _("Columns to display")
}),
'druid_time_origin': (FreeFormSelectField, {
"label": _( "Origin"),
"label": _("Origin"),
"choices": (
('', _('default')),
('now', _('now')),

View File

@ -11,7 +11,7 @@ revision = '1226819ee0e3'
down_revision = '956a063c52b3'
from alembic import op
from caravel import db, models
from caravel import db
from caravel.utils import generic_find_constraint_name
import logging

View File

@ -362,7 +362,6 @@ class Queryable(object):
return "/caravel/explore/{obj.type}/{obj.id}/".format(obj=self)
class Database(Model, AuditMixinNullable):
"""An ORM object that stores Database related information"""
@ -536,7 +535,6 @@ class SqlaTable(Model, Queryable, AuditMixinNullable):
'database_id', 'schema', 'table_name',
name='_customer_location_uc'),)
def __repr__(self):
return self.table_name
@ -1125,7 +1123,7 @@ class DruidDatasource(Model, AuditMixinNullable, Queryable):
def int_or_0(v):
try:
v = int(v)
except Exception as e:
except (TypeError, ValueError):
v = 0
return v
v1nums = [int_or_0(n) for n in v1.split('.')]

View File

@ -10,7 +10,6 @@ import functools
import json
import logging
import numpy
import time
import parsedatetime
import sqlalchemy as sa

View File

@ -1331,7 +1331,6 @@ class Caravel(BaseCaravelView):
}
return json.dumps(data, default=utils.json_int_dttm_ser, allow_nan=False)
@has_access
@expose("/refresh_datasources/")
def refresh_datasources(self):