0

I have an abstract class Foo:

class Foo(ABC):
  def bar(self, arg: Foo):
    pass

I do get this error NameError: name 'Foo' is not defined for type restricting arg to Foo

What can I do to give a valid type hint?

Sven
  • 1,014
  • 1
  • 11
  • 27

0 Answers0