MCPcopy
hub / github.com/numpy/numpy / is_deprecated

Function is_deprecated

tools/refguide_check.py:291–311  ·  view source on GitHub ↗

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

(f)

Source from the content-addressed store, hash-verified

289
290
291def is_deprecated(f):
292 """
293 Check if module `f` is deprecated
294
295 Parameters
296 ----------
297 f : ModuleType
298
299 Returns
300 -------
301 bool
302 """
303 with warnings.catch_warnings(record=True) as w:
304 warnings.simplefilter("error")
305 try:
306 f(**{"not a kwarg": None})
307 except DeprecationWarning:
308 return True
309 except Exception:
310 pass
311 return False
312
313
314def check_items(all_dict, names, deprecated, others, module_name, dots=True):

Callers 1

get_all_dictFunction · 0.85

Calls 1

fFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…