Skip to content

Commit d1bd722

Browse files
Fix typos
1 parent 547c03c commit d1bd722

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

python/ql/src/Classes/InitCallsSubclass/InitCallsSubclassMethod.qhelp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ is mentioned in the documentation.
3030
</recommendation>
3131
<example>
3232
<p>In the following case, the <code>__init__</code> method of <code>Super</code> calls the <code>set_up</code> method that is overridden by <code>Sub</code>.
33-
This results in `Sun.set_up` being called with a partially initialized instance of `Super` which may be unexpected. </p>
33+
This results in <code>Sub.set_up</code> being called with a partially initialized instance of <code>Super</code> which may be unexpected. </p>
3434
<sample src="examples/InitCallsSubclassMethodBad.py" />
3535
<p>In the following case, the initialization methods are separate between the superclass and the subclass.</p>
3636
<sample src="examples/InitCallsSubclassMethodGood.py" />

python/ql/test/query-tests/Classes/init-calls-subclass-method/init_calls_subclass.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def good3():
4848
class Super:
4949
def __init__(self, arg):
5050
self.a = arg
51-
self.set_b() # OK: Here `set_b` is used for initialisation, but does not read the partialy initialized state of `self`.
51+
self.set_b() # OK: Here `set_b` is used for initialization, but does not read the partially initialized state of `self`.
5252
self.c = 1
5353

5454
def set_b(self):
@@ -63,7 +63,7 @@ class Super:
6363
def __init__(self, arg):
6464
self.a = arg
6565
# OK: Here `_set_b` is likely an internal method (as indicated by the _ prefix).
66-
# We assume thus that regular consumers of the library will not override it, and classes that do are internal and account for `self`'s partially initialised state.
66+
# We assume thus that regular consumers of the library will not override it, and classes that do are internal and account for `self`'s partially initialized state.
6767
self._set_b()
6868
self.c = 1
6969

0 commit comments

Comments
 (0)