mirror of
https://github.com/apache/superset.git
synced 2026-04-20 08:34:37 +00:00
re-enable Pylint on a number of view files (#8773)
* re-enable pylint for superset/views/tags.py * Re-enable pylint for superset/views/dashboard.py * Re-enable pylint for superset/views/sql_lab.py * Re-enable pylint for superset/views/datasource.py * Re-enable pylint for superset/views/utils.py * Re-enable pylint for superset/views/log/__init__.py * pylint fix * Improve naming
This commit is contained in:
committed by
Maxime Beauchemin
parent
adf2cc2039
commit
60914fa76a
@@ -14,7 +14,6 @@
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
# pylint: disable=C,R,W
|
||||
from collections import defaultdict
|
||||
from datetime import date
|
||||
from typing import Any, Dict, List, Optional, Tuple
|
||||
@@ -82,13 +81,13 @@ def get_viz(
|
||||
if slice_id:
|
||||
slc = db.session.query(models.Slice).filter_by(id=slice_id).one()
|
||||
return slc.get_viz()
|
||||
else:
|
||||
viz_type = form_data.get("viz_type", "table")
|
||||
datasource = ConnectorRegistry.get_datasource(
|
||||
datasource_type, datasource_id, db.session
|
||||
)
|
||||
viz_obj = viz.viz_types[viz_type](datasource, form_data=form_data, force=force)
|
||||
return viz_obj
|
||||
|
||||
viz_type = form_data.get("viz_type", "table")
|
||||
datasource = ConnectorRegistry.get_datasource(
|
||||
datasource_type, datasource_id, db.session
|
||||
)
|
||||
viz_obj = viz.viz_types[viz_type](datasource, form_data=form_data, force=force)
|
||||
return viz_obj
|
||||
|
||||
|
||||
def get_form_data(slice_id=None, use_slice_data=False):
|
||||
|
||||
Reference in New Issue
Block a user