Skip to content

Commit 5e09c1d

Browse files
Merge remote-tracking branch 'origin/python-qual-subclass-shadow' into python-qual-subclass-shadow
2 parents bc60914 + 79d1deb commit 5e09c1d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

python/ql/src/Classes/SubclassShadowing/SubclassShadowing.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ where
6464
if isProperty(shadowed)
6565
then
6666
// it's not a setter, so it's a read-only property
67-
extra = " (read-only property may cause an error if written to in the superclass.)"
67+
extra = " (read-only property may cause an error if written to in the superclass)"
6868
else extra = ""
6969
)
7070
select shadowed, "This method is shadowed by $@ in superclass $@." + extra, write,

python/ql/src/Classes/SubclassShadowing/examples/SubclassShadowingBad.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ class A:
22
def __init__(self):
33
self._foo = 3
44

5-
class B:
5+
class B(A):
66
# BAD: _foo is shadowed by attribute A._foo
77
def _foo(self):
88
return 2

0 commit comments

Comments
 (0)