Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(208)

Unified Diff: third_party/typ/typ/arg_parser.py

Issue 2568683002: Roll //third_party/typ to v0.9.9 (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/typ/README.chromium ('k') | third_party/typ/typ/tests/arg_parser_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/typ/typ/arg_parser.py
diff --git a/third_party/typ/typ/arg_parser.py b/third_party/typ/typ/arg_parser.py
index f7a602669816bdd4327fde54febd8972bbb70a9d..31d575d879e4c31e6a432379ac1db712e4d9efdc 100644
--- a/third_party/typ/typ/arg_parser.py
+++ b/third_party/typ/typ/arg_parser.py
@@ -280,6 +280,8 @@ class ArgumentParser(argparse.ArgumentParser):
v = d[k]
argname = _argname_from_key(k)
action = self._action_for_key(k)
+ if not action:
+ continue
action_str = _action_str(action)
if k == 'tests':
tests = v
@@ -310,8 +312,9 @@ class ArgumentParser(argparse.ArgumentParser):
if action.dest == key:
return action
- assert False, ('Could not find an action for %s' # pragma: no cover
- % key)
+ # Assume foreign argument: something used by the embedder of typ, for
+ # example.
+ return None
def _action_str(action):
« no previous file with comments | « third_party/typ/README.chromium ('k') | third_party/typ/typ/tests/arg_parser_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698