Skip to content

Commit

Permalink
[test project] Add example of inheritance needing symbol resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
jecisc committed Nov 5, 2024
1 parent c8608a5 commit 966f474
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions resources/examples/project1/src/moduleAtRoot2.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@ class Student(Person):
s = Student("Stolys", 19)
s.printInfos()

# The parser should probably import the module before the root package. Here I want to check the symbol resolution of superclasses
from root import Animal


class Fish(Animal):
pass


class ClassWithTuples:
cvarTuple1, cvarTuple2, cvarTuple3 = ("a", "b", "c")
Expand Down
7 changes: 7 additions & 0 deletions resources/examples/project1/src/root/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,10 @@

def function_with_common_name():
return False


class Animal:
name = ""

def eat(self):
print("I can eat")

0 comments on commit 966f474

Please sign in to comment.