diff options
Diffstat (limited to 'tests/data/nullable_pattern.py')
-rw-r--r-- | tests/data/nullable_pattern.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/data/nullable_pattern.py b/tests/data/nullable_pattern.py new file mode 100644 index 000000000..bd730bbd6 --- /dev/null +++ b/tests/data/nullable_pattern.py @@ -0,0 +1,10 @@ +""" docstring for file nullable_pattern.py """ +from typing import Optional + +class NullablePatterns: + def return_nullable_1(self) -> int | None: + """ Nullable return type using the | operator as mentioned in PEP 604, see https://peps.python.org/pep-0604 """ + pass + + def return_nullable_2(self) -> Optional[int]: + pass |