/third_party/python/Lib/idlelib/ |
H A D | zoomheight.py | 17 def __init__(self, editwin): 18 self.editwin = editwin 19 self.top = self.editwin.top 21 def zoom_height_event(self, event=None): 22 zoomed = self.zoom_height() 25 self.top.bell() 28 self.editwin.update_menu_label(menu='options', index='* Height', 33 def zoom_height(self): 34 top = self [all...] |
H A D | zzdummy.py | 15 def apply(self, event=None): 16 head, tail, chars, lines = self.formatter.get_region() 19 lines[pos] = format_line(self, line) 20 self.formatter.set_region(head, tail, chars, lines) 37 def __init__(self, editwin): 39 self.editwin = editwin 40 self.text = editwin.text 41 self.formatter = editwin.fregion 49 def z_in_event(self, line): 55 return f'{self [all...] |
/third_party/python/Lib/ctypes/test/ |
H A D | test_stringptr.py | 12 def test__POINTER_c_char(self): 18 self.assertRaises(ValueError, getattr, x.str, "contents") 21 self.assertEqual(grc(b), 2) 23 self.assertEqual(grc(b), 3) 28 self.assertEqual(b[i], x.str[i]) 30 self.assertRaises(TypeError, setattr, x, "str", "Hello, World") 32 def test__c_char_p(self): 39 self.assertEqual(x.str, None) 41 self.assertEqual(x.str, b"Hello, World") 43 self [all...] |
/third_party/ltp/tools/sparse/sparse-src/Documentation/sphinx/ |
H A D | cdoc.py | 54 def __init__(self, lines): 56 self.index = 0 57 self.lines = lines 58 self.last = None 59 self.back = False 61 def __iter__(self): 63 return self 65 def memo(self): 67 return (self.index, self [all...] |
/third_party/python/Lib/email/ |
H A D | contentmanager.py | 9 def __init__(self): 10 self.get_handlers = {} 11 self.set_handlers = {} 13 def add_get_handler(self, key, handler): 14 self.get_handlers[key] = handler 16 def get_content(self, msg, *args, **kw): 18 if content_type in self.get_handlers: 19 return self.get_handlers[content_type](msg, *args, **kw) 21 if maintype in self.get_handlers: 22 return self [all...] |
/third_party/python/Lib/test/libregrtest/ |
H A D | cmdline.py | 145 def __init__(self, **kwargs) -> None: 146 self.testdir = None 147 self.verbose = 0 148 self.quiet = False 149 self.exclude = False 150 self.single = False 151 self.randomize = False 152 self.fromfile = None 153 self.fail_env_changed = False 154 self [all...] |
/third_party/python/Lib/lib2to3/pgen2/ |
H A D | conv.py | 47 def run(self, graminit_h, graminit_c): 49 self.parse_graminit_h(graminit_h) 50 self.parse_graminit_c(graminit_c) 51 self.finish_off() 53 def parse_graminit_h(self, filename): 66 self.symbol2number = {} 67 self.number2symbol = {} 78 assert symbol not in self.symbol2number 79 assert number not in self.number2symbol 80 self [all...] |
/third_party/python/Objects/ |
H A D | unionobject.c | 18 unionobject_dealloc(PyObject *self) in unionobject_dealloc() argument 20 unionobject *alias = (unionobject *)self; in unionobject_dealloc() 22 _PyObject_GC_UNTRACK(self); in unionobject_dealloc() 26 Py_TYPE(self)->tp_free(self); in unionobject_dealloc() 30 union_traverse(PyObject *self, visitproc visit, void *arg) in union_traverse() argument 32 unionobject *alias = (unionobject *)self; in union_traverse() 39 union_hash(PyObject *self) in union_hash() argument 41 unionobject *alias = (unionobject *)self; in union_hash() 159 _Py_union_type_or(PyObject* self, PyObjec argument 251 union_repr(PyObject *self) union_repr() argument 279 union_getitem(PyObject *self, PyObject *item) union_getitem() argument 320 union_parameters(PyObject *self, void *Py_UNUSED(unused)) union_parameters() argument 348 union_getattro(PyObject *self, PyObject *name) union_getattro() argument 365 _Py_union_args(PyObject *self) _Py_union_args() argument [all...] |
H A D | classobject.c | 48 PyObject *self = PyMethod_GET_SELF(method); in method_vectorcall() local 58 newargs[0] = self; in method_vectorcall() 67 return _PyObject_VectorcallTstate(tstate, func, &self, 1, NULL); in method_vectorcall() 83 newargs[0] = self; in method_vectorcall() 105 PyMethod_New(PyObject *func, PyObject *self) in PyMethod_New() argument 107 if (self == NULL) { in PyMethod_New() 118 Py_INCREF(self); in PyMethod_New() 119 im->im_self = self; in PyMethod_New() 130 method___reduce___impl(PyMethodObject *self) in method___reduce___impl() argument 133 PyObject *funcself = PyMethod_GET_SELF(self); in method___reduce___impl() 246 method_richcompare(PyObject *self, PyObject *other, int op) method_richcompare() argument 277 PyObject *self = a->im_self; method_repr() local 387 instancemethod_get_doc(PyObject *self, void *context) instancemethod_get_doc() argument 399 instancemethod_getattro(PyObject *self, PyObject *name) instancemethod_getattro() argument 424 instancemethod_dealloc(PyObject *self) instancemethod_dealloc() argument 431 instancemethod_traverse(PyObject *self, visitproc visit, void *arg) instancemethod_traverse() argument 437 instancemethod_call(PyObject *self, PyObject *arg, PyObject *kw) instancemethod_call() argument 454 instancemethod_richcompare(PyObject *self, PyObject *other, int op) instancemethod_richcompare() argument 480 instancemethod_repr(PyObject *self) instancemethod_repr() argument [all...] |
/third_party/node/deps/openssl/openssl/util/perl/TLSProxy/ |
H A D | Alert.pm | 20 my $self = { 27 return bless $self, $class; 33 my $self = shift; 34 return $self->{server}; 38 my $self = shift; 39 return $self->{encrypted}; 43 my $self = shift; 44 return $self->{level}; 48 my $self = shift; 49 return $self [all...] |
/third_party/openssl/util/perl/TLSProxy/ |
H A D | Alert.pm | 20 my $self = { 27 return bless $self, $class; 33 my $self = shift; 34 return $self->{server}; 38 my $self = shift; 39 return $self->{encrypted}; 43 my $self = shift; 44 return $self->{level}; 48 my $self = shift; 49 return $self [all...] |
/test/testfwk/developer_test/libs/fuzzlib/tools/ |
H A D | run_result.py | 40 def __init__(self, code, data): 41 self.code = code 42 self.data = data 43 self.payload = {} 45 self.crash_info = { 76 def get_log(self): 77 return "code :{}, msg: {}".format(self.code, self.data) 80 def analysis(self, result, outdir): 83 def write_analysis_result(self, analysis_ressult_pat [all...] |
/third_party/googletest/googletest/test/ |
H A D | googletest-list-tests-unittest.py | 127 def RunAndVerify(self, flag_value, expected_output_re, other_flag): 159 self.assert_( 166 self.assert_( 171 def testDefaultBehavior(self): 174 self.RunAndVerify(flag_value=None, 178 def testFlag(self): 181 self.RunAndVerify(flag_value='0', 184 self.RunAndVerify(flag_value='1', 188 def testOverrideNonFilterFlags(self): 191 self [all...] |
/third_party/musl/src/process/ |
H A D | _Fork.c | 19 pthread_t self = __pthread_self(); in __post_Fork() local 21 self->tid = __syscall(SYS_gettid); in __post_Fork() 22 self->pid = __syscall(SYS_getpid); in __post_Fork() 24 self->tid = __syscall(SYS_set_tid_address, &__thread_list_lock); in __post_Fork() 25 self->pid = self->tid; in __post_Fork() 27 self->proc_tid = -1; in __post_Fork() 28 self->robust_list.off = 0; in __post_Fork() 29 self->robust_list.pending = 0; in __post_Fork() 30 self in __post_Fork() [all...] |
/third_party/python/Lib/test/test_capi/ |
H A D | test_eval_code_ex.py | 12 def test_simple(self): 16 self.assertEqual(_testcapi.eval_code_ex(f.__code__, dict(a=1)), 1) 19 # def test_custom_locals(self): 23 def test_with_args(self): 27 self.assertEqual(_testcapi.eval_code_ex(f.__code__, {}, {}, (1, 2, 3)), 1) 29 def test_with_kwargs(self): 33 self.assertEqual(_testcapi.eval_code_ex(f.__code__, {}, {}, (), dict(a=1, b=2, c=3)), 1) 35 def test_with_default(self): 39 self.assertEqual(_testcapi.eval_code_ex(f.__code__, {}, {}, (), {}, (1,)), 1) 41 def test_with_kwarg_default(self) [all...] |
/third_party/python/Lib/ |
H A D | __future__.py | 83 def __init__(self, optionalRelease, mandatoryRelease, compiler_flag): 84 self.optional = optionalRelease 85 self.mandatory = mandatoryRelease 86 self.compiler_flag = compiler_flag 88 def getOptionalRelease(self): 93 return self.optional 95 def getMandatoryRelease(self): 101 return self.mandatory 103 def __repr__(self): 104 return "_Feature" + repr((self [all...] |
/third_party/skia/tools/skpbench/ |
H A D | _hardware_pixel.py | 13 def __init__(self, adb): 14 HardwareAndroid.__init__(self, adb) 16 def __enter__(self): 17 HardwareAndroid.__enter__(self) 18 if not self._adb.is_root(): 19 return self 21 self._adb.shell('\n'.join([ 62 return self 64 def sanity_check(self): 65 HardwareAndroid.sanity_check(self) [all...] |
/third_party/python/Objects/stringlib/ |
H A D | localeutil.h | 11 GroupGenerator_init(GroupGenerator *self, const char *grouping) in GroupGenerator_init() argument 13 self->grouping = grouping; in GroupGenerator_init() 14 self->i = 0; in GroupGenerator_init() 15 self->previous = 0; in GroupGenerator_init() 21 GroupGenerator_next(GroupGenerator *self) in GroupGenerator_next() argument 27 switch (self->grouping[self->i]) { in GroupGenerator_next() 29 return self->previous; in GroupGenerator_next() 34 char ch = self->grouping[self in GroupGenerator_next() [all...] |
/third_party/python/Lib/test/test_importlib/extension/ |
H A D | test_case_sensitivity.py | 15 def find_spec(self): 19 finder = self.machinery.FileFinder(util.EXTENSIONS.path, 20 (self.machinery.ExtensionFileLoader, 21 self.machinery.EXTENSION_SUFFIXES)) 25 def test_case_sensitive(self): 28 self.caseok_env_changed(should_exist=False) 29 spec = self.find_spec() 30 self.assertIsNone(spec) 33 def test_case_insensitivity(self): 36 self [all...] |
/build/hb/services/ |
H A D | menu.py | 47 def select_compile_option(self) -> dict: 83 result = self._list_promt(arg.arg_name, 'select {} value'.format( 88 def select_product(self) -> dict: 91 os_level = self._select_os_level() 115 product = self._list_promt('product', 'Which product do you need?', 120 def _select_os_level(self) -> str: 135 return self._list_promt('os_level', 'Which os_level do you need?', 138 def _list_promt(self, name: str, message: str, choices: list, **kwargs): 139 questions = self._get_questions('list', name, message, choices) 141 return self [all...] |
/third_party/mesa3d/src/amd/registers/ |
H A D | makeregheader.py | 133 def __init__(self, regdb, guard=None): 134 self.guard = guard 137 self.register_lines = [] 138 self.field_lines = [] 139 self.value_lines = [] 146 self.register_lines.append(Object( 165 self.field_lines.append(Object( 181 self.value_lines.append(Object( 190 lines = self.register_lines 193 self [all...] |
/third_party/python/Modules/ |
H A D | _gdbmmodule.c | 222 _gdbm_gdbm_get_impl(gdbmobject *self, PyObject *key, PyObject *default_value) in _gdbm_gdbm_get_impl() argument 227 res = gdbm_subscript(self, key); in _gdbm_gdbm_get_impl() 291 _gdbm_gdbm_setdefault_impl(gdbmobject *self, PyObject *key, in _gdbm_gdbm_setdefault_impl() argument 297 res = gdbm_subscript(self, key); in _gdbm_gdbm_setdefault_impl() 300 if (gdbm_ass_sub(self, key, default_value) < 0) in _gdbm_gdbm_setdefault_impl() 302 return gdbm_subscript(self, key); in _gdbm_gdbm_setdefault_impl() 314 _gdbm_gdbm_close_impl(gdbmobject *self) in _gdbm_gdbm_close_impl() argument 317 if (self->di_dbm) { in _gdbm_gdbm_close_impl() 318 gdbm_close(self->di_dbm); in _gdbm_gdbm_close_impl() 320 self in _gdbm_gdbm_close_impl() 334 _gdbm_gdbm_keys_impl(gdbmobject *self, PyTypeObject *cls) _gdbm_gdbm_keys_impl() argument 377 gdbm_contains(PyObject *self, PyObject *arg) gdbm_contains() argument 421 _gdbm_gdbm_firstkey_impl(gdbmobject *self, PyTypeObject *cls) _gdbm_gdbm_firstkey_impl() argument 460 _gdbm_gdbm_nextkey_impl(gdbmobject *self, PyTypeObject *cls, const char *key, Py_ssize_t key_length) _gdbm_gdbm_nextkey_impl() argument 498 _gdbm_gdbm_reorganize_impl(gdbmobject *self, PyTypeObject *cls) _gdbm_gdbm_reorganize_impl() argument 527 _gdbm_gdbm_sync_impl(gdbmobject *self, PyTypeObject *cls) _gdbm_gdbm_sync_impl() argument 538 gdbm__enter__(PyObject *self, PyObject *args) gdbm__enter__() argument 545 gdbm__exit__(PyObject *self, PyObject *args) gdbm__exit__() argument 686 PyObject *self = newgdbmobject(state, name, iflags, mode); dbmopen_impl() local [all...] |
/third_party/musl/porting/liteos_m/user/src/thread/ |
H A D | pthread_create.c | 11 pthread_t self = pthread_self(); in __pthread_exit() local 13 self->canceldisable = 1; in __pthread_exit() 14 self->cancelasync = 0; in __pthread_exit() 15 self->result = result; in __pthread_exit() 17 while (self->cancelbuf) { in __pthread_exit() 18 void (*f)(void *) = self->cancelbuf->__f; in __pthread_exit() 19 void *x = self->cancelbuf->__x; in __pthread_exit() 20 self->cancelbuf = self->cancelbuf->__next; in __pthread_exit() 26 int state = a_cas(&self in __pthread_exit() 119 struct pthread *self, *new; __pthread_create() local [all...] |
/third_party/python/Lib/test/support/ |
H A D | __init__.py | 122 def __init__(self, msg, errors, failures): 123 self.msg = msg 124 self.errors = errors 125 self.failures = failures 128 def __str__(self): 129 return self.msg 699 self.assertEqual(stdout.getvalue(), "hello\\n") 708 self.assertEqual(stderr.getvalue(), "hello\\n") 720 self.assertEqual(captured, "hello") 899 def __init__(self) [all...] |
/test/xts/acts/pcs/pcs_py/ |
H A D | testSelinuxFileLable.py | 26 def __init__(self, controllers): 27 self.TAG = self.__class__.__name__ 28 super().__init__(self.TAG, controllers) 30 def setup(self): 33 def process(self): 35 fileContextFile = self.device1.execute_shell_command("ls /system/etc/selinux/targeted/contexts/file_contexts | wc -l").strip() 37 self.log.info('selinux file configuration file not exist.') 48 fileContextFile = self.device1.execute_shell_command("cat /system/etc/selinux/targeted/contexts/file_contexts") 58 self [all...] |