Merge pull request #12445 from ethereum/pylint-enable-more-warnings

[pylint] Enable more warnings
This commit is contained in:
chriseth
2021-12-21 18:20:52 +01:00
committed by GitHub
12 changed files with 81 additions and 84 deletions
+2 -1
View File
@@ -39,6 +39,7 @@ class Rule:
self.error('Rule is incorrect.\nModel: ' + str(m))
self.solver.pop()
def error(self, msg):
@classmethod
def error(cls, msg):
print(msg)
sys.exit(1)
+5 -4
View File
@@ -5,6 +5,7 @@ import fnmatch
import json
import os
import subprocess
import sys
import traceback
from typing import Any, List, Optional, Tuple, Union
@@ -49,7 +50,7 @@ class JsonRpcProcess:
# Note, we should make use of timeout to avoid infinite blocking if nothing is received.
CONTENT_LENGTH_HEADER = "Content-Length: "
CONTENT_TYPE_HEADER = "Content-Type: "
if self.process.stdout == None:
if self.process.stdout is None:
return None
message_size = None
while True:
@@ -83,7 +84,7 @@ class JsonRpcProcess:
return json_object
def send_message(self, method_name: str, params: Optional[dict]) -> None:
if self.process.stdin == None:
if self.process.stdin is None:
return
message = {
'jsonrpc': '2.0',
@@ -245,7 +246,7 @@ class SolidityLSPTestSuite: # {{{
}
}
}
if expose_project_root == False:
if not expose_project_root:
params['rootUri'] = None
lsp.call_method('initialize', params)
lsp.send_notification('initialized')
@@ -871,4 +872,4 @@ class SolidityLSPTestSuite: # {{{
if __name__ == "__main__":
suite = SolidityLSPTestSuite()
exit_code = suite.main()
exit(exit_code)
sys.exit(exit_code)