Skip to content

Instantly share code, notes, and snippets.

@sanxiyn
Created February 7, 2023 08:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sanxiyn/044c09712c42d37085fd62b267fc840b to your computer and use it in GitHub Desktop.
Save sanxiyn/044c09712c42d37085fd62b267fc840b to your computer and use it in GitHub Desktop.
mypy abs test
class Bar:
def bar(self):
pass
class Foo:
def __abs__(self) -> Bar:
return Bar()
foo = Foo()
afoo = abs(foo)
afoo.bar()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment