aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>2023-07-06 16:07:20 +0200
committerMarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>2023-07-20 09:15:43 +0200
commitfa3d72960bc86319aa8b838e3df4e833f845c71f (patch)
treeddb76d61aa4c8dcee28d1b242c8c1bd35d0c283e /test
parentfa6bb85cd264adf2e1f0c71fa97b650f9a62745f (diff)
downloadbitcoin-fa3d72960bc86319aa8b838e3df4e833f845c71f.tar.xz
lint: Ignore check_fileopens failure on **kwargs
This fixes a bug in the linter: """ Python's open(...) seems to be used to open text files without explicitly specifying encoding='utf8': test/functional/test_framework/test_node.py: with open(self.debug_log_path, **kwargs) as dl: """
Diffstat (limited to 'test')
-rwxr-xr-xtest/lint/lint-python-utf8-encoding.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/lint/lint-python-utf8-encoding.py b/test/lint/lint-python-utf8-encoding.py
index 64d04bff57..8c9266470f 100755
--- a/test/lint/lint-python-utf8-encoding.py
+++ b/test/lint/lint-python-utf8-encoding.py
@@ -28,7 +28,7 @@ def check_fileopens():
if e.returncode > 1:
raise e
- filtered_fileopens = [fileopen for fileopen in fileopens if not re.search(r"encoding=.(ascii|utf8|utf-8).|open\([^,]*, ['\"][^'\"]*b[^'\"]*['\"]", fileopen)]
+ filtered_fileopens = [fileopen for fileopen in fileopens if not re.search(r"encoding=.(ascii|utf8|utf-8).|open\([^,]*, (\*\*kwargs|['\"][^'\"]*b[^'\"]*['\"])", fileopen)]
return filtered_fileopens