mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #12445 from ethereum/pylint-enable-more-warnings
[pylint] Enable more warnings
This commit is contained in:
+2
-1
@@ -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
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user