Skip to content

Commit

Permalink
feat: remove deprecated Corgy.new_with_args
Browse files Browse the repository at this point in the history
  • Loading branch information
jayanthkoushik committed Dec 2, 2021
1 parent a44170e commit 1c0b270
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions corgy/_corgy.py
Expand Up @@ -19,7 +19,6 @@
TypeVar,
Union,
)
from warnings import warn

from ._helpfmt import CorgyHelpFormatter

Expand Down Expand Up @@ -533,16 +532,6 @@ def __init__(self, **args):
grp_obj = grp_type(**grp_args)
setattr(self, grp_name, grp_obj)

@classmethod
def new_with_args(cls: Type[_T], **args) -> _T:
#: :meta private:
warn(
f"this method is deprecated: use `{cls.__name__}(**args)` "
f"to create a new instance",
DeprecationWarning,
)
return cls(**args)

def __repr__(self):
s = f"{self.__class__.__name__}("
for i, arg_name in enumerate(getattr(self.__class__, "__annotations__")):
Expand Down

0 comments on commit 1c0b270

Please sign in to comment.