diff options
author | ViRuSTriNiTy <cradle-of-mail@gmx.de> | 2023-04-26 21:43:13 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-26 21:43:13 +0200 |
commit | 5d82d7bb6b94a3a6a4d7a4861262519e62916881 (patch) | |
tree | 5768cea98251c8c909ec33b01949ae2505044a75 /tests/data/nullable_pattern.py | |
parent | e2d6c4db610be73ccaa89c9c40509da8b11854ab (diff) | |
download | pylint-git-5d82d7bb6b94a3a6a4d7a4861262519e62916881.tar.gz |
Added escaping of vertical bar character in annotation labels (#8610)
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 |