mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
[ci] Deprecate flake8 (#8409)
* [ci] Deprecate flake8 * Addressing @villebro's comments
This commit is contained in:
committed by
Maxime Beauchemin
parent
a19990185d
commit
9fc37ea9f1
@@ -14,20 +14,20 @@
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
from .bart_lines import load_bart_lines # noqa
|
||||
from .birth_names import load_birth_names # noqa
|
||||
from .country_map import load_country_map_data # noqa
|
||||
from .css_templates import load_css_templates # noqa
|
||||
from .deck import load_deck_dash # noqa
|
||||
from .energy import load_energy # noqa
|
||||
from .flights import load_flights # noqa
|
||||
from .long_lat import load_long_lat_data # noqa
|
||||
from .misc_dashboard import load_misc_dashboard # noqa
|
||||
from .multi_line import load_multi_line # noqa
|
||||
from .multiformat_time_series import load_multiformat_time_series # noqa
|
||||
from .paris import load_paris_iris_geojson # noqa
|
||||
from .random_time_series import load_random_time_series_data # noqa
|
||||
from .sf_population_polygons import load_sf_population_polygons # noqa
|
||||
from .tabbed_dashboard import load_tabbed_dashboard # noqa
|
||||
from .unicode_test_data import load_unicode_test_data # noqa
|
||||
from .world_bank import load_world_bank_health_n_pop # noqa
|
||||
from .bart_lines import load_bart_lines
|
||||
from .birth_names import load_birth_names
|
||||
from .country_map import load_country_map_data
|
||||
from .css_templates import load_css_templates
|
||||
from .deck import load_deck_dash
|
||||
from .energy import load_energy
|
||||
from .flights import load_flights
|
||||
from .long_lat import load_long_lat_data
|
||||
from .misc_dashboard import load_misc_dashboard
|
||||
from .multi_line import load_multi_line
|
||||
from .multiformat_time_series import load_multiformat_time_series
|
||||
from .paris import load_paris_iris_geojson
|
||||
from .random_time_series import load_random_time_series_data
|
||||
from .sf_population_polygons import load_sf_population_polygons
|
||||
from .tabbed_dashboard import load_tabbed_dashboard
|
||||
from .unicode_test_data import load_unicode_test_data
|
||||
from .world_bank import load_world_bank_health_n_pop
|
||||
|
||||
@@ -22,6 +22,7 @@ from sqlalchemy import String, Text
|
||||
|
||||
from superset import db
|
||||
from superset.utils.core import get_example_database
|
||||
|
||||
from .helpers import get_example_data, TBL
|
||||
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@ from sqlalchemy.sql import column
|
||||
from superset import db, security_manager
|
||||
from superset.connectors.sqla.models import SqlMetric, TableColumn
|
||||
from superset.utils.core import get_example_database
|
||||
|
||||
from .helpers import (
|
||||
config,
|
||||
Dash,
|
||||
|
||||
@@ -15,7 +15,9 @@
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
"""This module contains data related to countries and is used for geo mapping"""
|
||||
countries = [
|
||||
from typing import Any, Dict, List
|
||||
|
||||
countries: List[Dict[str, Any]] = [
|
||||
{
|
||||
"name": "Angola",
|
||||
"area": 1246700,
|
||||
@@ -2488,7 +2490,7 @@ countries = [
|
||||
},
|
||||
]
|
||||
|
||||
all_lookups = {}
|
||||
all_lookups: Dict[str, Dict[str, Dict[str, Any]]] = {}
|
||||
lookups = ["cioc", "cca2", "cca3", "name"]
|
||||
for lookup in lookups:
|
||||
all_lookups[lookup] = {}
|
||||
|
||||
@@ -23,6 +23,7 @@ from sqlalchemy.sql import column
|
||||
from superset import db
|
||||
from superset.connectors.sqla.models import SqlMetric
|
||||
from superset.utils import core as utils
|
||||
|
||||
from .helpers import (
|
||||
get_example_data,
|
||||
get_slice_json,
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
import json
|
||||
|
||||
from superset import db
|
||||
|
||||
from .helpers import Dash, get_slice_json, merge_slice, Slice, TBL, update_slice_ids
|
||||
|
||||
COLOR_RED = {"r": 205, "g": 0, "b": 3, "a": 0.82}
|
||||
|
||||
@@ -25,6 +25,7 @@ from sqlalchemy.sql import column
|
||||
from superset import db
|
||||
from superset.connectors.sqla.models import SqlMetric
|
||||
from superset.utils import core as utils
|
||||
|
||||
from .helpers import get_example_data, merge_slice, misc_dash_slices, Slice, TBL
|
||||
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ from sqlalchemy import DateTime
|
||||
|
||||
from superset import db
|
||||
from superset.utils import core as utils
|
||||
|
||||
from .helpers import get_example_data, TBL
|
||||
|
||||
|
||||
|
||||
@@ -16,11 +16,12 @@
|
||||
# under the License.
|
||||
"""Loads datasets, dashboards and slices in a new superset instance"""
|
||||
# pylint: disable=C,R,W
|
||||
from io import BytesIO
|
||||
import json
|
||||
import os
|
||||
from urllib import request
|
||||
import zlib
|
||||
from io import BytesIO
|
||||
from typing import Set
|
||||
from urllib import request
|
||||
|
||||
from superset import app, db
|
||||
from superset.connectors.connector_registry import ConnectorRegistry
|
||||
@@ -37,9 +38,9 @@ TBL = ConnectorRegistry.sources["table"]
|
||||
|
||||
config = app.config
|
||||
|
||||
EXAMPLES_FOLDER = os.path.join(config.get("BASE_DIR"), "examples")
|
||||
EXAMPLES_FOLDER = os.path.join(config["BASE_DIR"], "examples")
|
||||
|
||||
misc_dash_slices = set() # slices assembled in a 'Misc Chart' dashboard
|
||||
misc_dash_slices: Set[str] = set() # slices assembled in a 'Misc Chart' dashboard
|
||||
|
||||
|
||||
def update_slice_ids(layout_dict, slices):
|
||||
|
||||
@@ -23,6 +23,7 @@ from sqlalchemy import DateTime, Float, String
|
||||
|
||||
from superset import db
|
||||
from superset.utils import core as utils
|
||||
|
||||
from .helpers import (
|
||||
get_example_data,
|
||||
get_slice_json,
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
import json
|
||||
import textwrap
|
||||
|
||||
|
||||
from superset import db
|
||||
|
||||
from .helpers import Dash, misc_dash_slices, Slice, update_slice_ids
|
||||
|
||||
DASH_SLUG = "misc_charts"
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
import json
|
||||
|
||||
from superset import db
|
||||
|
||||
from .birth_names import load_birth_names
|
||||
from .helpers import merge_slice, misc_dash_slices, Slice
|
||||
from .world_bank import load_world_bank_health_n_pop
|
||||
|
||||
@@ -20,6 +20,7 @@ from sqlalchemy import BigInteger, Date, DateTime, String
|
||||
|
||||
from superset import db
|
||||
from superset.utils.core import get_example_database
|
||||
|
||||
from .helpers import (
|
||||
config,
|
||||
get_example_data,
|
||||
|
||||
@@ -21,6 +21,7 @@ from sqlalchemy import String, Text
|
||||
|
||||
from superset import db
|
||||
from superset.utils import core as utils
|
||||
|
||||
from .helpers import get_example_data, TBL
|
||||
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@ from sqlalchemy import DateTime
|
||||
|
||||
from superset import db
|
||||
from superset.utils import core as utils
|
||||
|
||||
from .helpers import config, get_example_data, get_slice_json, merge_slice, Slice, TBL
|
||||
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@ from sqlalchemy import BigInteger, Float, Text
|
||||
|
||||
from superset import db
|
||||
from superset.utils import core as utils
|
||||
|
||||
from .helpers import get_example_data, TBL
|
||||
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@ import json
|
||||
import textwrap
|
||||
|
||||
from superset import db
|
||||
|
||||
from .helpers import Dash, Slice, update_slice_ids
|
||||
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@ from sqlalchemy import Date, Float, String
|
||||
|
||||
from superset import db
|
||||
from superset.utils import core as utils
|
||||
|
||||
from .helpers import (
|
||||
config,
|
||||
Dash,
|
||||
|
||||
@@ -27,6 +27,7 @@ from sqlalchemy.sql import column
|
||||
from superset import db
|
||||
from superset.connectors.sqla.models import SqlMetric
|
||||
from superset.utils import core as utils
|
||||
|
||||
from .helpers import (
|
||||
config,
|
||||
Dash,
|
||||
|
||||
Reference in New Issue
Block a user