mirror of
https://github.com/bitcoin/bitcoin.git
synced 2024-11-19 01:42:58 +01:00
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: """
This commit is contained in:
parent
fa6bb85cd2
commit
fa3d72960b
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user