MCPcopy Create free account
hub / github.com/numpy/numpy / is_deprecated

Function is_deprecated

tools/refguide_check.py:336–356  ·  view source on GitHub ↗

Check if module `f` is deprecated Parameters ---------- f : ModuleType Returns ------- bool

(f)

Source from the content-addressed store, hash-verified

334
335
336def is_deprecated(f):
337 """
338 Check if module `f` is deprecated
339
340 Parameters
341 ----------
342 f : ModuleType
343
344 Returns
345 -------
346 bool
347 """
348 with warnings.catch_warnings(record=True) as w:
349 warnings.simplefilter("error")
350 try:
351 f(**{"not a kwarg":None})
352 except DeprecationWarning:
353 return True
354 except Exception:
355 pass
356 return False
357
358
359def check_items(all_dict, names, deprecated, others, module_name, dots=True):

Callers 1

get_all_dictFunction · 0.85

Calls 1

fFunction · 0.85

Tested by

no test coverage detected