MCPcopy Index your code
hub / github.com/RustPython/RustPython / _check_conflict

Method _check_conflict

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

Source from the content-addressed store, hash-verified

1701 raise ValueError(msg)
1702
1703 def _check_conflict(self, action):
1704
1705 # find all options that conflict with this option
1706 confl_optionals = []
1707 for option_string in action.option_strings:
1708 if option_string in self._option_string_actions:
1709 confl_optional = self._option_string_actions[option_string]
1710 confl_optionals.append((option_string, confl_optional))
1711
1712 # resolve any conflicts
1713 if confl_optionals:
1714 conflict_handler = self._get_handler()
1715 conflict_handler(action, confl_optionals)
1716
1717 def _handle_conflict_error(self, action, conflicting_actions):
1718 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