MCPcopy Index your code
hub / github.com/datacamp/pythonwhat / get_arg_part

Method get_arg_part

pythonwhat/parsing.py:168–182  ·  view source on GitHub ↗
(_arg, _def, type=None)

Source from the content-addressed store, hash-verified

166
167 @staticmethod
168 def get_arg_part(_arg, _def, type=None):
169 # type is arg, kwonly, kwarg, vararg
170 if not _arg:
171 return None
172
173 # part uses default highlighting, so will highlight "node" entry
174 return {
175 "node": _def or _arg,
176 "arg": _arg,
177 # TODO: need to fill out
178 "type": type,
179 "is_default": True if _def else False,
180 "name": _arg.arg,
181 "annotation": _arg.annotation,
182 }
183
184
185# class OperatorParser(Parser):

Callers 2

get_arg_partsMethod · 0.80
parse_nodeMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected