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

Method _check_conflict

Lib/argparse.py:1785–1797  ·  view source on GitHub ↗
(self, action)

Source from the content-addressed store, hash-verified

1783 raise ValueError(msg)
1784
1785 def _check_conflict(self, action):
1786
1787 # find all options that conflict with this option
1788 confl_optionals = []
1789 for option_string in action.option_strings:
1790 if option_string in self._option_string_actions:
1791 confl_optional = self._option_string_actions[option_string]
1792 confl_optionals.append((option_string, confl_optional))
1793
1794 # resolve any conflicts
1795 if confl_optionals:
1796 conflict_handler = self._get_handler()
1797 conflict_handler(action, confl_optionals)
1798
1799 def _handle_conflict_error(self, action, conflicting_actions):
1800 message = ngettext('conflicting option string: %s',

Callers 1

_add_actionMethod · 0.95

Calls 2

_get_handlerMethod · 0.95
appendMethod · 0.45

Tested by

no test coverage detected