[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
This commit is contained in:
pre-commit-ci[bot] 2023-09-10 13:22:25 +00:00
parent bfe178328e
commit 4acba74133
1 changed files with 11 additions and 11 deletions

View File

@ -127,20 +127,20 @@ _NodeType = TypeVar("_NodeType", bound="Node")
class NodeMeta(type): class NodeMeta(type):
"""Metaclass used by :class:`Node` to enforce that direct construction raises """Metaclass used by :class:`Node` to enforce that direct construction raises
:class:`Failed`. :class:`Failed`.
This behaviour supports the indirection introduced with :meth:`Node.from_parent`, This behaviour supports the indirection introduced with :meth:`Node.from_parent`,
the named constructor to be used instead of direct construction. The design the named constructor to be used instead of direct construction. The design
decision to enforce indirection with :class:`NodeMeta` was made as a decision to enforce indirection with :class:`NodeMeta` was made as a
temporary aid for refactoring the collection tree, which was diagnosed to temporary aid for refactoring the collection tree, which was diagnosed to
have :class:`Node` objects whose creational patterns were overly entangled. have :class:`Node` objects whose creational patterns were overly entangled.
Once the refactoring is complete, this metaclass can be removed. Once the refactoring is complete, this metaclass can be removed.
See https://github.com/pytest-dev/pytest/projects/3 for an overview of the See https://github.com/pytest-dev/pytest/projects/3 for an overview of the
progress on detangling the :class:`Node` classes. progress on detangling the :class:`Node` classes.
""" """
def __call__(self, *k, **kw): def __call__(self, *k, **kw):
msg = ( msg = (
"Direct construction of {name} has been deprecated, please use {name}.from_parent.\n" "Direct construction of {name} has been deprecated, please use {name}.from_parent.\n"