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

Function _command_line_ok

numpy/distutils/core.py:73–91  ·  view source on GitHub ↗

Return True if command line does not contain any help or display requests.

(_cache=None)

Source from the content-addressed store, hash-verified

71 raise TypeError(repr(type(dv)))
72
73def _command_line_ok(_cache=None):
74 """ Return True if command line does not contain any
75 help or display requests.
76 """
77 if _cache:
78 return _cache[0]
79 elif _cache is None:
80 _cache = []
81 ok = True
82 display_opts = ['--'+n for n in Distribution.display_option_names]
83 for o in Distribution.display_options:
84 if o[1]:
85 display_opts.append('-'+o[1])
86 for arg in sys.argv:
87 if arg.startswith('--help') or arg=='-h' or arg in display_opts:
88 ok = False
89 break
90 _cache.append(ok)
91 return ok
92
93def get_distribution(always=False):
94 dist = distutils.core._setup_distribution

Callers 1

setupFunction · 0.85

Calls 1

startswithMethod · 0.80

Tested by

no test coverage detected