From a35fce27875d9db80dce1976b6f8ee8c00ecfe0a Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Mon, 21 Feb 2022 16:23:06 +0300 Subject: Fix a myriad of linter issues * Use `with` in place of plain `open` * Use f-strings in place of `str.format()` * Remove string interpolation from queries - provide data as query parameters * other minor fixes --- tests/unit/test_file_utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests/unit/test_file_utils.py') diff --git a/tests/unit/test_file_utils.py b/tests/unit/test_file_utils.py index 77fea88..7048d43 100644 --- a/tests/unit/test_file_utils.py +++ b/tests/unit/test_file_utils.py @@ -92,7 +92,8 @@ extracting the file""" test_dir = "/tmp/QmQPeNsJPyVWPFDVHb77w8G42Fvo15z4bG2X8D2GhfbSXc-test" if not os.path.exists(test_dir): os.mkdir(test_dir) - open(f"{test_dir}/genotype.txt", "a").close() + with open(f"{test_dir}/genotype.txt", "a", encoding="utf8"): + pass file_loc = cache_ipfs_file( ipfs_file=("/ipfs/" "QmQPeNsJPyVWPFDVHb" -- cgit v1.2.3