mirror of
https://github.com/apache/superset.git
synced 2024-09-12 08:39:45 -04:00
Miscellaneous style fixes spotted by landscape (#874)
This commit is contained in:
parent
82a8e6316f
commit
7c810dbd20
@ -310,7 +310,7 @@ class FormFactory(object):
|
||||
"description": _("Columns to display")
|
||||
}),
|
||||
'druid_time_origin': (FreeFormSelectField, {
|
||||
"label": _( "Origin"),
|
||||
"label": _("Origin"),
|
||||
"choices": (
|
||||
('', _('default')),
|
||||
('now', _('now')),
|
||||
|
@ -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
|
||||
|
||||
|
@ -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('.')]
|
||||
|
@ -10,7 +10,6 @@ import functools
|
||||
import json
|
||||
import logging
|
||||
import numpy
|
||||
import time
|
||||
|
||||
import parsedatetime
|
||||
import sqlalchemy as sa
|
||||
|
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user