update flake8 to latest version (#4403)

This commit is contained in:
Saugat Pachhai
2020-08-17 14:26:10 +05:45
committed by GitHub
parent 44392941af
commit 1cfccef22e
4 changed files with 15 additions and 14 deletions
+1 -1
View File
@@ -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
+6 -4
View File
@@ -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()
+1 -1
View File
@@ -119,7 +119,7 @@ tests_requirements = [
"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",
+7 -8
View File
@@ -9,14 +9,6 @@ from .local import Local, local_cloud, local_remote # noqa: F401
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 @@ from .ssh import ( # noqa: F401; noqa: F401
ssh_server,
)
TEST_REMOTE = "upstream"
TEST_CONFIG = {
"cache": {},
"core": {"remote": TEST_REMOTE},
"remote": {TEST_REMOTE: {"url": ""}},
}
@pytest.fixture(scope="session")
def docker():