diff --git a/pyproject.toml b/pyproject.toml index 2e65e24a6dbb..261eacbf0c94 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -89,7 +89,7 @@ black = { version = "==23.3.0", extras = ["jupyter"] } docformatter = "==1.7.5" mypy = "==1.5.1" pylint = "==2.13.9" -flake8 = "==3.9.2" +flake8 = "==5.0.4" pytest = "==7.4.0" pytest-cov = "==3.0.0" pytest-watch = "==4.2.0" diff --git a/src/py/flwr/server/state/sqlite_state.py b/src/py/flwr/server/state/sqlite_state.py index 7bc323f17929..f3ff60f370e9 100644 --- a/src/py/flwr/server/state/sqlite_state.py +++ b/src/py/flwr/server/state/sqlite_state.py @@ -146,10 +146,8 @@ def query( with self.conn: if ( len(data) > 0 - # pylint: disable-next=C0123 - and (type(data) == tuple or type(data) == list) - # pylint: disable-next=C0123 - and (type(data[0]) == tuple or type(data[0]) == dict) + and isinstance(data, (tuple, list)) + and isinstance(data[0], (tuple, dict)) ): rows = self.conn.executemany(query, data) else: