Make SlitherSolc parse_contracts_from_json / analyze_contracts private

pull/15/head
Josselin 6 years ago
parent d3265490ea
commit 32ade9df33
  1. 4
      slither/slither.py
  2. 4
      slither/solcParsing/slitherSolc.py

@ -26,9 +26,9 @@ class Slither(SlitherSolc):
super(Slither, self).__init__(filename)
for d in stdout:
self.parse_contracts_from_json(d)
self._parse_contracts_from_json(d)
self.analyze_contracts()
self._analyze_contracts()
def register_detector(self, detector_class):
"""

@ -17,7 +17,7 @@ class SlitherSolc(Slither):
self._contracts_by_id = {}
self._analyzed = False
def parse_contracts_from_json(self, json_data):
def _parse_contracts_from_json(self, json_data):
first = json_data.find('{')
if first != -1:
last = json_data.rfind('}') + 1
@ -72,7 +72,7 @@ class SlitherSolc(Slither):
self._source_units[sourceUnit] = name
def analyze_contracts(self):
def _analyze_contracts(self):
if self._analyzed:
raise Exception('Contract analysis can be run only once!')

Loading…
Cancel
Save