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

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Joe Farebrother
2025-07-31 06:05:25 +01:00
committed by GitHub
parent 1efc09bbba
commit 71a6b22815

View File

@@ -2,7 +2,7 @@ class A:
def __init__(self): def __init__(self):
self._foo = 3 self._foo = 3
class B: class B(A):
# BAD: _foo is shadowed by attribute A._foo # BAD: _foo is shadowed by attribute A._foo
def _foo(self): def _foo(self):
return 2 return 2