MCPcopy Index your code
hub / github.com/python/cpython / OptionError

Class OptionError

Lib/optparse.py:97–111  ·  view source on GitHub ↗

Raised if an Option instance is created with invalid or inconsistent arguments.

Source from the content-addressed store, hash-verified

95
96
97class OptionError (OptParseError):
98 """
99 Raised if an Option instance is created with invalid or
100 inconsistent arguments.
101 """
102
103 def __init__(self, msg, option):
104 self.msg = msg
105 self.option_id = str(option)
106
107 def __str__(self):
108 if self.option_id:
109 return "option %s: %s" % (self.option_id, self.msg)
110 else:
111 return self.msg
112
113class OptionConflictError (OptionError):
114 """

Callers 8

_set_opt_stringsMethod · 0.85
_set_attrsMethod · 0.85
_check_actionMethod · 0.85
_check_typeMethod · 0.85
_check_choiceMethod · 0.85
_check_constMethod · 0.85
_check_nargsMethod · 0.85
_check_callbackMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…