mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Update python/ql/src/Classes/SubclassShadowing/examples/SubclassShadowingBad.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -2,7 +2,7 @@ class A:
|
||||
def __init__(self):
|
||||
self._foo = 3
|
||||
|
||||
class B:
|
||||
class B(A):
|
||||
# BAD: _foo is shadowed by attribute A._foo
|
||||
def _foo(self):
|
||||
return 2
|
||||
|
||||
Reference in New Issue
Block a user