MCPcopy Create free account
hub / github.com/davidaurelio/hashids-python / _deprecated

Function _deprecated

hashids.py:151–162  ·  view source on GitHub ↗

A decorator that warns about deprecation when the passed-in function is invoked.

(func, name)

Source from the content-addressed store, hash-verified

149
150
151def _deprecated(func, name):
152 """A decorator that warns about deprecation when the passed-in function is
153 invoked."""
154 @wraps(func)
155 def with_warning(*args, **kwargs):
156 warnings.warn(
157 ('The %s method is deprecated and will be removed in v2.*.*' %
158 name),
159 DeprecationWarning
160 )
161 return func(*args, **kwargs)
162 return with_warning
163
164
165class Hashids(object):

Callers 1

__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected