Skip to content

Commit

Permalink
last_jump has type int but is used as type None. (#1670)
Browse files Browse the repository at this point in the history
* last_jump has type `int` but is used as type `None`.

"filename": "mythril/analysis/module/modules/exceptions.py"
"warning_type": "Incompatible variable type [9]"
"warning_message": " last_jump is declared to have type `int` but is used as type `None`."
"warning_line": 28
"fix": None to 0

* Update exceptions.py

* Fix typo

* Add import

Co-authored-by: Nikhil Parasaram <[email protected]>
Co-authored-by: norhh <[email protected]>
  • Loading branch information
3 people authored Aug 25, 2022
1 parent 8590de9 commit 8d863fb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mythril/analysis/module/modules/exceptions.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""This module contains the detection code for reachable exceptions."""
import logging

from typing import List, cast
from typing import cast, List, Optional
from mythril.analysis import solver
from mythril.analysis.issue_annotation import IssueAnnotation
from mythril.analysis.module.base import DetectionModule, EntryPoint
Expand All @@ -25,7 +25,7 @@
class LastJumpAnnotation(StateAnnotation):
"""State Annotation used if an overflow is both possible and used in the annotated path"""

def __init__(self, last_jump: int = None) -> None:
def __init__(self, last_jump: Optional[int] = None) -> None:
self.last_jump: int = last_jump

def __copy__(self):
Expand Down

0 comments on commit 8d863fb

Please sign in to comment.