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

Function process_keywords

Tools/i18n/pygettext.py:393–410  ·  view source on GitHub ↗
(keywords, *, no_default_keywords)

Source from the content-addressed store, hash-verified

391
392
393def process_keywords(keywords, *, no_default_keywords):
394 custom_keywords = {}
395 for spec in dict.fromkeys(keywords):
396 name, spec = parse_spec(spec)
397 if name not in custom_keywords:
398 custom_keywords[name] = []
399 custom_keywords[name].append(spec)
400
401 if no_default_keywords:
402 return custom_keywords
403
404 # custom keywords override default keywords
405 for name, spec in DEFAULTKEYWORDS.items():
406 if name not in custom_keywords:
407 custom_keywords[name] = []
408 if spec not in custom_keywords[name]:
409 custom_keywords[name].append(spec)
410 return custom_keywords
411
412
413@dataclass(frozen=True)

Callers 2

test_process_keywordsMethod · 0.90
mainFunction · 0.85

Calls 4

parse_specFunction · 0.85
fromkeysMethod · 0.45
appendMethod · 0.45
itemsMethod · 0.45

Tested by 1

test_process_keywordsMethod · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…