summaryrefslogtreecommitdiff
path: root/test/test_graph
diff options
context:
space:
mode:
authorIwan Aucamp <aucampia@gmail.com>2023-04-14 21:26:10 +0200
committerGitHub <noreply@github.com>2023-04-14 21:26:10 +0200
commitcbd61510ec581aee262bc2bb8ad95d94f7784842 (patch)
treeabd7f64b89dd3b4bed049af8a157e860396faf31 /test/test_graph
parent4ea14367ffa2c05e5c288842982dcc3cdd194dd6 (diff)
downloadrdflib-cbd61510ec581aee262bc2bb8ad95d94f7784842.tar.gz
test: Eliminate flake8 errors in tests (#2353)
Eliminate some occurrences of the following flake8 errors in tests: * E265 block comment should start with '# ' * E266 too many leading '#' for block comment * E402 module level import not at top of file * E712 comparison to False should be 'if cond is False:' or 'if not cond:' * E712 comparison to True should be 'if cond is True:' or 'if cond:' * E722 do not use bare 'except' * F401 ... imported but unused * F403 ... used; unable to detect undefined names * F405 ... may be undefined, or defined from star imports: ... * F541 f-string is missing placeholders * F841 local variable 'result' is assigned to but never used * N806 variable 'TEST_DIR' in function should be lowercase This is pursuant to eliminating [flakeheaven](https://github.com/flakeheaven/flakeheaven), as it no longer supports the latest version of flake8 [[ref](https://github.com/flakeheaven/flakeheaven/issues/132)].
Diffstat (limited to 'test/test_graph')
-rw-r--r--test/test_graph/test_graph_formula.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/test_graph/test_graph_formula.py b/test/test_graph/test_graph_formula.py
index 6f1092ca..32b3aef7 100644
--- a/test/test_graph/test_graph_formula.py
+++ b/test/test_graph/test_graph_formula.py
@@ -115,7 +115,7 @@ def checkFormulaStore(store="default", configString=None):
os.unlink(path)
else:
g.store.destroy(configString)
- except:
+ except Exception:
g.close()
if store == "SQLite":
os.unlink(path)