Skip to content

Commit

Permalink
Deprecate passing doc to Property (#1457)
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielNoord authored Mar 9, 2022
1 parent 9aa1228 commit 43ea7a0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion astroid/objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,11 +317,14 @@ def qname(self):
class Property(scoped_nodes.FunctionDef):
"""Class representing a Python property"""

@decorators.deprecate_arguments(doc="Use the postinit arg 'doc_node' instead")
def __init__(
self, function, name=None, doc=None, lineno=None, col_offset=None, parent=None
):
self.function = function
super().__init__(name, doc, lineno, col_offset, parent)
super().__init__(name, lineno=lineno, col_offset=col_offset, parent=parent)
# Assigned directly to prevent triggering the DeprecationWarning.
self._doc = doc

# pylint: disable=unnecessary-lambda
special_attributes = util.lazy_descriptor(lambda: objectmodel.PropertyModel())
Expand Down

0 comments on commit 43ea7a0

Please sign in to comment.