diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7603cd9b9b..c12911e6ec 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -22,7 +22,7 @@ repos: - flake8-debugger - flake8-string-format repo: https://gitlab.com/pycqa/flake8 - rev: 3.7.9 + rev: 3.8.3 - repo: local hooks: - id: pylint diff --git a/dvc/repo/plots/data.py b/dvc/repo/plots/data.py index 9ff23ccf90..91eed9abbd 100644 --- a/dvc/repo/plots/data.py +++ b/dvc/repo/plots/data.py @@ -114,10 +114,12 @@ def _find_data(data, fields=None, **kwargs): # just look for first list of dicts fields = set() - for l in _lists(data): - if all(isinstance(dp, dict) for dp in l): - if set(first(l).keys()) & fields == fields: - return l + for lst in _lists(data): + if ( + all(isinstance(dp, dict) for dp in lst) + and set(first(lst).keys()) & fields == fields + ): + return lst raise PlotDataStructureError() diff --git a/setup.py b/setup.py index 300b5a23bc..687f7353c1 100644 --- a/setup.py +++ b/setup.py @@ -119,7 +119,7 @@ def run(self): "google-compute-engine==2.8.13", "Pygments", # required by collective.checkdocs, "collective.checkdocs", - "flake8==3.7.9", + "flake8==3.8.3", "psutil", "flake8-docstrings", "pydocstyle<4.0", diff --git a/tests/remotes/__init__.py b/tests/remotes/__init__.py index 6a5b80166e..4cd648f7ed 100644 --- a/tests/remotes/__init__.py +++ b/tests/remotes/__init__.py @@ -9,14 +9,6 @@ from .oss import OSS, TEST_OSS_REPO_BUCKET, oss, oss_server # noqa: F401 from .s3 import S3, TEST_AWS_REPO_BUCKET, real_s3, s3 # noqa: F401 -TEST_REMOTE = "upstream" -TEST_CONFIG = { - "cache": {}, - "core": {"remote": TEST_REMOTE}, - "remote": {TEST_REMOTE: {"url": ""}}, -} - - from .gdrive import ( # noqa: F401; noqa: F401 TEST_GDRIVE_REPO_BUCKET, GDrive, @@ -35,6 +27,13 @@ ssh_server, ) +TEST_REMOTE = "upstream" +TEST_CONFIG = { + "cache": {}, + "core": {"remote": TEST_REMOTE}, + "remote": {TEST_REMOTE: {"url": ""}}, +} + @pytest.fixture(scope="session") def docker():