[lint] support optional newlines when linting python's open function
Summary:
This prevents false positives when linting code like this one:
with open( os.path.join(os.path.dirname(__file__), "ignore-logs.txt"), "rb" ) as ignoreList: self.ignoreList = ignoreList.readlines()
Test Plan:
Remove a few encoding="utf-8" in python code and check that the linter still detects them, with or without newlines.
arc lint --everything
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D13893