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

Method cls

Lib/test/test_ast/test_ast.py:2105–2117  ·  view source on GitHub ↗
(bases=None, keywords=None, body=None, decorator_list=None, type_params=None)

Source from the content-addressed store, hash-verified

2103
2104 def test_classdef(self):
2105 def cls(bases=None, keywords=None, body=None, decorator_list=None, type_params=None):
2106 if bases is None:
2107 bases = []
2108 if keywords is None:
2109 keywords = []
2110 if body is None:
2111 body = [ast.Pass()]
2112 if decorator_list is None:
2113 decorator_list = []
2114 if type_params is None:
2115 type_params = []
2116 return ast.ClassDef("myclass", bases, keywords,
2117 body, decorator_list, type_params)
2118 self.stmt(cls(bases=[ast.Name("x", ast.Store())]),
2119 "must have Load context")
2120 self.stmt(cls(keywords=[ast.keyword("x", ast.Name("x", ast.Store()))]),

Callers 15

test_descriptorsMethod · 0.45
setUpClassMethod · 0.45
test_is_joinableMethod · 0.45
test_vfspathMethod · 0.45
setUpMethod · 0.45
_check_strMethod · 0.45
test_str_windowsMethod · 0.45
test_concrete_classMethod · 0.45
test_concrete_parserMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected