Skip to content

Commit

Permalink
chore: fix some typos in comments
Browse files Browse the repository at this point in the history
Signed-off-by: alwayshang <[email protected]>
  • Loading branch information
alwayshang committed Apr 24, 2024
1 parent fdf54f6 commit 7fff11b
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion slither/detectors/compiler_bugs/reused_base_constructor.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class ReusedBaseConstructor(AbstractDetector):
ARGUMENT = "reused-constructor"
HELP = "Reused base constructor"
IMPACT = DetectorClassification.MEDIUM
# The confidence is medium, because prior Solidity 0.4.22, we cant differentiate
# The confidence is medium, because prior Solidity 0.4.22, we can't differentiate
# contract C is A() {
# to
# contract C is A {
Expand Down
2 changes: 1 addition & 1 deletion slither/solc_parsing/declarations/contract.py
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@ def _analyze_params_elements( # pylint: disable=too-many-arguments,too-many-loc
def analyze_constant_state_variables(self) -> None:
for var_parser in self._variables_parser:
if var_parser.underlying_variable.is_constant:
# cant parse constant expression based on function calls
# can't parse constant expression based on function calls
try:
var_parser.analyze(self)
except (VariableNotFound, KeyError) as e:
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/core/test_source_mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def test_source_mapping_inheritance(solc_binary_path, solc_version):
assert {(x.start, x.end) for x in slither.offset_to_implementations(file, 203)} == {(193, 230)}

# Offset 93 is the call to f() in A.test()
# This can lead to three differents functions, depending on the current contract's context
# This can lead to three different functions, depending on the current contract's context
functions = slither.offset_to_objects(file, 93)
print(functions)
assert len(functions) == 3
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/slithir/test_data/ternary_expressions.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ contract C {
// TODO
// 1) support variable declarations
//uint min = 1 > 0 ? 1 : 2;
// 2) suppory ternary index range access
// 2) support ternary index range access
// function e(bool cond, bytes calldata x) external {
// bytes memory a = x[cond ? 1 : 2 :];
// }
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/slithir/test_ssa_generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ def test_storage_refers_to(slither_from_solidity_source):
When a phi-node is created, ensure refers_to is propagated to the phi-node.
Assignments also propagate refers_to.
Whenever a ReferenceVariable is the destination of an assignment (e.g. s.v = 10)
below, create additional versions of the variables it refers to record that a a
below, create additional versions of the variables it refers to record that a
write was made. In the current implementation, this is referenced by phis.
"""
source = """
Expand Down Expand Up @@ -550,7 +550,7 @@ def test_storage_refers_to(slither_from_solidity_source):
entryphi = [x for x in phinodes if x.lvalue in sphi.lvalue.refers_to]
assert len(entryphi) == 2

# The remaining two phis are the ones recording that write through ReferenceVariable occured
# The remaining two phis are the ones recording that write through ReferenceVariable occurred
for ephi in entryphi:
phinodes.remove(ephi)
phinodes.remove(sphi)
Expand Down

0 comments on commit 7fff11b

Please sign in to comment.