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:
Will Barrett
2019-12-11 09:49:19 -08:00
committed by Maxime Beauchemin
parent adf2cc2039
commit 60914fa76a
6 changed files with 49 additions and 53 deletions

View File

@@ -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):