mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-03-04 07:07:45 +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
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue