Search is not available for this dataset
id
int64
0
10.8M
vector
listlengths
1.54k
1.54k
ast_depth
int64
3
164
ast_data
stringlengths
297
510k
full_path
stringlengths
0
319
code
stringlengths
60
56.5k
9,001
[ 0.0584387443959713, -0.004529134836047888, 0.0642085149884224, -0.02573898434638977, 0.006739114876836538, 0.048725422471761703, 0.025196414440870285, 0.02591102011501789, -0.020114785060286522, 0.017296068370342255, 0.008621567860245705, -0.010461011901497841, -0.034962672740221024, -0.00...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_tree_with_duplicate_targets(self): self.create_discussion("Chapter 1", "Discussion A") self.create_discussion("Chapter 1", "Discussion B") self.create_discussion("Chapter 1", "Discussion A") # duplicate self.create_discussion("Chapter 1", "Discussion A") # another duplicate ...
9,002
[ 0.028449466452002525, -0.0017696646973490715, 0.010476415045559406, -0.04845847561955452, 0.016853949055075645, 0.03656632825732231, 0.0031348345801234245, 0.03076856955885887, -0.021519122645258904, 0.032683178782463074, 0.031038232147693634, -0.015991026535630226, -0.03769891336560249, 0...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_start_date_filter(self): now = datetime.datetime.now() later = datetime.datetime.max self.create_discussion("Chapter 1", "Discussion 1", start=now) self.create_discussion("Chapter 1", "Discussion 2 обсуждение", start=later) self.create_discussion("Chapter 2", "Discussion...
9,003
[ 0.04920393228530884, 0.009746680967509747, -0.010499527677893639, -0.04463307559490204, 0.0159173384308815, 0.027452031150460243, -0.02046130783855915, -0.015594689175486565, -0.018619520589709282, 0.007394033949822187, 0.040411755442619324, -0.0016224862774834037, 0.009733237326145172, 0....
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_sort_inline_explicit(self): self.create_discussion("Chapter", "Discussion 1", sort_key="D") self.create_discussion("Chapter", "Discussion 2", sort_key="A") self.create_discussion("Chapter", "Discussion 3", sort_key="E") self.create_discussion("Chapter", "Discussion 4", sort_key=...
9,004
[ 0.035023923963308334, 0.006719249300658703, 0.018821757286787033, -0.03913668170571327, 0.003893366316333413, 0.028789298608899117, -0.0327448807656765, -0.023327453061938286, -0.006388526409864426, 0.019149206578731537, 0.02692938968539238, -0.011441061273217201, -0.004001424182206392, 0....
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_sort_alpha(self): self.course.discussion_sort_alpha = True self.course.save() self.create_discussion("Chapter", "Discussion D") self.create_discussion("Chapter", "Discussion A") self.create_discussion("Chapter", "Discussion E") self.create_discussion("Chapter", "...
9,005
[ 0.02910088561475277, 0.008305706083774567, 0.02315155416727066, -0.05144179239869118, 0.006718759890645742, 0.026476584374904633, -0.0007342203170992434, 0.011967361904680729, 0.004805493168532848, 0.01860368251800537, 0.027864305302500725, -0.020032621920108795, -0.013018456287682056, -0....
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_sort_intermediates(self): self.create_discussion("Chapter B", "Discussion 2") self.create_discussion("Chapter C", "Discussion") self.create_discussion("Chapter A", "Discussion 1") self.create_discussion("Chapter B", "Discussion 1") self.create_discussion("Chapter A", "Di...
9,006
[ 0.037232860922813416, -0.018283333629369736, 0.026499729603528976, -0.028374943882226944, 0.004947109613567591, -0.002476639114320278, 0.01565556600689888, 0.03086700476706028, 0.006816154811531305, 0.04221698269248009, 0.031829286366701126, -0.04917501285672188, -0.010652940720319748, -0....
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_ids_mixed(self): self.course.discussion_topics = { "Topic A": {"id": "Topic_A"}, "Topic B": {"id": "Topic_B"}, "Topic C": {"id": "Topic_C"} } self.create_discussion("Chapter 1", "Discussion 1") self.create_discussion("Chapter 2", "Discussion")...
9,007
[ 0.04668348282575607, -0.0036142466124147177, 0.03859476000070572, -0.01841147243976593, 0.02793819084763527, 0.0001585846912348643, -0.00006148793181637302, 0.005607538856565952, 0.00040684346458874643, 0.02780979871749878, 0.04085446894168854, -0.02079957164824009, 0.0016610769089311361, ...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_ids_inline(self): self.create_discussion("Chapter 1", "Discussion 1") self.create_discussion("Chapter 1", "Discussion 2") self.create_discussion("Chapter 2", "Discussion") self.create_discussion("Chapter 2 / Section 1 / Subsection 1", "Discussion") self.create_discussion...
9,008
[ -0.026278572157025337, 0.020883940160274506, 0.04936204105615616, -0.010065735317766666, -0.007785171736031771, 0.01004837080836296, 0.01254888717085123, -0.02708892524242401, -0.02234257571399212, -0.010632982477545738, -0.0413048230111599, -0.015778720378875732, -0.012849874794483185, -0...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "cls", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}...
def get_qgis_proxy(cls): s = cls.get_settings() proxy_enabled = s.value("proxy/proxyEnabled", u"", type=unicode) proxy_type = s.value("proxy/proxyType", u"", type=unicode) proxy_host = s.value("proxy/proxyHost", u"", type=unicode) proxy_port = s.value("proxy/proxyPort", u"", type...
9,009
[ -0.013091297820210457, 0.017236676067113876, 0.08247874677181244, -0.0025908618699759245, -0.037975482642650604, -0.0004165480495430529, 0.025610817596316338, -0.04781480133533478, -0.025586994364857674, 0.008648118004202843, -0.044908273965120316, -0.028302932158112526, -0.00582497240975499...
12
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": "UsePresetCrs"}}, "targets": [{"_type": "Name", "_fields": {"id": "NEW_PROJECT_USE_PRESET_CRS", "ctx": {"_type": "Store", "_fields": {}}}}...
class QGISSettings(object): NEW_PROJECT_USE_PRESET_CRS = 'UsePresetCrs' @classmethod def get_settings(cls): return QSettings() @classmethod def get_default_tile_expiry(self, def_value=24): return QGISSettings.get_settings().value('/qgis/defaultTileExpiry', def_value, type=int) ...
9,010
[ -0.037387583404779434, -0.023857461288571358, -0.004194119945168495, -0.03797585144639015, -0.0022740846034139395, 0.0392177440226078, -0.01118795108050108, -0.042006563395261765, 0.03438089042901993, 0.030045149847865105, -0.0006144794169813395, -0.06248694285750389, 0.0032055058982223272, ...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "source", "annotation": null, "type_comment": null}}], "kwarg": nu...
def assertSame(self, source): module = ast.parse(source) tested.update(module) gen = SourceGen() gen.visit(module) generated_source = gen.dumps() self.assertMultiLineEqual(source, generated_source.strip('\n'))
9,011
[ -0.045001499354839325, -0.029003258794546127, 0.004082131199538708, -0.05346508324146271, 0.005150400567799807, 0.015244773589074612, -0.004652391187846661, -0.043226208537817, 0.020818352699279785, 0.016803311184048653, -0.014171343296766281, -0.050368648022413254, 0.02384253591299057, 0....
9
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "source", "annotation":...
class Test(unittest.TestCase): def assertSame(self, source): module = ast.parse(source) tested.update(module) gen = SourceGen() gen.visit(module) generated_source = gen.dumps() self.assertMultiLineEqual(source, generated_source.strip('\n'))
9,012
[ -0.0215594619512558, -0.018902665004134178, -0.028652727603912354, -0.058627497404813766, 0.027610348537564278, -0.01256575994193554, 0.009050906635820866, -0.01061447523534298, 0.030305281281471252, 0.041034165769815445, 0.004852785728871822, -0.07123775035142899, 0.044771477580070496, 0....
9
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "source", "annotation":...
class TestSimple(Test): def assertSame(self, source): module = ast.parse(source) tested.update(module) gen = SourceGen() gen.visit(module) generated_source = gen.dumps() self.assertEqual(source, generated_source.strip('\n')) test_expr = simple_expr('a') ...
9,013
[ -0.03086194396018982, -0.03417949378490448, -0.018508436158299446, -0.05308079719543457, 0.010067235678434372, 0.04098920151591301, -0.023637542501091957, -0.04445953294634819, 0.04640204459428787, 0.025318143889307976, 0.0010606064461171627, -0.06521604210138321, 0.002432233188301325, 0.0...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "source", "annotation": null, "type_comment": null}}], "kwarg": nu...
def assertSame(self, source): module = ast.parse(source) tested.update(module) gen = SourceGen() gen.visit(module) generated_source = gen.dumps() self.assertEqual(source, generated_source.strip('\n'))
9,014
[ -0.01485086977481842, -0.028252875432372093, -0.01036406122148037, -0.031851667910814285, 0.007302748970687389, -0.013951171189546585, -0.03072996810078621, 0.006145993247628212, 0.003841246012598276, 0.009067093022167683, -0.032295677810907364, -0.04447082057595253, -0.012806100770831108, ...
10
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs...
class QueryStringTests(TestCase): def test_get_like_requests(self): # See: https://code.djangoproject.com/ticket/10571. for method_name in ('get', 'head'): # A GET-like request can pass a query string as data method = getattr(self.client, method_name) response = m...
9,015
[ -0.008423993363976479, -0.0006389233749359846, 0.013464141637086868, -0.033695973455905914, 0.031558807939291, 0.0016652080230414867, -0.008198403753340244, -0.012573656626045704, 0.019780652597546577, 0.029920315369963646, 0.013974687084555626, -0.05043710395693779, 0.022879542782902718, ...
8
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs...
class ControlFlow(Test): def test_if(self): source = '''if a: b''' self.assertSame(source) def test_if_else(self): source = '''if a: b else: c''' self.assertSame(source) def test_elif_else(self): source = '''if a: b elif d: e else: c''' ...
9,016
[ 0.007368810940533876, -0.011825802735984325, -0.016916869208216667, -0.03671477735042572, 0.016498256474733353, -0.01032372284680605, -0.04543176665902138, 0.03289801627397537, 0.01614120416343212, -0.006017554551362991, -0.0169414933770895, -0.04742633178830147, -0.005281904712319374, 0.0...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_get_like_requests(self): # See: https://code.djangoproject.com/ticket/10571. for method_name in ('get', 'head'): # A GET-like request can pass a query string as data method = getattr(self.client, method_name) response = method("/test_client_regress/request_da...
9,017
[ 0.015560563653707504, -0.007451022043824196, 0.003990747965872288, -0.008103444240987301, 0.044462237507104874, -0.022231118753552437, -0.03465761989355087, 0.006755918730050325, 0.018365366384387016, -0.0027971819508820772, -0.00729858735576272, -0.04387688636779785, -0.01087776105850935, ...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_post_like_requests(self): # A POST-like request can pass a query string as data response = self.client.post("/test_client_regress/request_data/", data={'foo':'whiz'}) self.assertEqual(response.context['get-foo'], None) self.assertEqual(response.context['post-foo'], 'whiz') ...
9,018
[ 0.018329564481973648, -0.05069088935852051, 0.034754157066345215, -0.006824220065027475, 0.03533494099974632, 0.0006087349611334503, 0.018538648262619972, 0.0341501422226429, 0.012881804257631302, 0.021547112613916397, 0.03786716237664223, -0.01981637440621853, -0.02348693273961544, -0.026...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_should_set_correct_env_variables(self): request = RequestFactory().get('/path/') self.assertEqual(request.META.get('REMOTE_ADDR'), '127.0.0.1') self.assertEqual(request.META.get('SERVER_NAME'), 'testserver') self.assertEqual(request.META.get('SERVER_PORT'), '80') self.a...
9,019
[ 0.03198545053601265, -0.008687147870659828, 0.0030980671290308237, -0.05547214671969414, -0.02005370520055294, 0.007033449597656727, 0.026396367698907852, -0.009325600229203701, -0.02541252225637436, 0.01835814118385315, 0.03401593863964081, -0.06208693981170654, 0.04019114002585411, -0.04...
10
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "\\*(?:/(?P<step>\\d+))?$"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", ...
class AllExpression(object): value_re = re.compile(r'\*(?:/(?P<step>\d+))?$') def __init__(self, step=None): self.step = asint(step) if self.step == 0: raise ValueError('Increment must be higher than 0') def get_next_value(self, date, field): start = field.get_value(dat...
9,020
[ 0.025045249611139297, 0.003457198152318597, 0.04747816547751427, -0.05689086392521858, -0.0010346974013373256, 0.008448624983429909, -0.004644152242690325, -0.02280610427260399, -0.03806546330451965, 0.06340096890926361, 0.03422988951206207, -0.029730867594480515, 0.03043578378856182, -0.0...
10
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "(?P<first>\\d+)(?:-(?P<last>\\d+))?(?:/(?P<step>\\d+))?$"}}], "func": {"_type": "Attribute", "_fie...
class RangeExpression(AllExpression): value_re = re.compile( r'(?P<first>\d+)(?:-(?P<last>\d+))?(?:/(?P<step>\d+))?$') def __init__(self, first, last=None, step=None): AllExpression.__init__(self, step) first = asint(first) last = asint(last) if last is None and step is ...
9,021
[ 0.022234614938497543, 0.0036293617449700832, 0.03344470262527466, -0.04911918193101883, 0.014408293180167675, -0.014986807480454445, 0.027746878564357758, 0.00387495756149292, -0.01283647958189249, 0.028445463627576828, 0.03169824555516243, 0.005089292768388987, -0.05898667871952057, -0.03...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "date", "annotation": null, "type_comment": null}}, {"_type": "arg...
def get_next_value(self, date, field): start = field.get_value(date) minval = field.get_min(date) maxval = field.get_max(date) start = max(start, minval) if not self.step: next = start else: distance_to_next = (self.step - (start - minval)) % self...
9,022
[ 0.018712246790528297, 0.0141327865421772, 0.04802956059575081, -0.04710928723216057, 0.018624601885676384, -0.019051872193813324, 0.025417104363441467, 0.0016707363538444042, -0.019314808771014214, 0.04125897213816643, 0.027301475405693054, -0.003985117189586163, -0.04671488329768181, -0.0...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "date", "annotation": null, "type_comment": null}}, {"_type": "arg...
def get_next_value(self, date, field): start = field.get_value(date) minval = field.get_min(date) maxval = field.get_max(date) # Apply range limits minval = max(minval, self.first) if self.last is not None: maxval = min(maxval, self.last) start = max(...
9,023
[ 0.02946135774254799, 0.01598551496863365, 0.03443705290555954, -0.0357900932431221, -0.0043182712979614735, 0.0050002471543848515, 0.012308300472795963, -0.011959129013121128, -0.026951687410473824, 0.05931553617119789, 0.05132823437452316, -0.04382104426622391, 0.014305125921964645, -0.04...
7
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "first", "annotation": null, "type_comment": null}}, {"_type": "ar...
def __init__(self, first, last=None, step=None): AllExpression.__init__(self, step) first = asint(first) last = asint(last) if last is None and step is None: last = first if last is not None and first > last: raise ValueError('The minimum value in a range ...
9,024
[ 0.025486329570412636, -0.0033143165055662394, 0.05775442719459534, -0.0516289584338665, -0.019262414425611496, 0.014427668415009975, 0.019721824675798416, -0.017545094713568687, -0.0049660056829452515, 0.06952407956123352, 0.005102735012769699, -0.05211024358868599, 0.02157040312886238, -0...
11
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "(?P<first>[a-z]+)(?:-(?P<last>[a-z]+))?"}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "L...
class WeekdayRangeExpression(RangeExpression): value_re = re.compile(r'(?P<first>[a-z]+)(?:-(?P<last>[a-z]+))?', re.IGNORECASE) def __init__(self, first, last=None): try: first_num = WEEKDAYS.index(first.lower()) except ValueError: raise ValueEr...
9,025
[ 0.046181343495845795, 0.0019405133789405227, 0.0325431264936924, -0.04404246807098389, -0.004004644695669413, 0.020123843103647232, -0.03670588880777359, -0.011821320280432701, -0.022504204884171486, 0.07005397230386734, 0.0012117427540943027, -0.029944278299808502, -0.004637108184397221, ...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def __str__(self): if self.last != self.first and self.last is not None: range = '%d-%d' % (self.first, self.last) else: range = str(self.first) if self.step: return '%s/%d' % (range, self.step) return range
9,026
[ 0.0048199063166975975, 0.00025364148314110935, 0.04741155356168747, -0.04166330769658089, -0.009122470393776894, 0.014531572349369526, 0.0321442075073719, -0.007938330993056297, -0.0006700302474200726, 0.05794234573841095, 0.02591310441493988, -0.024395566433668137, -0.00647827610373497, -...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "first", "annotation": null, "type_comment": null}}, {"_type": "ar...
def __init__(self, first, last=None): try: first_num = WEEKDAYS.index(first.lower()) except ValueError: raise ValueError('Invalid weekday name "%s"' % first) if last: try: last_num = WEEKDAYS.index(last.lower()) except ValueError: ...
9,027
[ -0.0010721563594415784, -0.006099611986428499, 0.0504346564412117, -0.03737455978989601, -0.01966363750398159, 0.00691849272698164, 0.017081012949347496, -0.018918246030807495, -0.024797389283776283, 0.04159494489431381, 0.02018856070935726, -0.029332729056477547, 0.002041952684521675, -0....
11
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "1st"}}, {"_type": "Constant", "_fields": {"kind": null, "...
class WeekdayPositionExpression(AllExpression): options = ['1st', '2nd', '3rd', '4th', '5th', 'last'] value_re = re.compile(r'(?P<option_name>%s) +(?P<weekday_name>(?:\d+|\w+))' % '|'.join(options), re.IGNORECASE) def __init__(self, option_name, weekday_name): try: ...
9,028
[ 0.011869938112795353, -0.012555756606161594, 0.030534757301211357, -0.036548856645822525, -0.023655468598008156, -0.015066907741129398, 0.024562858045101166, -0.04439884424209595, -0.004178218077868223, 0.027791481465101242, -0.01189104001969099, -0.017293181270360947, -0.028002502396702766,...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "option_name", "annotation": null, "type_comment": null}}, {"_type...
def __init__(self, option_name, weekday_name): try: self.option_num = self.options.index(option_name.lower()) except ValueError: raise ValueError('Invalid weekday position "%s"' % option_name) try: self.weekday = WEEKDAYS.index(weekday_name.lower()) e...
9,029
[ 0.023665890097618103, 0.006567338015884161, 0.03290604427456856, -0.014809854328632355, 0.03482663258910179, 0.009971044026315212, 0.0320311114192009, 0.027677781879901886, -0.015247320756316185, 0.014991242438554764, 0.0240713469684124, 0.01806418038904667, -0.033567581325769424, -0.03900...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "date", "annotation": null, "type_comment": null}}, {"_type": "arg...
def get_next_value(self, date, field): # Figure out the weekday of the month's first day and the number # of days in that month first_day_wday, last_day = monthrange(date.year, date.month) # Calculate which day of the month is the first of the target weekdays first_hit_day = sel...
9,030
[ 0.005572700873017311, 0.032800354063510895, 0.00008524575241608545, -0.04825275391340256, -0.011433335021138191, 0.018151769414544106, 0.01859566569328308, -0.008440032601356506, 0.012932985089719296, -0.0031132742296904325, -0.006580465938895941, 0.004495951812714338, 0.008787951432168484, ...
12
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "mock_hook", "annotatio...
class TestCloudBuildOperator(TestCase): @mock.patch("airflow.providers.google.cloud.operators.cloud_build.CloudBuildHook") def test_cancel_build(self, mock_hook): mock_hook.return_value.cancel_build.return_value = Build() operator = CloudBuildCancelBuildOperator(id_=TRIGGER_ID, task_id="id") ...
9,031
[ 0.04945202171802521, 0.008088561706244946, 0.036218952387571335, -0.023410797119140625, 0.005670592654496431, 0.030695054680109024, 0.01426500640809536, -0.006753114517778158, -0.028003927320241928, 0.05325602367520332, 0.012403473258018494, -0.017512571066617966, 0.014700038358569145, -0....
9
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "last"}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "IGNO...
class LastDayOfMonthExpression(AllExpression): value_re = re.compile(r'last', re.IGNORECASE) def __init__(self): pass def get_next_value(self, date, field): return monthrange(date.year, date.month)[1] def __str__(self): return 'last' def __repr__(self): return "%s...
9,032
[ 0.006260953843593597, 0.04155401885509491, 0.0037153526209294796, -0.009736785665154457, -0.038189589977264404, -0.002246200805529952, 0.01492825336754322, 0.012198833748698235, 0.0008278774912469089, -0.032151445746421814, 0.021077802404761314, -0.011352156288921833, -0.0052360291592776775,...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "mock_hook", "annotation": null, "type_comment": null}}], "kwarg":...
def test_cancel_build(self, mock_hook): mock_hook.return_value.cancel_build.return_value = Build() operator = CloudBuildCancelBuildOperator(id_=TRIGGER_ID, task_id="id") context = mock.MagicMock() operator.execute(context=context) mock_hook.assert_called_once_with(gcp_conn_id=GCP...
9,033
[ 0.003070604056119919, 0.01620885170996189, 0.015957297757267952, -0.009099706076085567, -0.013015205040574074, -0.03462700545787811, 0.04768596217036247, -0.004899841733276844, 0.001803262042813003, -0.009099706076085567, 0.029814662411808968, -0.004022135864943266, -0.006950556766241789, ...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "mock_hook", "annotation": null, "type_comment": null}}], "kwarg":...
def test_create_build(self, mock_hook): mock_hook.return_value.create_build.return_value = Build() operator = CloudBuildCreateBuildOperator(build=BUILD, task_id="id") context = mock.MagicMock() operator.execute(context=context) mock_hook.assert_called_once_with(gcp_conn_id=GCP_CO...
9,034
[ 0.028979193419218063, 0.002986939623951912, -0.003174498211592436, -0.06042184308171272, -0.014176066033542156, -0.04487967863678932, 0.028732847422361374, -0.024567369371652603, -0.019696446135640144, 0.023380430415272713, 0.0039779203943908215, 0.020569851621985435, 0.06109369546175003, ...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "file_type", "annotation": null, "type_comment": null}}, {"_type":...
def test_load_templated(self, file_type, file_content): with tempfile.NamedTemporaryFile(suffix=file_type, mode='w+') as f: f.writelines(file_content) f.flush() operator = CloudBuildCreateBuildOperator( build=f.name, task_id="task-id", params={'name': 'airflo...
9,035
[ 0.000737413065508008, 0.04167987033724785, 0.020220080390572548, -0.02505066990852356, -0.01865975745022297, -0.01140318438410759, 0.05792433023452759, 0.017003249377012253, 0.0010887529933825135, -0.01619102619588375, 0.009046669118106365, 0.012995569035410881, -0.005388993304222822, -0.0...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "mock_hook", "annotation": null, "type_comment": null}}], "kwarg":...
def test_create_build_trigger(self, mock_hook): mock_hook.return_value.create_build_trigger.return_value = BuildTrigger() operator = CloudBuildCreateBuildTriggerOperator(trigger=BUILD_TRIGGER, task_id="id") context = mock.MagicMock() operator.execute(context=context) mock_hook.as...
9,036
[ 0.012332833372056484, 0.05563083663582802, 0.0012456217082217336, -0.039238814264535904, -0.036000337451696396, 0.023046426475048065, 0.038662102073431015, 0.04742373526096344, 0.020406845957040787, -0.03012227825820446, 0.028880123049020767, 0.004863261710852385, -0.006537954322993755, -0...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "mock_hook", "annotation": null, "type_comment": null}}], "kwarg":...
def test_delete_build_trigger(self, mock_hook): mock_hook.return_value.delete_build_trigger.return_value = None operator = CloudBuildDeleteBuildTriggerOperator(trigger_id=TRIGGER_ID, task_id="id") context = mock.MagicMock() operator.execute(context=context) mock_hook.assert_calle...
9,037
[ -0.009436245076358318, 0.010667304508388042, 0.020634373649954796, -0.0018451783107593656, -0.02304002270102501, -0.026676733046770096, 0.02828049845993519, -0.011271541006863117, -0.00040588274714536965, -0.030561912804841995, 0.027038143947720528, -0.01045271661132574, -0.01408377848565578...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "mock_hook", "annotation": null, "type_comment": null}}], "kwarg":...
def test_get_build(self, mock_hook): mock_hook.return_value.get_build.return_value = Build() operator = CloudBuildGetBuildOperator(id_=BUILD_ID, task_id="id") context = mock.MagicMock() operator.execute(context=context) mock_hook.assert_called_once_with(gcp_conn_id=GCP_CONN_ID, i...
9,038
[ -0.009892931208014488, 0.0369630865752697, 0.023411428555846214, -0.01959795318543911, -0.02265978790819645, -0.0013347167987376451, 0.04072129726409912, 0.01821625791490078, 0.0011454246705397964, -0.02960141934454441, 0.006775829009711742, 0.010920912027359009, -0.010821430012583733, -0....
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "mock_hook", "annotation": null, "type_comment": null}}], "kwarg":...
def test_get_build_trigger(self, mock_hook): mock_hook.return_value.get_build_trigger.return_value = BuildTrigger() operator = CloudBuildGetBuildTriggerOperator(trigger_id=TRIGGER_ID, task_id="id") context = mock.MagicMock() operator.execute(context=context) mock_hook.assert_call...
9,039
[ -0.02515636943280697, 0.03755645453929901, 0.03855825588107109, -0.026336269453167915, -0.026024596765637398, -0.0037511929403990507, 0.02965334802865982, 0.010691456496715546, 0.006222305353730917, -0.005626789294183254, -0.004396799020469189, 0.00699035357683897, -0.0037122340872883797, ...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "mock_hook", "annotation": null, "type_comment": null}}], "kwarg":...
def test_list_build_triggers(self, mock_hook): mock_hook.return_value.list_build_triggers.return_value = mock.MagicMock() operator = CloudBuildListBuildTriggersOperator(task_id="id", location="global") context = mock.MagicMock() operator.execute(context=context) mock_hook.assert_...
9,040
[ -0.027528323233127594, 0.00744085805490613, 0.03521436080336571, -0.017196649685502052, -0.03717578202486038, -0.027459902688860893, 0.003540822071954608, -0.011369402520358562, 0.017265072092413902, -0.005040397401899099, 0.012931698001921177, -0.024654613807797432, 0.007343927398324013, ...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "mock_hook", "annotation": null, "type_comment": null}}], "kwarg":...
def test_list_builds(self, mock_hook): mock_hook.return_value.list_builds.return_value = mock.MagicMock() operator = CloudBuildListBuildsOperator(task_id="id", location="global") context = mock.MagicMock() operator.execute(context=context) mock_hook.assert_called_once_with(gcp_co...
9,041
[ -0.01714855059981346, 0.022143378853797913, 0.023433072492480278, -0.012820426374673843, -0.02271171845495701, 0.013793161138892174, 0.04861488193273544, 0.008689035661518574, -0.009022388607263565, -0.0186786949634552, 0.009579798206686974, -0.024722766131162643, -0.01271113008260727, -0....
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "mock_hook", "annotation": null, "type_comment": null}}], "kwarg":...
def test_retry_build(self, mock_hook): mock_hook.return_value.retry_build.return_value = Build() operator = CloudBuildRetryBuildOperator(id_=BUILD_ID, task_id="id") context = mock.MagicMock() operator.execute(context=context) mock_hook.assert_called_once_with(gcp_conn_id=GCP_CONN...
9,042
[ -0.007586756721138954, 0.037112150341272354, 0.009406084194779396, -0.0166140366345644, -0.021426452323794365, 0.006471684668213129, 0.06393789499998093, 0.01739298552274704, -0.007885531522333622, -0.012890016660094261, 0.0034545885864645243, 0.016582025215029716, -0.032289065420627594, -...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "mock_hook", "annotation": null, "type_comment": null}}], "kwarg":...
def test_update_build_trigger(self, mock_hook): mock_hook.return_value.update_build_trigger.return_value = BuildTrigger() operator = CloudBuildUpdateBuildTriggerOperator( trigger_id=TRIGGER_ID, trigger=BUILD_TRIGGER, task_id="id" ) context = mock.MagicMock() operator....
9,043
[ -0.008113178424537182, 0.04887301102280617, 0.024134820327162743, -0.03290524333715439, -0.027065476402640343, 0.0005003396072424948, 0.046200942248106, 0.015148909762501717, -0.0014680220047011971, -0.02154894731938839, 0.010790634900331497, 0.007962335832417011, -0.0067609818652272224, -...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "mock_hook", "annotation": null, "type_comment": null}}], "kwarg":...
def test_run_build_trigger(self, mock_hook): mock_hook.return_value.run_build_trigger.return_value = Build() operator = CloudBuildRunBuildTriggerOperator(trigger_id=TRIGGER_ID, source=REPO_SOURCE, task_id="id") context = mock.MagicMock() operator.execute(context=context) mock_hoo...
9,044
[ -0.00354980886913836, 0.0255794208496809, 0.012558640912175179, -0.025279030203819275, 0.011478389613330364, -0.037109799683094025, -0.0074751065112650394, -0.025117281824350357, 0.04355664551258087, -0.014661375433206558, -0.00764840841293335, -0.04665298014879227, -0.010305711068212986, ...
10
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "fake_availability", "a...
class _FakeAvailabilityFinder(object): def __init__(self, fake_availability): self._fake_availability = fake_availability def GetAPIAvailability(self, api_name): return self._fake_availability def GetAPINodeAvailability(self, api_name): schema_graph = APISchemaGraph() api_graph = APISchemaGraph(...
9,045
[ -0.0076807099394500256, -0.028228649869561195, 0.0027841117698699236, -0.03962733596563339, 0.009137596935033798, -0.009108459576964378, -0.008787943981587887, -0.019277533516287804, 0.002421346725896001, -0.002740405034273863, 0.03484874591231346, -0.005474982783198357, 0.011660926043987274...
12
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs...
class TestBuildProcessor(TestCase): def test_verify_source(self): with pytest.raises(AirflowException, match="The source could not be determined."): BuildProcessor(build={"source": {"storage_source": {}, "repo_source": {}}}).process_body() @parameterized.expand( [ ( ...
9,046
[ 0.018125178292393684, 0.02661208249628544, 0.028368812054395676, -0.03950268030166626, 0.01074216514825821, -0.03081399016082287, -0.010611597448587418, -0.0357518270611763, 0.020950190722942352, -0.01056411862373352, -0.012961816973984241, -0.013816442340612411, -0.025709979236125946, 0.0...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "api_name", "annotation": null, "type_comment": null}}], "kwarg": ...
def GetAPINodeAvailability(self, api_name): schema_graph = APISchemaGraph() api_graph = APISchemaGraph(json.loads( CANNED_MASTER_FS_DATA['api'][api_name + '.json'])) # Give the graph fake ChannelInfo; it's not used in tests. channel_info = ChannelInfo('stable', '28', 28) schema_graph.Update(...
9,047
[ -0.03755614161491394, 0.004245230462402105, 0.046386219561100006, -0.053688015788793564, -0.02404215559363365, 0.019018633291125298, -0.01328757219016552, -0.031358104199171066, 0.02562704123556614, 0.04516925290226936, 0.03308449685573578, -0.02203274704515934, 0.02203274704515934, 0.0344...
14
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs...
class JSCViewTest(unittest.TestCase): def setUp(self): self._base_path = Server2Path('test_data', 'test_json') server_instance = ServerInstance.ForTest( TestFileSystem(CANNED_MASTER_FS_DATA, relative_to=CHROME_EXTENSIONS)) file_system = server_instance.host_file_system_provider.GetMaster() se...
9,048
[ 0.03467044234275818, -0.0036970991641283035, 0.0833243876695633, -0.05761587992310524, 0.007183965295553207, 0.004252715036273003, 0.04336808621883392, 0.0005379715003073215, -0.0016413198318332434, -0.01789984665811062, 0.025203945115208626, -0.0015264424728229642, 0.020398616790771484, -...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def setUp(self): self._base_path = Server2Path('test_data', 'test_json') server_instance = ServerInstance.ForTest( TestFileSystem(CANNED_MASTER_FS_DATA, relative_to=CHROME_EXTENSIONS)) file_system = server_instance.host_file_system_provider.GetMaster() self._json_cache = server_instance.compile...
9,049
[ -0.016090717166662216, -0.011535272002220154, 0.04039440304040909, -0.04010706767439842, -0.012666650116443634, -0.011164131574332714, -0.04678758978843689, -0.041615575551986694, 0.01363640371710062, 0.022268403321504593, -0.0012630734127014875, -0.05076238140463829, 0.07432378828525543, ...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def testGetEventByNameFromEvents(self): events = {} # Missing 'types' completely. self.assertRaises(AssertionError, GetEventByNameFromEvents, events) events['types'] = [] # No type 'Event' defined. self.assertRaises(AssertionError, GetEventByNameFromEvents, events) events['types'].append({...
9,050
[ 0.00963245052844286, 0.0025408947840332985, 0.029271109029650688, -0.029087508097290993, -0.03152676671743393, -0.052798155695199966, 0.012235637754201889, -0.0043900106102228165, 0.02309427596628666, -0.015737155452370644, 0.047342609614133835, -0.033625055104494095, 0.040654316544532776, ...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def testCreateId(self): fake_avail_finder = _FakeAvailabilityFinder(self._fake_availability) dict_ = CreateJSCView( self._api_models.GetContentScriptAPIs().Get(), self._api_models.GetModel('tester').Get(), fake_avail_finder, self._json_cache, _FakeTemplateCache(), ...
9,051
[ 0.005230035167187452, 0.017411794513463974, -0.0037812180817127228, -0.015020920895040035, -0.007445491384714842, -0.031393203884363174, -0.003540831385180354, -0.004028101917356253, 0.028300663456320763, 0.00028444407507777214, 0.005295004695653915, -0.004502378404140472, 0.0331083983182907...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def DISABLED_testToDict(self): fake_avail_finder = _FakeAvailabilityFinder(self._fake_availability) expected_json = self._LoadJSON('expected_tester.json') dict_ = CreateJSCView( self._api_models.GetContentScriptAPIs().Get(), self._api_models.GetModel('tester').Get(), fake_avail_finde...
9,052
[ -0.008115692064166069, 0.020422646775841713, 0.04553117975592613, -0.03251483291387558, -0.04331839829683304, 0.013068411499261856, -0.012424102053046227, -0.04834270849823952, -0.00006213271262822673, 0.03545652702450752, 0.017155544832348824, -0.05373147502541542, 0.019563568755984306, 0...
13
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def testAddRules(self): fake_avail_finder = _FakeAvailabilityFinder(self._fake_availability) dict_ = CreateJSCView( self._api_models.GetContentScriptAPIs().Get(), self._api_models.GetModel('add_rules_tester').Get(), fake_avail_finder, self._json_cache, _FakeTemplateCache(...
9,053
[ -0.05299711227416992, 0.005563549697399139, 0.022928133606910706, -0.03699473664164543, -0.024663157761096954, -0.018999235704541206, -0.007348760962486267, -0.008029865100979805, 0.058388594537973404, 0.04688867926597595, 0.017880789935588837, -0.03834260627627373, 0.02429034374654293, 0....
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def testGetIntroList(self): fake_avail_finder = _FakeAvailabilityFinder(self._fake_availability) model = _JSCViewBuilder( self._api_models.GetContentScriptAPIs().Get(), self._api_models.GetModel('tester').Get(), fake_avail_finder, self._json_cache, _FakeTemplateCache(), ...
9,054
[ 0.01764555275440216, -0.012839799746870995, 0.048840153962373734, -0.04619882255792618, -0.004931094590574503, -0.02878560870885849, 0.00866992212831974, 0.013659100979566574, -0.004799639340490103, -0.024114366620779037, 0.017926806584000587, -0.009201856330037117, 0.006970176938921213, -...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def setUp(self): server_instance = ServerInstance.ForTest( file_system_provider=FakeHostFileSystemProvider( CANNED_API_FILE_SYSTEM_DATA)) self._api_models = server_instance.platform_bundle.GetAPIModels( 'extensions') self._json_cache = server_instance.compiled_fs_factory.ForJson(...
9,055
[ -0.03560199588537216, 0.024175100028514862, 0.05960581451654434, -0.05265669524669647, -0.03560199588537216, -0.02725815959274769, 0.0030570614617317915, 0.010362504981458187, 0.02122661843895912, -0.010111700743436813, 0.024811286479234695, -0.01933029294013977, 0.008190905675292015, 0.01...
13
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs...
class JSCViewWithoutNodeAvailabilityTest(unittest.TestCase): def setUp(self): server_instance = ServerInstance.ForTest( file_system_provider=FakeHostFileSystemProvider( CANNED_API_FILE_SYSTEM_DATA)) self._api_models = server_instance.platform_bundle.GetAPIModels( 'extensions') ...
9,056
[ -0.03582271188497543, 0.0301870908588171, 0.03655325621366501, -0.050224851816892624, 0.005798687227070332, 0.0019959486089646816, 0.021498844027519226, -0.025112425908446312, 0.013867276720702648, -0.013038893230259418, 0.03167426958680153, -0.005912834778428078, 0.010521127842366695, 0.0...
12
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs...
class JSCViewWithNodeAvailabilityTest(unittest.TestCase): def setUp(self): tabs_unmodified_versions = (16, 20, 23, 24) self._branch_utility = BranchUtility( os.path.join('branch_utility', 'first.json'), os.path.join('branch_utility', 'second.json'), FakeUrlFetcher(Server2Path('test_dat...
9,057
[ -0.01832805760204792, 0.01831536553800106, 0.038179222494363785, -0.046657856553792953, -0.03482838720083237, -0.030792154371738434, -0.007786886300891638, 0.021805820986628532, 0.03112216107547283, -0.013136801309883595, 0.020701566711068153, -0.02273237705230713, 0.004512205719947815, 0....
12
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def testGetAPIAvailability(self): api_availabilities = { 'bluetooth': 31, 'contextMenus': 'master', 'jsonStableAPI': 20, 'idle': 5, 'input.ime': 18, 'tabs': 18 } for api_name, availability in api_availabilities.iteritems(): model_dict = CreateJSCView( self...
9,058
[ -0.005556019488722086, 0.02394556999206543, 0.02324661985039711, -0.06280211359262466, -0.004850596189498901, 0.012704095803201199, 0.030702104791998863, -0.0368114598095417, -0.01225754339247942, -0.019402384757995605, 0.046260252594947815, 0.01847044751048088, 0.002485161880031228, -0.02...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def setUp(self): tabs_unmodified_versions = (16, 20, 23, 24) self._branch_utility = BranchUtility( os.path.join('branch_utility', 'first.json'), os.path.join('branch_utility', 'second.json'), FakeUrlFetcher(Server2Path('test_data')), ObjectStoreCreator.ForTest()) self._node_f...
9,059
[ -0.00394273130223155, 0.020310062915086746, 0.017550474032759666, -0.026873759925365448, 0.009407104924321175, -0.011431664228439331, 0.004042669665068388, -0.03716419264674187, 0.02252805046737194, 0.004552033264189959, 0.017305463552474976, -0.013050021603703499, -0.007324517704546452, 0...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def testGetAPINodeAvailability(self): def assertEquals(node, actual): node_availabilities = { 'tabs.Tab': None, 'tabs.fakeTabsProperty1': None, 'tabs.get': None, 'tabs.onUpdated': None, 'tabs.InjectDetails': 25, 'tabs.fakeTabsProperty2': 15, ...
9,060
[ -0.0001494694297434762, 0.038967788219451904, -0.0008271342958323658, 0.018614724278450012, 0.019649451598525047, 0.015396726317703724, 0.03354582563042641, 0.058110225945711136, 0.0025932826101779938, 0.008495102636516094, 0.006989575456827879, -0.0056547787971794605, 0.010067885741591454, ...
11
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "command", "annotation"...
class ShellCommandJob(gobject.GObject): def execute(self, command): self.command = command Thread(target = self._process).start() def _process(self): handle = os.popen(self.command) line = handle.readline() while line: self.emit("output", line) ...
9,061
[ 0.003512115916237235, 0.03436897695064545, 0.0007984712137840688, -0.013886455446481705, 0.00017204378673341125, 0.005297104362398386, 0.014916367828845978, 0.01962619088590145, -0.012914403341710567, -0.009055126458406448, 0.0503152571618557, 0.005192955955862999, -0.017311781644821167, 0...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Return", "_fields": {"value": {"_type": "Call", "_fields": {"a...
def getregentry(): return codecs.CodecInfo( name='iso2022_jp_1', encode=Codec().encode, decode=Codec().decode, incrementalencoder=IncrementalEncoder, incrementaldecoder=IncrementalDecoder, streamreader=StreamReader, streamwriter=StreamWriter, )
9,062
[ 0.03177398070693016, 0.014202186837792397, 0.04703213647007942, -0.04162177816033363, -0.01496153511106968, -0.005472647026181221, -0.027146702632308006, -0.0003238724311813712, 0.02543816901743412, 0.020502405241131783, 0.03443169966340065, 0.0349300242960453, -0.011520737782120705, -0.01...
14
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "test_output", "annotat...
class GTestOutputTest(gtest_test_utils.TestCase): def RemoveUnsupportedTests(self, test_output): if not SUPPORTS_DEATH_TESTS: test_output = RemoveMatchingTests(test_output, 'DeathTest') if not SUPPORTS_TYPED_TESTS: test_output = RemoveMatchingTests(test_output, 'TypedTest') test_output = Rem...
9,063
[ 0.021120091900229454, -0.01041512843221426, 0.05574897676706314, -0.034679289907217026, -0.05267421156167984, 0.023552177473902702, -0.02144772931933403, -0.009539324790239334, 0.04077840968966484, 0.03946785628795624, 0.028076112270355225, -0.007573493290692568, 0.00724585447460413, 0.009...
7
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "test_output", "annotation": null, "type_comment": null}}], "kwarg...
def RemoveUnsupportedTests(self, test_output): if not SUPPORTS_DEATH_TESTS: test_output = RemoveMatchingTests(test_output, 'DeathTest') if not SUPPORTS_TYPED_TESTS: test_output = RemoveMatchingTests(test_output, 'TypedTest') test_output = RemoveMatchingTests(test_output, 'TypedDeathTest') ...
9,064
[ 0.041017018258571625, 0.019010627642273903, 0.05040375143289566, -0.04276454821228981, 0.00899977795779705, -0.006628130562603474, -0.016127202659845352, -0.0062567805871367455, -0.004843153990805149, 0.033777251839637756, 0.045935068279504776, 0.04221532493829727, -0.004197191912680864, -...
13
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def testOutput(self): output = GetOutputOfAllCommands() golden_file = open(GOLDEN_PATH, 'rb') # A mis-configured source control system can cause \r appear in EOL # sequences when we read the golden file irrespective of an operating # system used. Therefore, we need to strip those \r's from newlines...
9,065
[ 0.05910109356045723, -0.03398554027080536, 0.02083723247051239, -0.033455267548561096, 0.009092939086258411, 0.00965333916246891, -0.008044449612498283, -0.024380406364798546, 0.019403090700507164, -0.004136715084314346, 0.01655891165137291, -0.0326116569340229, 0.023102935403585434, 0.023...
8
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs...
class StoryTest(unittest.TestCase): def testStoriesHaveDifferentIds(self): s0 = story.Story(SharedStateBar, 'foo') s1 = story.Story(SharedStateBar, 'bar') self.assertNotEqual(s0.id, s1.id) def testNamelessStoryDisplayName(self): s = StoryFoo() self.assertEquals('StoryFoo', s.display_name) de...
9,066
[ 0.03177423030138016, -0.014943700283765793, 0.07358640432357788, -0.02298159897327423, -0.008754895068705082, 0.01841546967625618, -0.04456694424152374, -0.011292682960629463, -0.04256690293550491, 0.01740601472556591, -0.00625484436750412, 0.019415488466620445, 0.05796344205737114, -0.011...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "names", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "dtypes", "annotation": null, "type_comment": null}}], "kwarg": n...
def _as_name_list(names, dtypes): if names is None: return None if not isinstance(names, (list, tuple)): names = [names] if len(names) != len(dtypes): raise ValueError("List of names must have the same length as the list " "of dtypes") return list(names)
9,067
[ 0.01184639148414135, -0.022277336567640305, 0.00027675318415276706, -0.00240689585916698, -0.0044503663666546345, -0.0058945040218532085, 0.011482966132462025, -0.009347044862806797, 0.040958672761917114, -0.026880724355578423, 0.014026942662894726, -0.002894650911912322, 0.02536326274275779...
7
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def testMakeJavaScriptDeterministic(self): s = story.Story(SharedStateBar) self.assertTrue(s.make_javascript_deterministic) s = story.Story(SharedStateBar, make_javascript_deterministic=False) self.assertFalse(s.make_javascript_deterministic) s = story.Story(SharedStateBar, make_javascript_determi...
9,068
[ 0.07060746103525162, -0.009998852387070656, 0.08626187592744827, 0.0025258425157517195, -0.009394972585141659, -0.0025243908166885376, 0.0016142165986821055, 0.01222856156527996, -0.06842420250177383, -0.03521082550287247, 0.04373481869697571, 0.022808067500591278, 0.04784584417939186, -0....
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "dtypes", "annotation": null, "type_comment": null}}, {"_type": "a...
def __init__(self, dtypes, shapes=None, names=None, shared_name=None, capacity=0, memory_limit=0): if shared_name is None: self._name = (ops.get_default_graph() .unique_name(self.__class__.__name__)) elif isinstance(shared_name, six.string_types): self._name ...
9,069
[ 0.049167074263095856, 0.016449781134724617, 0.0004414328432176262, -0.002566006500273943, 0.012679090723395348, 0.03237554058432579, 0.045066021382808685, -0.006123100873082876, -0.014137242920696735, -0.023398788645863533, -0.023057034239172935, -0.013077803887426853, 0.04417746141552925, ...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "dtype", "annotation": null, "type_comment": null}}, {"_type": "ar...
def __init__(self, dtype, shape=None, shared_name=None, name="sparse_conditional_accumulator"): accumulator_ref = gen_data_flow_ops.sparse_conditional_accumulator( dtype=dtype, shape=shape, shared_name=shared_name, name=name) super(SparseCondit...
9,070
[ 0.022163543850183487, 0.04270040616393089, 0.03965037688612938, -0.0102582648396492, 0.0003532950358930975, -0.017954504117369652, 0.018259506672620773, -0.028060266748070717, -0.0009480506996624172, 0.025660911574959755, -0.015219644643366337, -0.020445361733436584, 0.02948361448943615, -...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "path", "annotation": null, "type_comment": null}}], "kwarg": null...
def add(self, path): path = os.path.realpath(path) if os.path.isfile(path): self._paths.add(path) for root, _, files in os.walk(path): for basename in files: file_path = os.path.join(root, basename) if os.path.isfile(file_path): self._paths.add(file_path)
9,071
[ 0.007705391850322485, 0.013990532606840134, 0.08970899134874344, -0.05295204743742943, -0.016746243461966515, 0.00116455287206918, -0.027769088745117188, 0.021664127707481384, -0.020890409126877785, -0.00048589278594590724, 0.00978277437388897, -0.014213109388947487, 0.0429890900850296, -0...
12
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "indices", "annotation": null, "type_comment": null}}], "kwarg": n...
def _get_indices_and_dtypes(self, indices=None): if indices is None: indices = list(six.moves.range(len(self._dtypes))) if not isinstance(indices, (tuple, list)): raise TypeError("Invalid indices type '%s'" % type(indices)) if len(indices) == 0: raise ValueError("Empty indices") if ...
9,072
[ -0.0027571518439799547, 0.022143859416246414, 0.033023934811353683, -0.03139006718993187, -0.016153011471033096, -0.017923034727573395, -0.014172565191984177, -0.017155611887574196, -0.011777463369071484, 0.0076494719833135605, 0.04300042986869812, -0.02418619394302368, 0.02448326162993908, ...
13
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs...
class TestBaseViewInheritanceExtension(TransactionCase): def test_base_view_inheritance_extension(self): view_id = self.env.ref('base.view_partner_form').id fields_view_get = self.env['res.partner'].fields_view_get( view_id=view_id ) view = etree.fromstring(fields_view_g...
9,073
[ 0.032731253653764725, 0.05240955948829651, 0.026773372665047646, -0.01045100949704647, -0.023744991049170494, -0.0005017690127715468, 0.014239578507840633, -0.004270637407898903, -0.025562020018696785, -0.00855981558561325, 0.058738257735967636, -0.03342345356941223, 0.048182182013988495, ...
12
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_base_view_inheritance_extension(self): view_id = self.env.ref('base.view_partner_form').id fields_view_get = self.env['res.partner'].fields_view_get( view_id=view_id ) view = etree.fromstring(fields_view_get['arch']) # verify normal attributes work se...
9,074
[ -0.010678702034056187, 0.00929264072328806, 0.00639998959377408, -0.018476806581020355, -0.01846475340425968, -0.03685719147324562, -0.019199969246983528, 0.00489942729473114, 0.011058363132178783, 0.031192416325211525, 0.02193593420088291, -0.009298667311668396, -0.002268922980874777, -0....
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_list_add(self): view_model = self.env['ir.ui.view'] inherit_id = self.env.ref('base.view_partner_form').id source = etree.fromstring( """\ <form> <button name="test" states="draft,open"/> </form> """ ) # ext...
9,075
[ 0.005508521571755409, 0.03030000813305378, -0.0056812516413629055, -0.03349080681800842, -0.031103989109396935, -0.026883091777563095, -0.03208383917808533, 0.027184585109353065, 0.022134583443403244, 0.03866643086075783, 0.05929354950785637, -0.037083592265844345, 0.00013808597577735782, ...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_list_remove(self): view_model = self.env['ir.ui.view'] inherit_id = self.env.ref('base.view_partner_form').id source = etree.fromstring( """\ <form> <button name="test" states="draft,open,valid,payable,paid"/> </form> """ ...
9,076
[ 0.04085570573806763, -0.006754586473107338, 0.00768221216276288, -0.005880542565137148, 0.012404059991240501, -0.007487980183213949, 0.03705143555998802, 0.049000054597854614, 0.004259709734469652, -0.006690958980470896, 0.03362223505973816, -0.02178077958524227, -0.023696308955550194, -0....
7
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def setUp(self): # login POST dicts self.super_login = {'post_data': _encode_post_data({}), LOGIN_FORM_KEY: 1, 'username': 'super', 'password': 'secret'} self.super_email_login = {'post_data': _encode_post_data({}), ...
9,077
[ 0.04787202179431915, -0.010043502785265446, 0.02537938952445984, -0.025716178119182587, -0.00832347758114338, -0.002343985019251704, -0.006994367111474276, 0.0023334603756666183, 0.024681756272912025, 0.032355714589357376, -0.008016759529709816, -0.05677285045385361, 0.027183610945940018, ...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def testCustomModelAdminTemplates(self): self.client.get('/test_admin/admin/') self.client.post('/test_admin/admin/', self.super_login) # Test custom change list template with custom extra context request = self.client.get('/test_admin/admin/admin_views/customarticle/') self.fai...
9,078
[ 0.010347978211939335, 0.0027741265948861837, 0.006531054154038429, -0.023587219417095184, -0.047083016484975815, -0.04214615374803543, 0.007136733736842871, -0.04454601928591728, -0.017244726419448853, 0.033940911293029785, -0.00008142390288412571, 0.020867375656962395, 0.039997708052396774,...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def __setup_lookup_result_treeview (self): tv = self.view['lookup_treeview'] tv.set_model(self.model.resultlist_sort) # Column containing main details. cell = gtk.CellRendererText() cell.set_property('wrap-width', 250) cell.set_property('wrap-mode', pango.WRAP_WORD) ...
9,079
[ -0.008319923654198647, 0.01799820177257061, 0.0054451292380690575, -0.030703503638505936, -0.03098454140126705, 0.0009719263180159032, 0.04349077492952347, -0.015632789582014084, -0.03850233182311058, 0.04063354432582855, 0.023431621491909027, 0.026745537295937538, 0.055458348244428635, -0...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "view", "annotation": null, "type_comment": null}}], "kwarg": null...
def register_view (self, view): self.__setup_filelist_treeview() self.__setup_lookup_views() self.__setup_filters() self.__setup_name_treeview() self.__setup_file_treeview() self.__setup_key_treeview() self.__setup_selection_treeview() self.__treeviews = {...
9,080
[ 0.012726398184895515, 0.026862235739827156, 0.04456312209367752, -0.02346300147473812, -0.03606503829360008, -0.009311619214713573, 0.03397160768508911, -0.034738507121801376, 0.008539537899196148, 0.00901625957340002, 0.005277620628476143, 0.039899539202451706, 0.023400820791721344, -0.00...
7
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "treeview", "annotation": null, "type_comment": null}}], "kwarg": ...
def __setup_markup_treeview (self, treeview): name_cell = gtk.CellRendererText() name_col = gtk.TreeViewColumn('Data', name_cell) name_col.set_expand(True) name_col.set_resizable(True) name_col.set_cell_data_func(name_cell, self.__render_row_object) name_cell.set_property...
9,081
[ 0.03191143646836281, 0.06059865653514862, 0.015625029802322388, -0.03530099242925644, -0.01799151860177517, -0.031498074531555176, 0.02308618649840355, -0.05443958565592766, 0.029906636103987694, -0.010204838588833809, -0.0008325339877046645, -0.009951655752956867, -0.006458758842200041, -...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "column", "annotation": null, "type_comment": null}}, {"_type": "a...
def __render_file_object (self, column, cell, model, iter): xml_file = model.get_value(iter, FILE_OBJECT_COLUMN) text = '%s [%d / %d]' % \ (xml_file.basename, xml_file.unkeyed_count, xml_file.keyed_count) if xml_file.is_modified: text = '<i>%s</i>' % text if xml_f...
9,082
[ 0.03871273994445801, 0.026345564052462578, -0.002985649276524782, -0.013706224970519543, 0.0003289793385192752, -0.03087438829243183, 0.04075941815972328, 0.03762407973408699, -0.03128807991743088, 0.002737979171797633, 0.03370490297675133, -0.005029607564210892, 0.004624081775546074, 0.00...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": {"_type": "arg", "_fields": {"arg": "args", "annotation": null, "type_commen...
def on_file_open_dialog_open_button_clicked (self, *args): filenames = self.view['file_open_dialog'].get_filenames() for treeview in self.__treeviews.keys(): self.__freeze_treeview(treeview) self.view['progress_dialog'].show() task = self.model.add_files(filenames) go...
9,083
[ 0.04008493945002556, 0.07592453807592392, -0.0030583199113607407, -0.01831081695854664, -0.040688224136829376, 0.030007844790816307, 0.017148936167359352, 0.015495487488806248, 0.02931518293917179, 0.03309129923582077, 0.04155963659286499, -0.04046478495001793, 0.023751555010676384, 0.0317...
13
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": {"_type": "arg", "_fields": {"arg": "args", "annotation": null, "type_commen...
def on_main_window_delete_event (self, *args): for xml_file in self.model.files.values(): modified_files = xml_file.is_modified if modified_files: response = self.view['confirm_quit_dialog'].run() if response == gtk.RESPONSE_OK: # Save ...
9,084
[ 0.00484817661345005, 0.02453252300620079, -0.0217604860663414, 0.031647417694330215, -0.03511246293783188, -0.023700911551713943, 0.03388814628124237, 0.015246201306581497, -0.022696049883961678, 0.0217604860663414, 0.027951369062066078, 0.0016155774937942624, 0.03414224833250046, -0.01120...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": {"_type": "arg", "_fields": {"arg": "args", "annotation": null, "type_commen...
def on_lookup_window_search_button_clicked (self, *args): display_name = self.view['display_name_entry'].get_text() given_name, family_name, terms_of_address = ('', '', '') if self.view['given_name_entry'].get_property('sensitive'): given_name = self.view['given_name_entry'].get_text...
9,085
[ -0.02653050608932972, 0.007686353754252195, -0.002201118739321828, -0.0006205281824804842, -0.06720437109470367, 0.03296995162963867, -0.006006244570016861, -0.004179784096777439, -0.03261870890855789, 0.016777677461504936, 0.002325517125427723, -0.005719396285712719, 0.05924287810921669, ...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "treeview", "annotation": null, "type_comment": null}}, {"_type": ...
def on_lookup_treeview_query_tooltip (self, treeview, x, y, keyboard_mode, tooltip): path_data = treeview.get_path_at_pos(x, y) model = treeview.get_model() if path_data is None: return False iter = model.get_iter(path_data[0]) ...
9,086
[ 0.010689940303564072, 0.029119007289409637, 0.007987730205059052, -0.01059806440025568, -0.038436226546764374, 0.025357531383633614, 0.04820741340517998, 0.015337740071117878, -0.015078327618539333, 0.011197955347597599, 0.019812598824501038, 0.011176337487995625, 0.05010977014899254, 0.01...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "cell", "annotation": null, "type_comment": null}}, {"_type": "arg...
def on_select_cell_toggled (self, cell, path, treeview): filter = treeview.get_model() filter_iter = filter.get_iter(path) is_keyed = filter.get_value(filter_iter, IS_KEYED_COLUMN) model = filter.get_model() model_iter = filter.convert_iter_to_child_iter(filter_iter) self...
9,087
[ 0.025665471330285072, 0.04367748647928238, -0.017143303528428078, -0.034198638051748276, -0.04424929618835449, -0.0012040999718010426, -0.009962690062820911, 0.0053717149421572685, 0.026919055730104446, 0.03628794103860855, 0.05889642983675003, -0.02584141306579113, 0.044799115508794785, 0...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": {"_type": "arg", "_fields": {"arg": "args", "annotation": null, "type_commen...
def on_filelist_remove_menu_item_activate (self, *args): selection = self.view['filelist_treeview'].get_selection() file_iter = selection.get_selected()[1] if file_iter: xml_file = self.model.get_file_from_iter(file_iter) if xml_file.is_modified: # Prompt ...
9,088
[ 0.02551790326833725, -0.0015354856150224805, -0.008460723794996738, 0.055876970291137695, -0.02203407697379589, 0.02420581318438053, 0.02888862043619156, 0.015428378246724606, -0.005446307826787233, 0.0117183281108737, -0.0003205997636541724, -0.02866239659488201, 0.020167740061879158, 0.0...
12
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "combobox", "annotation": null, "type_comment": null}}], "kwarg": ...
def on_entity_type_combobox_changed (self, combobox): entity_type = self.__get_combobox_value(combobox, ENTITY_TYPE_NAME_COLUMN) if entity_type is None: return False current_display_name = self.view['display_name_entry'].get_text() ...
9,089
[ 0.05111227557063103, 0.014085434377193451, -0.013164594769477844, -0.03255906701087952, -0.036447055637836456, 0.03856157511472702, 0.01664332114160061, 0.025306034833192825, -0.04260872304439545, 0.02617003209888935, 0.013369225896894932, -0.040516939014196396, 0.03446895629167557, 0.0678...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "selection", "annotation": null, "type_comment": null}}], "kwarg":...
def on_selection_changed (self, selection): filter, selected_iter = selection.get_selected() self.__set_editing_sensitivity(selected_iter) if selected_iter is not None: model = filter.get_model() # Do not synchronise selections if we are dealing with a # selec...
9,090
[ 0.0087721087038517, 0.0009232116863131523, 0.06889906525611877, -0.05044760927557945, -0.003034778870642185, -0.006676513701677322, 0.002440601121634245, 0.01411970891058445, -0.02412489615380764, 0.019154246896505356, 0.0256582573056221, -0.041145212948322296, 0.015525290742516518, -0.016...
13
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def _init_sequence(self): #Number of fileds in gui - number of freqs one at the time fields_count = int(self.config.get_param("fields_count")) #Number of trials for every target freq target_count = int(self.config.get_param("target_count")) #A list of lists of freqs, from which...
9,091
[ -0.004637327045202255, 0.0059996480122208595, 0.07262088358402252, -0.02193302847445011, -0.06713083386421204, -0.013100024312734604, 0.016415799036622047, -0.03693554550409317, 0.00987937580794096, 0.012243902310729027, 0.04609469324350357, -0.06588061898946762, 0.018454184755682945, -0.0...
12
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "addresses", "annotation": null, "type_comment": null}}], "kwarg":...
def __init__(self, addresses): super(LogicSSVEPCalibration, self).__init__(addresses=addresses, type=peers.LOGIC_SSVEP_CALIBRATION) self.ugm = ugm_config_manager.UgmConfigManager(self.config.get_param("ugm_config")).config_to_message() self.text_ids = [i...
9,092
[ 0.011652846820652485, 0.03005557507276535, 0.043209873139858246, -0.04565471038222313, -0.03087938018143177, 0.03933002054691315, 0.022641334682703018, 0.04119022190570831, 0.017964251339435577, 0.028434541076421738, 0.03497182950377464, -0.016569100320339203, -0.03927687183022499, -0.0053...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def _run(self): self._send_exp_info() while True: try: freqs, target_ind = self.sequence.get_nowait() except: # sequence empty return self.logger.debug("NExt freqs: "+str(freqs)+" and target_ind: "+str(target_ind)) ...
9,093
[ 0.029986120760440826, -0.0046088360249996185, -0.0038279476575553417, -0.02990962564945221, -0.026747822761535645, 0.024350972846150398, -0.018397096544504166, 0.0006677393685095012, 0.003690893528982997, 0.007126803044229746, 0.009134802035987377, 0.003464595414698124, 0.02500118315219879, ...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def _send_exp_info(self): desc = dict(self.config.param_values()) desc['all_freqs'] = ';'.join(self.all_freqs) t = time.time() tags_helper.send_tag( self.conn, t, t, "experimentInfo", desc)
9,094
[ -0.0016015622531995177, -0.00986116100102663, 0.01336069405078888, -0.031438425183296204, -0.025726985186338425, 0.032330840826034546, -0.0181924719363451, -0.003211092436686158, 0.01933985948562622, 0.0015569415409117937, 0.010428480803966522, -0.01756778359413147, -0.01752953603863716, -...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "freqs", "annotation": null, "type_comment": null}}, {"_type": "ar...
def _send_freqs(self, freqs, target_ind): appliance_helper.send_freqs(self.conn, freqs) t = time.time() tags_helper.send_tag(self.conn, t, t, "diodes", {'freq':freqs[target_ind], 'freqs':freqs, 'field':targe...
9,095
[ 0.013959519565105438, 0.012221189215779305, 0.019709888845682144, -0.030827270820736885, -0.003688168479129672, 0.004216938279569149, 0.04037156328558922, 0.027654653415083885, 0.03407920524477959, 0.037357576191425323, 0.03799210116267204, -0.021164005622267723, -0.026649991050362587, 0.0...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "target_ind", "annotation": null, "type_comment": null}}], "kwarg"...
def _send_feed(self, target_ind): if self.feed_time <= 0: return #prepare and send feed text l_config = [{'id':self.text_ids[target_ind], 'message':self.feed_text}] l_str_config = str(l_config) ugm_helper.send_config(self.conn, l_str_config, 1) ...
9,096
[ -0.0007825513021089137, 0.002888641320168972, 0.035340651869773865, -0.0159345380961895, -0.03918252885341644, -0.004206393845379353, -0.03536379709839821, -0.023838160559535027, 0.039413969963788986, 0.025921106338500977, -0.006734859198331833, -0.08461389690637589, -0.009714629501104355, ...
9
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "routeDomain"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "answerDefaultZones"}}, {...
class Parameters(AnsibleF5Parameters): api_map = { 'routeDomain': 'route_domain', 'answerDefaultZones': 'answer_default_zones', 'forwardZones': 'forward_zones', } api_attributes = [ 'routeDomain', 'answerDefaultZones', 'forwardZones', ] returnables =...
9,097
[ 0.002826782176271081, 0.01160413958132267, 0.024631166830658913, -0.022213637828826904, -0.08272093534469604, 0.004254851024597883, 0.032270558178424835, 0.007266401778906584, 0.015914248302578926, 0.014000946655869484, 0.04249325394630432, 0.01390424557030201, -0.04017242416739464, -0.017...
12
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def _send_breaks(self): t = time.time() tags_helper.send_tag(self.conn, t, t, "break",{'duration':sum(self.break_times)}) appliance_helper.send_stop(self.conn) for i, t in enumerate(self.break_times): ugm_helper.send_text(self.conn, self.break_texts[i]) #u...
9,098
[ 0.05967678874731064, -0.014474027790129185, 0.007531788200139999, -0.022535206750035286, 0.03253347426652908, 0.004271221812814474, -0.015641093254089355, -0.005296916700899601, 0.028274284675717354, 0.024171506986021996, 0.013427278026938438, 0.005787204951047897, -0.016880350187420845, -...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def forward_zones(self): if self._values['forward_zones'] is None: return None result = [] for x in self._values['forward_zones']: tmp = dict( name=x['name'], nameservers=[] ) if 'nameservers' in x: t...
9,099
[ 0.06388504803180695, -0.016005268320441246, -0.00917015690356493, -0.023418473079800606, 0.01274073775857687, -0.012446022592484951, -0.03207854554057121, -0.0019000588217750192, 0.028088565915822983, 0.0005377124180085957, -0.0032560292165726423, -0.03171582147479057, -0.027884531766176224,...
11
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs...
class ApiParameters(Parameters): @property def forward_zones(self): if self._values['forward_zones'] is None: return None result = [] for x in self._values['forward_zones']: tmp = dict( name=x['name'], nameservers=[] ) ...
9,100
[ 0.05005453899502754, 0.01296743843704462, -0.00413244916126132, -0.02620716020464897, 0.011350763030350208, 0.016382310539484024, -0.02156701683998108, -0.007016938645392656, 0.03217467665672302, 0.026797104626893997, 0.005544913001358509, -0.026774413883686066, -0.03716651722788811, -0.02...
12
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs...
class ModuleParameters(Parameters): @property def forward_zones(self): if self._values['forward_zones'] is None: return None elif self._values['forward_zones'] in ['', 'none']: return '' result = [] for x in self._values['forward_zones']: if 'n...