Skip to content

Commit

Permalink
bugfixes & fix pylint
Browse files Browse the repository at this point in the history
  • Loading branch information
bohendo committed Jan 27, 2025
1 parent 87fb412 commit af8e5cf
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions slither/tools/mutator/mutators/LIR.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def _mutate(self) -> Dict: # pylint: disable=too-many-branches
# Get the string
start = variable.source_mapping.start
stop = start + variable.source_mapping.length
old_str = node.source_mapping.content
old_str = variable.source_mapping.content
line_no = variable.node_initialization.source_mapping.lines
if not line_no[0] in self.dont_mutate_line:
for value in literal_replacements:
Expand Down Expand Up @@ -67,7 +67,7 @@ def _mutate(self) -> Dict: # pylint: disable=too-many-branches
literal_replacements.append("-1")
start = variable.source_mapping.start
stop = start + variable.source_mapping.length
old_str = node.source_mapping.content
old_str = variable.source_mapping.content
line_no = variable.source_mapping.lines
if not line_no[0] in self.dont_mutate_line:
for new_value in literal_replacements:
Expand Down
4 changes: 2 additions & 2 deletions slither/tools/mutator/mutators/MVIV.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def _mutate(self) -> Dict:
# Get the string
start = variable.source_mapping.start
stop = variable.expression.source_mapping.start
old_str = node.source_mapping.content
old_str = variable.source_mapping.content
new_str = old_str[: old_str.find("=")]
line_no = variable.node_initialization.source_mapping.lines
if not line_no[0] in self.dont_mutate_line:
Expand All @@ -43,7 +43,7 @@ def _mutate(self) -> Dict:
if variable.initialized and isinstance(variable.expression, Literal):
start = variable.source_mapping.start
stop = variable.expression.source_mapping.start
old_str = node.source_mapping.content
old_str = variable.source_mapping.content
new_str = old_str[: old_str.find("=")]
line_no = variable.source_mapping.lines
if not line_no[0] in self.dont_mutate_line:
Expand Down
1 change: 1 addition & 0 deletions slither/tools/mutator/mutators/abstract_mutator.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ def _mutate(self) -> Dict:
# pylint: disable=too-many-branches
def mutate(self) -> Tuple[List[int], List[int], List[int]]:
all_patches: Dict = {}
# pylint: disable=broad-exception-caught
try:
# call _mutate function from different mutators
(all_patches) = self._mutate()
Expand Down

0 comments on commit af8e5cf

Please sign in to comment.