/third_party/python/Lib/ |
H A D | _py_abc.py | 36 cls = super().__new__(mcls, name, bases, namespace, **kwargs) 43 value = getattr(cls, name, None) 46 cls.__abstractmethods__ = frozenset(abstracts) 48 cls._abc_registry = WeakSet() 49 cls._abc_cache = WeakSet() 50 cls._abc_negative_cache = WeakSet() 51 cls._abc_negative_cache_version = ABCMeta._abc_invalidation_counter 52 return cls 54 def register(cls, subclass): 61 if issubclass(subclass, cls) [all...] |
H A D | abc.py | 36 def my_abstract_classmethod(cls, ...): 106 cls = super().__new__(mcls, name, bases, namespace, **kwargs) 107 _abc_init(cls) 108 return cls 110 def register(cls, subclass): 115 return _abc_register(cls, subclass) 117 def __instancecheck__(cls, instance): 118 """Override for isinstance(instance, cls).""" 119 return _abc_instancecheck(cls, instance) 121 def __subclasscheck__(cls, subclas [all...] |
H A D | dataclasses.py | 260 def __class_getitem__(cls, type): 271 # When cls._FIELDS is filled in with a list of Field objects, the name 470 # (cls.fieldname=defaultvalue). But that won't work for a 599 def _frozen_get_del_attr(cls, fields, globals): 600 locals = {'cls': cls, 609 (f'if type(self) is cls or name in {fields_str}:', 611 f'super(cls, self).__setattr__(name, value)'), 616 (f'if type(self) is cls or name in {fields_str}:', 618 f'super(cls, sel [all...] |
/third_party/FreeBSD/sys/kern/ |
H A D | subr_kobj.c | 80 kobj_class_compile_common(kobj_class_t cls, kobj_ops_t ops) in kobj_class_compile_common() argument 88 if (cls->ops) in kobj_class_compile_common() 94 for (i = 0, m = cls->methods; m->desc; i++, m++) { in kobj_class_compile_common() 104 ops->cls = cls; in kobj_class_compile_common() 105 cls->ops = ops; in kobj_class_compile_common() 109 kobj_class_compile(kobj_class_t cls) in kobj_class_compile() argument 129 if (cls->ops) { in kobj_class_compile() 135 kobj_class_compile_common(cls, ops); in kobj_class_compile() 140 kobj_class_compile_static(kobj_class_t cls, kobj_ops_ argument 154 kobj_lookup_method_class(kobj_class_t cls, kobjop_desc_t desc) kobj_lookup_method_class() argument 169 kobj_lookup_method_mi(kobj_class_t cls, kobjop_desc_t desc) kobj_lookup_method_mi() argument 192 kobj_lookup_method(kobj_class_t cls, kobj_method_t **cep, kobjop_desc_t desc) kobj_lookup_method() argument 207 kobj_class_free(kobj_class_t cls) kobj_class_free() argument 238 kobj_create(kobj_class_t cls, struct malloc_type *mtype, int mflags) kobj_create() argument 256 kobj_init_common(kobj_t obj, kobj_class_t cls) kobj_init_common() argument 264 kobj_init(kobj_t obj, kobj_class_t cls) kobj_init() argument 290 kobj_init_static(kobj_t obj, kobj_class_t cls) kobj_init_static() argument 302 kobj_class_t cls = obj->ops->cls; kobj_delete() local [all...] |
/third_party/python/Lib/idlelib/idle_test/ |
H A D | test_editor.py | 15 def setUpClass(cls): 17 cls.root = Tk() 18 cls.root.withdraw() 21 def tearDownClass(cls): 22 cls.root.update_idletasks() 23 for id in cls.root.tk.call('after', 'info'): 24 cls.root.after_cancel(id) 25 cls.root.destroy() 26 del cls.root 104 def setUpClass(cls) [all...] |
H A D | test_help_about.py | 25 def setUpClass(cls): 27 cls.root = Tk() 28 cls.root.withdraw() 29 cls.dialog = About(cls.root, 'About IDLE', _utest=True) 32 def tearDownClass(cls): 33 del cls.dialog 34 cls.root.update_idletasks() 35 cls.root.destroy() 36 del cls [all...] |
H A D | test_config_key.py | 30 def setUpClass(cls): 32 cls.root = Tk() 33 cls.root.withdraw() 35 cls.dialog = cls.Validator(cls.root, '<<Test>>', keylist) 38 def tearDownClass(cls): 39 del cls.dialog 40 cls.root.update_idletasks() 41 cls [all...] |
H A D | test_autocomplete_w.py | 13 def setUpClass(cls): 15 cls.root = Tk() 16 cls.root.withdraw() 17 cls.text = Text(cls.root) 18 cls.acw = acw.AutoCompleteWindow(cls.text, tags=None) 21 def tearDownClass(cls): 22 del cls.text, cls [all...] |
H A D | test_calltip_w.py | 12 def setUpClass(cls): 14 cls.root = Tk() 15 cls.root.withdraw() 16 cls.text = Text(cls.root) 17 cls.calltip = calltip_w.CalltipWindow(cls.text) 20 def tearDownClass(cls): 21 cls.root.update_idletasks() 22 cls [all...] |
H A D | test_editmenu.py | 18 def setUpClass(cls): 19 cls.root = root = tk.Tk() 20 cls.root.withdraw() 22 cls.text = tk.Text(root) 23 cls.entry = tk.Entry(root) 24 cls.tentry = ttk.Entry(root) 25 cls.spin = tk.Spinbox(root) 30 def tearDownClass(cls): 31 del cls.text, cls [all...] |
H A D | test_zoomheight.py | 14 def setUpClass(cls): 16 cls.root = Tk() 17 cls.root.withdraw() 18 cls.editwin = EditorWindow(root=cls.root) 21 def tearDownClass(cls): 22 cls.editwin._close() 23 cls.root.update_idletasks() 24 for id in cls.root.tk.call('after', 'info'): 25 cls [all...] |
H A D | test_macosx.py | 28 def setUpClass(cls): 30 cls.root = tk.Tk() 31 cls.root.withdraw() 32 cls.orig_platform = macosx.platform 35 def tearDownClass(cls): 36 cls.root.update_idletasks() 37 cls.root.destroy() 38 del cls.root 39 macosx.platform = cls.orig_platform 83 def setUpClass(cls) [all...] |
H A D | test_redirector.py | 13 def setUpClass(cls): 15 cls.root = Tk() 16 cls.root.withdraw() 17 cls.text = Text(cls.root) 20 def tearDownClass(cls): 21 del cls.text 22 cls.root.destroy() 23 del cls.root 43 def setUpClass(cls) [all...] |
H A D | test_format.py | 54 def setUpClass(cls): 56 cls.text = Text() 272 def setUpClass(cls): 274 cls.root = Tk() 275 cls.root.withdraw() 276 editor = Editor(root=cls.root) 277 cls.text = editor.text.text # Test code does not need the wrapper. 278 cls.formatter = ft.FormatParagraph(editor).format_paragraph_event 282 def tearDownClass(cls): 283 del cls [all...] |
H A D | test_iomenu.py | 21 def setUpClass(cls): 23 cls.root = Tk() 24 cls.root.withdraw() 25 cls.editwin = EditorWindow(root=cls.root) 26 cls.io = iomenu.IOBinding(cls.editwin) 29 def tearDownClass(cls): 30 cls.io.close() 31 cls [all...] |
/test/testfwk/xdevice/src/xdevice/_core/context/ |
H A D | channel.py | 29 def append(cls, command): 30 cls._queue.append(command) 33 def pop(cls, index=-1): 34 return cls._queue.pop(index) 37 def get_last(cls): 38 return cls._queue[-1] 41 def get(cls, index: int): 42 return cls._queue[index] 45 def update(cls, index, command): 46 cls [all...] |
H A D | abs.py | 78 def __max_command_size__(cls) -> int: 82 def terminate_cmd_exec(cls): 83 cls._is_running = False 84 result = cls._call_terminate() 90 def is_executing(cls): 91 return cls._is_running 95 def _exec_type_(cls) -> list: 116 def _call_terminate(cls): 121 def _reset_environment(cls, environment="", config_file=""): 129 def is_need_auto_retry(cls) [all...] |
H A D | impl.py | 63 def add_life_stage_listener(cls, listener: ILifeStageListener): 64 cls._stage_listeners.append(listener) 67 def notify_stage(cls, stage_event: StageEvent): 68 for listener in cls._stage_listeners: 72 def remove_life_stage_listener(cls): 73 cls._stage_listeners.clear() 76 def __max_command_size__(cls) -> int: 80 def _start_auto_retry(cls): 81 if not cls.is_need_auto_retry(): 82 cls [all...] |
/test/testfwk/xdevice/src/xdevice/_core/ |
H A D | interface.py | 38 for cls in mro: 39 if method in cls.__dict__: 40 if cls.__dict__[method] is None: 69 def __subclasshook__(cls, class_info): 70 if cls is IDevice: 109 def __subclasshook__(cls, class_info): 110 if cls is IDevice: 125 def check_advance_option(cls, extend_value, **kwargs): 136 def __check_failed__(cls, msg): 163 def __dry_run_execute__(cls, reques [all...] |
/third_party/protobuf/python/google/protobuf/internal/ |
H A D | python_message.py | 107 def __new__(cls, name, bases, dictionary): 156 superclass = super(GeneratedProtocolMessageType, cls) 157 new_class = superclass.__new__(cls, name, bases, dictionary) 160 def __init__(cls, name, bases, dictionary): 183 assert existing_class is cls, ( 188 cls._decoders_by_tag = {} 191 cls._decoders_by_tag[decoder.MESSAGE_SET_ITEM_TAG] = ( 196 _AttachFieldHelpers(cls, field) 198 descriptor._concrete_class = cls # pylint: disable=protected-access 199 _AddEnumValues(descriptor, cls) [all...] |
/third_party/mbedtls/scripts/mbedtls_dev/ |
H A D | bignum_common.py | 224 def get_value_pairs(cls) -> Iterator[Tuple[str, str]]: 230 if cls.arity == 1: 231 yield from ((a, "0") for a in cls.input_values) 232 elif cls.arity == 2: 233 if cls.unique_combinations_only: 234 yield from combination_pairs(cls.input_values) 238 for a in cls.input_values 239 for b in cls.input_values 245 def generate_function_tests(cls) -> Iterator[test_case.TestCase]: 246 if cls [all...] |
/third_party/protobuf/python/google/protobuf/ |
H A D | service_reflection.py | 70 def __init__(cls, name, bases, dictionary): 92 service_builder.BuildService(cls) 93 cls.DESCRIPTOR = descriptor 106 def __init__(cls, name, bases, dictionary): 116 descriptor = dictionary.get(cls._DESCRIPTOR_KEY) 120 super(GeneratedServiceStubType, cls).__init__(name, bases, dictionary) 127 service_stub_builder.BuildServiceStub(cls) 149 def BuildService(self, cls): 153 cls: The class that will be constructed. 163 self.cls [all...] |
/third_party/python/Lib/test/ |
H A D | test_subclassinit.py | 10 def __init_subclass__(cls): 12 cls.initialized = True 24 def __init_subclass__(cls): 26 cls.initialized = True 36 def __init_subclass__(cls, **kwargs): 37 cls.kwargs = kwargs 46 def __init_subclass__(cls): 55 def __init_subclass__(cls, whatever): 64 def __init_subclass__(cls, **kwargs): 66 cls [all...] |
H A D | test_datetime.py | 28 for name, cls in module.__dict__.items(): 29 if not isinstance(cls, type): 31 if issubclass(cls, unittest.TestCase): 32 test_classes.append(cls) 33 elif issubclass(cls, unittest.TestSuite): 34 suit = cls() 36 test_classes = sorted(set(test_classes), key=lambda cls: cls.__qualname__) 37 for cls in test_classes: 38 cls [all...] |
/third_party/python/Lib/json/ |
H A D | __init__.py | 121 allow_nan=True, cls=None, indent=None, separators=None, 161 the ``cls`` kwarg; otherwise ``JSONEncoder`` is used. 167 cls is None and indent is None and separators is None and 171 if cls is None: 172 cls = JSONEncoder 173 iterable = cls(skipkeys=skipkeys, ensure_ascii=ensure_ascii, 184 allow_nan=True, cls=None, indent=None, separators=None, 223 the ``cls`` kwarg; otherwise ``JSONEncoder`` is used. 229 cls is None and indent is None and separators is None and 232 if cls i [all...] |