Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add documentation for using-final-decorator-in-unsupported-version #6583

Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
from typing import final


@final
class Playtypus(Animal):
@final
Pierre-Sassoulas marked this conversation as resolved.
Show resolved Hide resolved
def lay_egg(self):
...
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
The message is emitted when the ``final`` decorator is used with a Python version less than 3.8.
The ``final`` decorator was introduced in Python version 3.8.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@


Pierre-Sassoulas marked this conversation as resolved.
Show resolved Hide resolved
class Playtypus(Animal):
def lay_egg(self):
...
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- `PEP 591 <https://peps.python.org/pep-0591/#the-final-decorator>`_