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
1,801
[ 0.003880101488903165, 0.03225117549300194, 0.01894977129995823, -0.03663874790072441, 0.0012899524299427867, 0.01799156703054905, 0.046195585280656815, 0.013414875604212284, -0.00957574974745512, 0.03986638784408569, 0.030738219618797302, 0.0033285028766840696, -0.038429077714681625, -0.01...
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_mode_full_fresh(self): self.setupStep( svn.SVN(repourl='http://svn.local/app/trunk', mode='full', method='fresh', depth='infinite')) self.expectCommands( ExpectShell(workdir='wkdir', command=['svn', '--version']) + ...
1,802
[ -0.00615724315866828, 0.031152456998825073, 0.023076357319951057, -0.042847149074077606, -0.00840790756046772, 0.02392779104411602, 0.05649513006210327, 0.025893602520227432, -0.012765245512127876, 0.026995457708835602, 0.02767159603536129, -0.003059839829802513, -0.042847149074077606, -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 test_mode_full_fresh_retry(self): self.setupStep( svn.SVN(repourl='http://svn.local/app/trunk', mode='full', method='fresh', retry=(0, 2))) self.expectCommands( ExpectShell(workdir='wkdir', command=['svn', '--version']) ...
1,803
[ 0.005589891690760851, 0.031185710802674294, 0.007617346476763487, -0.04208408296108246, -0.005752983503043652, 0.032336946576833725, 0.03878387063741684, 0.02548069693148136, -0.005449185147881508, 0.03210670128464699, 0.05218937620520592, 0.00018527708016335964, -0.024457374587655067, -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 test_mode_full_fresh_keep_on_purge(self): self.setupStep( svn.SVN(repourl='http://svn.local/app/trunk', mode='full', keep_on_purge=['svn_external_path/unversioned_file1'])) self.expectCommands( ExpectShell(workdir='wkdir', ...
1,804
[ 0.021587442606687546, 0.032227758318185806, 0.020630182698369026, -0.039787657558918, -0.0072653586976230145, 0.027294186875224113, 0.03983674943447113, 0.009130788967013359, -0.018568390980362892, 0.027466000989079475, 0.02672964707016945, -0.006166964303702116, -0.05154477432370186, -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}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_mode_full_fresh_given_revision(self): self.setupStep( svn.SVN(repourl='http://svn.local/app/trunk', mode='full', method='fresh', depth='infinite'), dict( revision='100', )) self.expectCommands( ExpectShell(workdir='wkdir', ...
1,805
[ 0.02024153247475624, 0.030083060264587402, 0.015376614406704903, -0.04882292076945305, -0.011895467527210712, 0.020129837095737457, 0.042021967470645905, 0.026632940396666527, -0.0035369936376810074, 0.047159913927316666, 0.038497380912303925, 0.01196372602134943, -0.0413517989218235, -0.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 test_mode_full_clean(self): self.setupStep( svn.SVN(repourl='http://svn.local/app/trunk', mode='full', method='clean')) self.expectCommands( ExpectShell(workdir='wkdir', command=['svn', '--version']) + 0, Exp...
1,806
[ 0.03846706077456474, 0.03414164483547211, 0.022003741934895515, -0.051807817071676254, -0.02060648612678051, 0.028406819328665733, 0.03032652847468853, 0.021687841042876244, -0.014871662482619286, 0.035891249775886536, 0.03421454504132271, 0.0018179514445364475, -0.047506701201200485, -0.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 test_mode_full_clean_given_revision(self): self.setupStep( svn.SVN(repourl='http://svn.local/app/trunk', mode='full', method='clean'), dict( revision='100', )) self.expectCommands( ExpectShell(workdir='wkdir', ...
1,807
[ 0.0066955420188605785, 0.03893333673477173, 0.018586328253149986, -0.0423555001616478, -0.01918148808181286, 0.03109707124531269, 0.051332488656044006, 0.016701657325029373, -0.0063917627558112144, 0.02503388747572899, 0.023719577118754387, 0.020818175747990608, -0.048009514808654785, -0.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 test_mode_full_not_updatable(self): self.setupStep( svn.SVN(repourl='http://svn.local/app/trunk', mode='full', method='clean')) self.expectCommands( ExpectShell(workdir='wkdir', command=['svn', '--version']) + 0, ...
1,808
[ 0.019962215796113014, 0.0423390232026577, 0.023500429466366768, -0.04520784318447113, -0.03612324222922325, 0.027397245168685913, 0.03499962016940117, 0.009574691765010357, -0.014475595206022263, 0.021456394344568253, 0.021671555936336517, 0.009491018019616604, -0.04728773981332779, -0.005...
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 test_mode_full_not_updatable_given_revision(self): self.setupStep( svn.SVN(repourl='http://svn.local/app/trunk', mode='full', method='clean'), dict( revision='100', )) self.expectCommands( ExpectShell(workdir='wkdir', ...
1,809
[ 0.02948135696351528, 0.03918344900012016, 0.01701616868376732, -0.039108432829380035, -0.004916685167700052, 0.01869153045117855, 0.05911274626851082, 0.03118172287940979, 0.006870231591165066, 0.04625997319817543, 0.041884031146764755, 0.010039664804935455, -0.038458291441202164, -0.00819...
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 test_mode_full_clean_new_rmdir(self): self.setupStep( svn.SVN(repourl='http://svn.local/app/trunk', mode='full', method='clean')) self.patch_workerVersionIsOlderThan(False) self.expectCommands( ExpectShell(workdir='wkdir', ...
1,810
[ 0.025223508477211, 0.03209332749247551, 0.017520597204566002, -0.04419240728020668, -0.002467238577082753, 0.02166043221950531, 0.05336925387382507, 0.02536449395120144, -0.004229551646858454, 0.03670738264918327, 0.04396170377731323, 0.009952262975275517, -0.03645104542374611, 0.005338206...
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 test_mode_full_clean_old_rmdir(self): self.setupStep( svn.SVN(repourl='http://svn.local/app/trunk', mode='full', method='clean')) self.patch_workerVersionIsOlderThan(True) self.expectCommands( ExpectShell(workdir='wkdir', co...
1,811
[ 0.03869784623384476, 0.03239656239748001, 0.01982913166284561, -0.05214370787143707, -0.022452715784311295, 0.030218051746487617, 0.025205133482813835, -0.001622170559130609, -0.026868298649787903, 0.019278649240732193, 0.03794825077056885, 0.006886904593557119, -0.03047572448849678, 0.005...
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 test_mode_full_copy_given_revision(self): self.setupStep( svn.SVN(repourl='http://svn.local/app/trunk', mode='full', method='copy'), dict( revision='100', )) self.expectCommands( ExpectShell(workdir='wkdir', ...
1,812
[ 0.015709009021520615, 0.02515803650021553, 0.015496404841542244, -0.05239485949277878, -0.017563380300998688, 0.010057308711111546, 0.04067806527018547, -0.013606599532067776, -0.03399287536740303, 0.02605569362640381, 0.03496140241622925, 0.008197030983865261, -0.026528144255280495, -0.00...
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 test_mode_full_copy(self): self.setupStep( svn.SVN(repourl='http://svn.local/app/trunk', mode='full', method='copy', codebase='app')) self.expectCommands( ExpectShell(workdir='wkdir', command=['svn', '--version']...
1,813
[ 0.000808270531706512, 0.02237616665661335, 0.026886286213994026, -0.04669592157006264, -0.010527762584388256, 0.02322337217628956, 0.02159125730395317, 0.014203134924173355, -0.01358019094914198, 0.02691120281815529, 0.04402972012758255, 0.04657133296132088, -0.03441145643591881, -0.016831...
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_mode_full_export_patch(self): self.setupStep( svn.SVN(repourl='http://svn.local/app/trunk', mode='full', method='export'), patch=(1, 'patch')) self.expectCommands( ExpectShell(workdir='wkdir', command=['svn', '--ver...
1,814
[ -0.0038279579021036625, 0.03113405779004097, 0.03592204302549362, -0.056678082793951035, -0.008506573736667633, 0.0076376874931156635, 0.02593289688229561, 0.02418297342956066, -0.02487565018236637, 0.034123510122299194, 0.02904387190937996, 0.027293948456645012, -0.03234928473830223, -0.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 test_mode_full_export(self): self.setupStep( svn.SVN(repourl='http://svn.local/app/trunk', mode='full', method='export')) self.expectCommands( ExpectShell(workdir='wkdir', command=['svn', '--version']) + 0, E...
1,815
[ 0.0013021486811339855, 0.021456299349665642, 0.031593624502420425, -0.05189314857125282, -0.01651824079453945, 0.018234744668006897, 0.03497687727212906, 0.02513807639479637, -0.01721479371190071, 0.020709993317723274, 0.0349271260201931, 0.04612171649932861, -0.04345989227294922, -0.02972...
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_mode_full_export_patch_worker_2_16(self): self.setupStep( svn.SVN(repourl='http://svn.local/app/trunk', mode='full', method='export'), patch=(1, 'patch'), worker_version={'*': '2.16'}) self.expectCommands( ExpectShell(workdir='...
1,816
[ -0.004171323496848345, 0.029513562098145485, 0.04301314800977707, -0.05785536766052246, -0.02707240730524063, 0.020420260727405548, 0.03966876491904259, 0.02442375384271145, -0.02258068136870861, 0.027609461918473244, 0.03568968176841736, 0.02516830526292324, -0.03158854320645332, -0.02134...
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 test_mode_full_export_timeout(self): self.setupStep( svn.SVN(repourl='http://svn.local/app/trunk', timeout=1, mode='full', method='export')) self.expectCommands( ExpectShell(workdir='wkdir', timeout=1, ...
1,817
[ 0.017042580991983414, 0.034417469054460526, 0.042392827570438385, -0.0594828799366951, -0.022240804508328438, 0.016330495476722717, 0.014194238930940628, 0.020472459495067596, -0.032399892807006836, 0.02601485885679722, 0.026442110538482666, 0.016710273921489716, -0.03531944379210472, -0.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 test_mode_full_export_given_revision(self): self.setupStep( svn.SVN(repourl='http://svn.local/app/trunk', mode='full', method='export'), dict( revision='100', )) self.expectCommands( ExpectShell(workdir='wkdir', ...
1,818
[ -0.004069057293236256, 0.03333567455410957, 0.03443707525730133, -0.054482534527778625, -0.009631122462451458, 0.009049828164279461, 0.021648608148097992, 0.024414343759417534, -0.027779730036854744, 0.026776233687996864, 0.030814696103334427, 0.028000010177493095, -0.02465909905731678, -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 test_mode_full_export_auth(self): self.setupStep( svn.SVN(repourl='http://svn.local/app/trunk', mode='full', method='export', username='svn_username', password='svn_password')) self.expectCommands( ExpectShell(workdir='wkdir', ...
1,819
[ 0.03127484396100044, 0.03630996122956276, 0.020983992144465446, -0.04765195772051811, -0.0063393195159733295, 0.025642774999141693, 0.06068098172545433, 0.015040474012494087, -0.01709085702896118, 0.018388569355010986, 0.028393922373652458, 0.01980307511985302, -0.03815271332859993, -0.005...
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 test_mode_incremental_logEnviron(self): self.setupStep( svn.SVN(repourl='http://svn.local/app/trunk', mode='incremental', username='user', password='pass', extra_args=['--random'], logEnviron=False)) self.expectCommands( ...
1,820
[ 0.023390786722302437, 0.029385535046458244, 0.03939764201641083, -0.042576488107442856, -0.005781991872936487, 0.026281781494617462, 0.05882113054394722, 0.026106569916009903, -0.015944281592965126, 0.023791270330548286, 0.03291480243206024, 0.018747670575976372, -0.054716166108846664, -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 test_mode_incremental_with_env(self): self.setupStep( svn.SVN(repourl='http://svn.local/app/trunk', mode='incremental', username='user', password='pass', extra_args=['--random'], env={'abc': '123'})) self.expectCommands( ...
1,821
[ -0.010618964210152626, 0.007546077482402325, 0.017503786832094193, -0.04187943413853645, -0.016064587980508804, -0.001883277902379632, 0.0357336588203907, -0.006431021261960268, -0.001768206711858511, 0.004936716519296169, 0.024790549650788307, -0.005325689446181059, -0.03324422985315323, ...
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 test_bogus_svnversion(self): self.setupStep( svn.SVN(repourl='http://svn.local/app/trunk', mode='incremental', username='user', password='pass', extra_args=['--random'])) self.expectCommands( ExpectShell(workdir='wkdir', ...
1,822
[ -0.0005446692812256515, 0.00903880875557661, 0.04489395022392273, -0.044821929186582565, -0.018449733033776283, -0.0032650146167725325, 0.0374276302754879, 0.01127750426530838, 0.002985927974805236, 0.019374020397663116, 0.019986210390925407, -0.0010705826571211219, -0.022074859589338303, ...
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 test_command_fails(self): self.setupStep( svn.SVN(repourl='http://svn.local/app/trunk', mode='incremental', username='user', password='pass', extra_args=['--random'])) self.expectCommands( ExpectShell(workdir='wkdir', ...
1,823
[ 0.03246057406067848, 0.04478737339377403, 0.04026754945516586, -0.020738700404763222, -0.015351432375609875, 0.022290963679552078, 0.06492114812135696, 0.024539463222026825, 0.015842221677303314, 0.019825603812932968, 0.0428926981985569, -0.002726448467001319, -0.03645537048578262, -0.0120...
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_rmdir_fails_clobber(self): self.setupStep( svn.SVN(repourl='http://svn.local/app/trunk', mode='full', method='clobber')) self.expectCommands( ExpectShell(workdir='wkdir', command=['svn', '--version']) + 0, ...
1,824
[ 0.031440071761608124, 0.020050039514899254, 0.03566937893629074, -0.04236018285155296, -0.005658653564751148, 0.008839024230837822, 0.05648024380207062, 0.018382932990789413, 0.011373250745236874, 0.029582759365439415, 0.0474398247897625, -0.013023574836552143, -0.02209755964577198, -0.009...
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_rmdir_fails_copy(self): self.setupStep( svn.SVN(repourl='http://svn.local/app/trunk', mode='full', method='copy')) self.expectCommands( ExpectShell(workdir='wkdir', command=['svn', '--version']) + 0, Exp...
1,825
[ 0.016854096204042435, 0.03243754059076309, 0.037352319806814194, -0.0390784852206707, 0.00398276885971427, 0.02181682363152504, 0.027714557945728302, 0.042890436947345734, 0.031190864741802216, 0.02701929770410061, 0.0537988506257534, -0.02426222525537014, -0.0195512305945158, -0.018148720...
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 test_rmdir_fails_purge(self): self.setupStep( svn.SVN(repourl='http://svn.local/app/trunk', mode='full', keep_on_purge=['svn_external_path/unversioned_file1'])) self.expectCommands( ExpectShell(workdir='wkdir', ...
1,826
[ 0.012677378952503204, 0.013974183239042759, 0.04435964673757553, -0.04740042984485626, -0.028663845732808113, 0.011827749200165272, 0.050754234194755554, 0.0020416281186044216, -0.0002723218931350857, 0.033828701823949814, 0.04449380189180374, 0.0010781082091853023, -0.018602432683110237, ...
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_cpdir_fails_copy(self): self.setupStep( svn.SVN(repourl='http://svn.local/app/trunk', mode='full', method='copy')) self.expectCommands( ExpectShell(workdir='wkdir', command=['svn', '--version']) + 0, Exp...
1,827
[ -0.006990474183112383, -0.008089055307209492, 0.02053964138031006, -0.03309953957796097, -0.0011300082551315427, -0.001630108687095344, 0.04569223150610924, 0.033274438232183456, -0.03502342477440834, -0.013751394115388393, 0.013838843442499638, 0.022627493366599083, -0.005402723792940378, ...
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_worker_connection_lost(self): self.setupStep( svn.SVN(repourl='http://svn.local/app/trunk', mode='incremental', username='user', password='pass', extra_args=['--random'])) self.expectCommands( ExpectShell(workdir='wkdir', ...
1,828
[ 0.0032351124100387096, 0.002504057018086314, 0.03799641132354736, -0.009074321016669273, -0.004795723594725132, -0.009683790616691113, 0.06244906038045883, 0.04237966611981392, -0.013186700642108917, 0.01601857878267765, 0.013199012726545334, 0.016966640949249268, -0.006045443471521139, -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 test_empty_password(self): self.setupStep( svn.SVN(repourl='http://svn.local/app/trunk', mode='incremental', username='user', password='', extra_args=['--random'])) self.expectCommands( ExpectShell(workdir='wkdir', ...
1,829
[ -0.01022760383784771, 0.020698999986052513, 0.04160696268081665, -0.04086397960782051, -0.011400122195482254, -0.0020461012609302998, -0.02055969089269638, -0.02491309680044651, 0.047318633645772934, -0.00014511356130242348, 0.02241714484989643, -0.006448846776038408, 0.015045374631881714, ...
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 TestGetUnversionedFiles(unittest.TestCase): def test_getUnversionedFiles_does_not_list_externals(self): svn_st_xml = """<?xml version="1.0"?> <status> <target path="."> <entry path="svn_external_path"> <wc-status props="none" item="external"> ...
1,830
[ 0.0023459286894649267, 0.02795042283833027, 0.029857274144887924, -0.02596830017864704, -0.016446590423583984, 0.008411471731960773, 0.05334164947271347, 0.0350007526576519, -0.01890542544424534, -0.0015579411992803216, 0.016797851771116257, 0.021088266745209694, -0.0038638825062662363, 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 test_omit_password(self): self.setupStep( svn.SVN(repourl='http://svn.local/app/trunk', mode='incremental', username='user', extra_args=['--random'])) self.expectCommands( ExpectShell(workdir='wkdir', command=['s...
1,831
[ -0.0010743819875642657, 0.01800372079014778, 0.04326734319329262, -0.02966545894742012, -0.014728420414030552, 0.004751271568238735, -0.025972923263907433, -0.011484413407742977, 0.05753680318593979, -0.0009231340372934937, 0.00032580242259427905, -0.010154474526643753, 0.008469885215163231,...
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_getUnversionedFiles_does_not_list_externals(self): svn_st_xml = """<?xml version="1.0"?> <status> <target path="."> <entry path="svn_external_path"> <wc-status props="none" item="external"> </wc-status> </entry>...
1,832
[ 0.012932676821947098, 0.031204627826809883, 0.03180711343884468, -0.054348405450582504, 0.005370436701923609, 0.009909857995808125, -0.015166030265390873, -0.019352270290255547, 0.03677242994308472, -0.0067987446673214436, -0.007707667537033558, -0.012132824398577213, 0.01228864025324583, ...
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_getUnversionedFiles_does_not_list_missing(self): svn_st_xml = """<?xml version="1.0"?> <status> <target path="."> <entry path="missing_file"> <wc-status props="none" item="missing"></wc-status> </entry> </target> ...
1,833
[ 0.0272831954061985, 0.03317995369434357, 0.0037842881865799427, -0.059181246906518936, -0.013171566650271416, -0.02709091082215309, -0.003108617849647999, -0.01161191612482071, 0.061275023967027664, 0.013588185422122478, 0.012925867922604084, -0.013566819950938225, -0.000495736429002136, 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_getUnversionedFiles_no_path(self): svn_st_xml = """<?xml version="1.0"?> <status> <target path="."> <entry path="svn_external_path"> <wc-status props="none" item="external"> </wc-status> </entry> ...
1,834
[ 0.01144853699952364, 0.038693953305482864, 0.027728566899895668, -0.02655220404267311, -0.024157462641596794, -0.027896618470549583, -0.00813476275652647, -0.016563616693019867, 0.011112432926893234, -0.008397344499826431, 0.040794603526592255, -0.01790803298354149, -0.02445155382156372, -...
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_getUnversionedFiles_corrupted_xml(self): svn_st_xml_corrupt = """<?xml version="1.0"?> <target path="."> <entry path="svn_external_path"> <wc-status props="none" item="external"> </wc-status> </entry> <e...
1,835
[ 0.028345612809062004, 0.026979558169841766, -0.00869791954755783, -0.06168585643172264, -0.02354308031499386, -0.030736206099390984, -0.0217074453830719, -0.017641302198171616, 0.06096014007925987, 0.002003723056986928, 0.0173318050801754, -0.010522881522774696, -0.002958893310278654, 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": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_getUnversionedFiles_no_item(self): svn_st_xml = """<?xml version="1.0"?> <status> <target path="."> <entry path="svn_external_path"> <wc-status props="none" item="external"> </wc-status> </entry> ...
1,836
[ 0.03112071193754673, 0.028963183984160423, 0.01435083243995905, -0.0625901147723198, -0.04020848125219345, -0.025454476475715637, 0.0002843333641067147, -0.0008506164303980768, 0.046114444732666016, -0.004524816293269396, 0.025018611922860146, -0.0037211915478110313, -0.01310861948877573, ...
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_getUnversionedFiles_unicode(self): svn_st_xml = """<?xml version="1.0"?> <status> <target path="."> <entry path="Path/To/Content/Developers/François"> <wc-status item="unversioned" ...
1,837
[ -0.009718538261950016, -0.009018049575388432, 0.006233756430447102, -0.033152516931295395, 0.014798549003899097, -0.01042491290718317, 0.0011728763347491622, -0.0021603291388601065, 0.04958750307559967, 0.002516459673643112, 0.024817297235131264, -0.008117422461509705, -0.04749192297458649, ...
11
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "input", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "exp", "annotation": n...
class TestSvnUriCanonicalize(unittest.TestCase): # svn.SVN.svnUriCanonicalize() test method factory # # given input string and expected result create a test method that # will call svn.SVN.svnUriCanonicalize() with the input and check # that expected result is returned # # @param input: test...
1,838
[ 0.022570492699742317, -0.012129880487918854, 0.022605685517191887, -0.004982753191143274, -0.010804274119436741, 0.007871517911553383, -0.015672650188207626, 0.008164794184267521, -0.0031967044342309237, 0.006886112038046122, 0.00879240408539772, -0.02390783093869686, 0.019098110496997833, ...
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": "declarations", "annotation": null, "type_comment": null}}], "kwar...
def SetDeclarations(self, declarations): Exporter.SetDeclarations(self, declarations) if self.declarations: decl = self.GetDeclaration(self.info.name) if isinstance(decl, Typedef): self.class_ = self.GetDeclaration(decl.type.name) if not self.info....
1,839
[ 0.002354210242629051, 0.012786746956408024, 0.05336419865489006, -0.008579088374972343, -0.003987197298556566, -0.004739915020763874, -0.0633920282125473, 0.0027400171384215355, -0.028067855164408684, 0.02223508246243, 0.026455339044332504, 0.0038202768191695213, 0.0203580129891634, -0.049...
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": "codeunit", "annotation": null, "type_comment": null}}, {"_type": ...
def Export(self, codeunit, exported_names): self.InheritMethods(exported_names) self.MakeNonVirtual() if not self.info.exclude: self.ExportBasics() self.ExportBases(exported_names) self.ExportConstructors() self.ExportVariables() self.E...
1,840
[ 0.04073897376656532, 0.00997677631676197, 0.02783380262553692, -0.0456402413547039, 0.008386112749576569, 0.00849852804094553, -0.016558639705181122, -0.011314507573843002, -0.0015653703594580293, 0.03968227654695511, 0.05481325462460518, -0.009617051109671593, -0.004364488646388054, -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}}, {"_type": "arg", "_fields": {"arg": "codeunit", "annotation": null, "type_comment": null}}], "kwarg": ...
def Write(self, codeunit): indent = self.INDENT boost_ns = namespaces.python pyste_ns = namespaces.pyste code = '' # begin a scope for this class if needed nested_codeunits = self.nested_codeunits needs_scope = self.sections['scope'] or nested_codeunits if...
1,841
[ 0.022784564644098282, 0.03644154220819473, 0.00941998977214098, -0.030203593894839287, -0.03270335868000984, 0.027795562520623207, -0.020009594038128853, -0.00024474484962411225, -0.022830430418252945, 0.04215201735496521, 0.02545633167028427, -0.005002398509532213, 0.0023535641375929117, ...
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 GetAddedMethods(self): added_methods = self.info.__added__ result = [] if added_methods: for name, rename in added_methods: decl = self.GetDeclaration(name) self.info[name].rename = rename result.append(decl) return result
1,842
[ -0.030599556863307953, 0.025277893990278244, 0.04204113036394119, -0.020863333716988564, -0.04046881943941116, 0.022738009691238403, -0.025785870850086212, 0.013993551954627037, 0.004202903248369694, 0.01877095364034176, 0.030551178380846977, -0.03633243590593338, 0.030696313828229904, -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": "codeunit", "annotation": null, "type_comment": null}}], "kwarg": ...
def ExportVirtualMethods(self, codeunit): # check if this class has any virtual methods has_virtual_methods = False for member in self.class_: if type(member) == Method and member.virtual: has_virtual_methods = True break holder = self...
1,843
[ 0.004455507732927799, 0.01109851710498333, 0.06533633917570114, -0.043972112238407135, 0.022763341665267944, 0.022596780210733414, -0.0073508936911821365, -0.005010711029171944, -0.03460028022527695, 0.01803300715982914, -0.006901178974658251, -0.029403574764728546, 0.031957510858774185, -...
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": "exported_names", "annotation": null, "type_comment": null}}], "kw...
def ExportNestedClasses(self, exported_names): nested_classes = [x for x in self.public_members if isinstance(x, NestedClass)] for nested_class in nested_classes: nested_info = self.info[nested_class.name] nested_info.include = self.info.include nested_info.name = nes...
1,844
[ 0.024872634559869766, 0.012470927089452744, 0.04780714213848114, -0.026210865005850792, 0.023269064724445343, 0.034794002771377563, -0.011386497877538204, -0.007890947163105011, -0.014397517777979374, 0.02837972156703472, -0.013220797292888165, -0.03624759614467621, 0.037216659635305405, -...
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": "exported_names", "annotation": null, "type_comment": null}}], "kw...
def ExportNestedEnums(self, exported_names): nested_enums = [x for x in self.public_members if isinstance(x, ClassEnumeration)] for enum in nested_enums: enum_info = self.info[enum.name] enum_info.include = self.info.include enum_info.name = enum.FullName() ...
1,845
[ 0.04019942507147789, 0.017340928316116333, 0.011691990308463573, -0.001145761227235198, -0.034681856632232666, 0.06100376322865486, -0.018356066197156906, 0.02375420555472374, 0.03530288115143776, -0.002481114352121949, 0.08976199477910995, -0.0056787957437336445, 0.014964314177632332, -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 ExportOpaquePointerPolicies(self): # check all methods for 'return_opaque_pointer' policies methods = [x for x in self.public_members if isinstance(x, Method)] for method in methods: return_opaque_policy = return_value_policy(return_opaque_pointer) if self.info[method...
1,846
[ 0.038308192044496536, 0.027321266010403633, -0.020052820444107056, -0.01145313773304224, 0.003027582773938775, 0.03806104138493538, -0.04475655034184456, -0.004184692166745663, 0.017603794112801552, 0.03262374922633171, -0.012233906425535679, -0.006644954439252615, 0.009425387717783451, 0....
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "operator", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs"...
def HandleSpecialOperator(operator): # gatter information about the operator and its parameters result_name = operator.result.name param1_name = '' if operator.parameters: param1_name = operator.parameters[0].name ...
1,847
[ 0.06694977730512619, -0.0220615454018116, -0.044420644640922546, -0.002972888760268688, -0.021062612533569336, 0.003026023507118225, 0.0024428698234260082, 0.007125368807464838, 0.03207213059067726, 0.004683827515691519, 0.02242286130785942, 0.013698136433959007, 0.0024415412917733192, -0....
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "converter", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs...
def ConverterMethodName(converter): result_fullname = converter.result.FullName() result_name = converter.result.name for regex, method_name in self.SPECIAL_CONVERTERS.items(): if regex.match(result_fullname): return method_name else: ...
1,848
[ 0.014224116690456867, 0.05506247282028198, -0.012358134612441063, -0.057578884065151215, -0.03085801564157009, -0.016601910814642906, 0.001837992575019598, 0.0003788610629271716, -0.013499049469828606, 0.07331711053848267, 0.008226316422224045, 0.001967278541997075, 0.054252102971076965, 0...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "m", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "count", "annotation": null, "type_comment": null}}], "kwarg": null, ...
def _ParamsInfo(m, count=None): if count is None: count = len(m.parameters) param_names = ['p%i' % i for i in range(count)] param_types = [x.FullName() for x in m.parameters[:count]] params = ['%s %s' % (t, n) for t, n in zip(param_types, param_names)] #for i, p in enumerate(m.parameters[:co...
1,849
[ 0.012723072431981564, 0.005308786407113075, 0.06940267235040665, -0.030220111832022667, -0.043213408440351486, -0.006260202266275883, -0.026301857084035873, -0.004202554933726788, 0.0038760334718972445, 0.0601249635219574, 0.03235939145088196, -0.005854865536093712, 0.01812756434082985, -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 GenerateDefinitions(self): defs = [] for method in self.virtual_methods: exclude = self.info[method.name].exclude # generate definitions only for public methods and non-abstract methods if method.visibility == Scope.public and not exclude: defs.ext...
1,850
[ 0.002114166971296072, 0.022049494087696075, 0.008762002922594547, -0.011395510286092758, -0.02804713137447834, 0.004781752359122038, 0.005054372362792492, -0.04130736365914345, -0.009787052869796753, 0.006853663362562656, 0.0188980083912611, -0.021722350269556046, 0.038144972175359726, -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": "class_", "annotation": null, "type_comment": null}}, {"_type": "a...
def __init__(self, class_, bases, info, codeunit): self.class_ = copy.deepcopy(class_) self.bases = bases[:] self.info = info self.wrapper_name = makeid(class_.FullName()) + '_Wrapper' self.virtual_methods = None self._method_count = {} self.codeunit = codeunit ...
1,851
[ 0.03001629188656807, 0.024220367893576622, -0.020980775356292725, -0.020827630534768105, -0.0450715608894825, 0.011226658709347248, -0.055556055158376694, -0.024856505915522575, 0.026788480579853058, 0.02263002283871174, -0.022641802206635475, 0.00493301497772336, 0.03988821059465408, -0.0...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "method", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": ...
def MethodSig(method): if method.const: const = ' const' else: const = '' if method.result: result = method.result.FullName() else: result = '' params = ', '.join([x.FullName() for x in method.par...
1,852
[ -0.02235395461320877, 0.021106498315930367, 0.028490988537669182, -0.02572876587510109, -0.04136651009321213, -0.0016665223520249128, 0.019480351358652115, -0.02735491283237934, -0.019636282697319984, 0.023679375648498535, 0.009573105722665787, 0.010475283488631248, 0.05613549053668976, -0...
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 Tooltips: def __init__(self): # Create a new window window = gtk.Window(gtk.WINDOW_TOPLEVEL) window.set_title("Tooltips") # It's a good idea to do this for all windows. window.connect("destroy", lambda w: gtk.main_quit()) # Sets the border width of the window...
1,853
[ 0.005545754451304674, 0.016774268820881844, -0.023171842098236084, -0.012163727544248104, -0.032905206084251404, 0.05403983220458031, -0.01938333362340927, -0.03538322448730469, 0.046820223331451416, 0.011526352725923061, 0.004699892830103636, -0.036074209958314896, 0.02780620940029621, 0....
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "plugin", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "option_name", "annotation": null, "type_comment": null}}], "kwa...
def is_option_deprecated(plugin, option_name): DEPRECATED = { 'Aggregator': [ 'time_periods', 'precise_cumulative' ], 'DataUploader': [ 'copy_config_to' ] } if option_name in DEPRECATED.get(plugin, []): logger.warning('Deprecated op...
1,854
[ -0.022771131247282028, 0.01284612063318491, 0.03627140074968338, -0.012722058221697807, -0.02936900593340397, -0.009208830073475838, 0.0355495810508728, -0.01731237582862377, -0.008300917223095894, 0.04599339887499809, 0.018180813640356064, 0.019353769719600677, 0.039970722049474716, -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 __init__(self): # Create a new window window = gtk.Window(gtk.WINDOW_TOPLEVEL) window.set_title("Tooltips") # It's a good idea to do this for all windows. window.connect("destroy", lambda w: gtk.main_quit()) # Sets the border width of the window. window.set...
1,855
[ 0.0485093854367733, -0.013652041554450989, -0.020804066210985184, -0.006189059466123581, 0.011284751817584038, -0.013300960883498192, 0.023211481049656868, 0.02281024493277073, 0.020533232018351555, 0.003939632326364517, 0.02650161273777485, -0.04505876079201698, -0.01479556318372488, -0.0...
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": "plugin_name", "annotation": null, "type_comment": null}}, {"_type...
def __init__(self, plugin_name, key, value, schema=None): self.dummy_converter = lambda k, v: {k: v} self.plugin = plugin_name self._schema = schema if '.' in key: self.name, rest = key.split('.', 1) self.value = Option(plugin_name, rest, value, schema=self.schem...
1,856
[ -0.000516172091010958, 0.006122457329183817, 0.052703261375427246, -0.0500776432454586, -0.030457137152552605, 0.031913161277770996, 0.002187018282711506, -0.04489802196621895, -0.022258056327700615, 0.028857899829745293, 0.0019617523066699505, -0.026733538135886192, 0.012889384292066097, ...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "plugin", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "options", "annotation": null, "type_comment": null}}], "kwarg":...
def check_options(plugin, options): CONFLICT_OPTS = { 'Phantom': [{'rps_schedule', 'instances_schedule', 'stpd_file'}] } for conflict_options in CONFLICT_OPTS.get(plugin, []): intersect = {option[0] for option in options} & conflict_options if len(intersect) > 1: raise Op...
1,857
[ 0.001449073082767427, 0.01774507388472557, 0.031129436567425728, -0.020303213968873024, 0.020432740449905396, -0.002439407864585519, -0.0017958251992240548, -0.016741245985031128, -0.03082720935344696, 0.019245417788624763, -0.05254441499710083, -0.04831323027610779, 0.007264254614710808, ...
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 schema(self): if self._schema is None: module_paths = { 'tank': 'yandextank.core' } def default_path(plugin): 'yandextank.plugins.{}'.format(plugin) self._schema = load_plugin_schema(module_paths.get(self.plugin, default_path(...
1,858
[ 0.014371194876730442, 0.011885428801178932, -0.03382953628897667, -0.029551709070801735, -0.006503457203507423, 0.01190855260938406, 0.00637627812102437, -0.018799325451254845, 0.0272624921053648, -0.02557448297739029, -0.027886822819709778, -0.023158088326454163, 0.0016417616279795766, 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 _get_scheme_converter(self): if self.name == 'enabled': return self.TYPE_CASTERS['boolean'] if self.schema.get(self.name) is None: logger.warning('Unknown option {}:{}'.format(self.plugin, self.name)) raise UnknownOption('{}:{}'.format(self.plugin, self.name)) ...
1,859
[ 0.06758469343185425, 0.030741948634386063, 0.0026258297730237246, -0.023321477696299553, -0.02412193827331066, 0.031088093295693398, 0.043289683759212494, -0.039698436856269836, -0.0298765879124403, 0.02286716364324093, 0.002912480616942048, -0.011466032825410366, 0.011087438091635704, 0.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": "name", "annotation": null, "type_comment": null}}, {"_type": "arg...
def __init__(self, name, plugin, options, enabled=None): self.name = old_section_name_mapper(name) self.new_name = rename(self.name) self.plugin = plugin self._schema = None self.options = [Option(plugin, *option, schema=self.schema) for option in without_deprecated(*check_option...
1,860
[ 0.0224357470870018, 0.013745922595262527, -0.017690790817141533, -0.042248986661434174, 0.006328458432108164, 0.00942879170179367, 0.05018317326903343, -0.006539592053741217, -0.05925081670284271, 0.027114028111100197, -0.003400365822017193, -0.05062766745686531, -0.015635015442967415, -0....
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": "with_meta", "annotation": null, "type_comment": null}}], "kwarg":...
def get_cfg_dict(self, with_meta=True): options_dict = self.merged_options if with_meta: if self.plugin: options_dict.update({'package': 'yandextank.plugins.{}'.format(self.plugin)}) if self.enabled is not None: options_dict.update({'enabled': self...
1,861
[ 0.05632507801055908, -0.009559914469718933, 0.024447575211524963, -0.00955435261130333, -0.01186786312609911, 0.02971971035003662, 0.017039893195033073, -0.013258193619549274, -0.028095804154872894, 0.019320035353302956, 0.010288447141647339, 0.006990583147853613, 0.038417618721723557, -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": "name", "annotation": null, "type_comment": null}}, {"_type": "arg...
def __init__(self, name, package_and_section): self.name = name self.enabled = len(package_and_section) > 0 try: package_path, self.section_name = package_and_section.split() self.package = Package(package_path) except ValueError: self.package = Packag...
1,862
[ 0.014601308852434158, -0.01567542925477028, -0.019043240696191788, -0.06073249503970146, -0.023384472355246544, 0.029493525624275208, -0.0007188767194747925, -0.0258683729916811, -0.03734802454710007, 0.016111789271235466, -0.01008105743676424, -0.023362094536423683, 0.04218155890703201, -...
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": "name", "annotation": n...
class PluginInstance(object): def __init__(self, name, package_and_section): self.name = name self.enabled = len(package_and_section) > 0 try: package_path, self.section_name = package_and_section.split() self.package = Package(package_path) except ValueError:...
1,863
[ -0.010427119210362434, -0.024306057021021843, 0.05417802184820175, -0.05212365463376045, 0.0070350212045013905, 0.01863265410065651, -0.0018468423513695598, 0.008569826371967793, 0.017963789403438568, 0.039009131491184235, -0.025655731558799744, 0.010439063422381878, 0.05991114675998688, -...
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 makeSuite(self): with assert_raises_regex(ValueError, r'depends decorator needs at least one argument'): class TC(unittest.TestCase): @depends() def run_test_no_args(self): pass return [TC('run_test_no_args')]
1,864
[ -0.02001095749437809, 0.002229542937129736, 0.04270356521010399, -0.03380229324102402, 0.003684449940919876, 0.025126371532678604, -0.015898345038294792, 0.0026816485915333033, 0.02487848699092865, 0.033599480986595154, -0.029588274657726288, 0.012980080209672451, 0.057599108666181564, -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}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs...
class TestDependsNoArgument(NoseDepPluginTester): def test_no_args(self): pass def makeSuite(self): with assert_raises_regex(ValueError, r'depends decorator needs at least one argument'): class TC(unittest.TestCase): @depends() def run_test_no_args(se...
1,865
[ -0.026163272559642792, 0.00335456314496696, 0.058269575238227844, -0.03712073713541031, -0.00265811407007277, 0.044781677424907684, -0.0020371137652546167, 0.014579001814126968, -0.0061113410629332066, 0.011253456585109234, -0.03544925898313522, 0.016111189499497414, 0.009773503057658672, ...
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}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs...
class TestDependsSelf(NoseDepPluginTester): def test_self_dep(self): pass def makeSuite(self): with assert_raises_regex(ValueError, r'Test \'run_test_self_dep\' cannot depend on itself'): class TC(unittest.TestCase): @depends(after='run_test_self_dep') ...
1,866
[ -0.029903920367360115, -0.014564227312803268, 0.07056743651628494, -0.05219857767224312, -0.005797822494059801, 0.021979624405503273, 0.0016054576262831688, 0.0022446115035563707, 0.0029292029794305563, 0.0042771813459694386, -0.024269672110676765, 0.02992815338075161, 0.03276345133781433, ...
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 makeSuite(self): with assert_raises_regex(ValueError, r'Test \'run_test_self_dep\' cannot depend on itself'): class TC(unittest.TestCase): @depends(after='run_test_self_dep') def run_test_self_dep(self): pass return [TC('run_test_s...
1,867
[ -0.04981442540884018, -0.020756009966135025, -0.001111615914851427, -0.015751181170344353, -0.013131830841302872, -0.013494330458343029, -0.01969189941883087, 0.03678783401846886, 0.03470638766884804, 0.04441201686859131, -0.01922415755689144, -0.05888860300183296, 0.013295539654791355, -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_entity_type_list (self): url = reverse('entitytype-list') response = self.app.get(url) self.assertEqual(response.context['opts'], EntityType._meta) self.assertEqual(len(response.context['topics']), 0) entity_type = self.create_entity_type('person') response = sel...
1,868
[ -0.027519408613443375, -0.012164202518761158, 0.0358927920460701, 0.005413309670984745, -0.018690165132284164, 0.0046305544674396515, -0.005404312629252672, 0.0037128408439457417, 0.04455408826470375, 0.013315842486917973, 0.006963825784623623, -0.06295634061098099, -0.0030605443753302097, ...
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 EntityTypeViewsTestCase (ViewTestCase): def test_entity_type_list (self): url = reverse('entitytype-list') response = self.app.get(url) self.assertEqual(response.context['opts'], EntityType._meta) self.assertEqual(len(response.context['topics']), 0) entity_type = self....
1,869
[ 0.0026434652972966433, 0.007074939087033272, 0.009263248182833195, 0.03802557289600372, -0.00820764061063528, -0.014339650049805641, -0.008106824941933155, 0.015252928249537945, 0.027540668845176697, -0.002797655062749982, -0.008551603183150291, -0.07714233547449112, -0.0015270719304680824, ...
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_entity_type_add_illegal_post (self): self.assertEqual(EntityType.objects.count(), 0) url = reverse('entitytype-add') form = self.app.get(url).forms['infrastructure-add-form'] # Missing entity_type name. form['name'] = '' response = form.submit('_save') se...
1,870
[ -0.0076679992489516735, 0.009195537306368351, 0.014075173065066338, 0.0202944353222847, -0.016754426062107086, 0.016160383820533752, 0.001689687604084611, 0.02548321522772312, 0.033460360020399094, 0.0160512737929821, -0.013650856912136078, -0.075358547270298, 0.00021405234292615205, 0.017...
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_entity_type_add_post_redirects (self): self.assertEqual(EntityType.objects.count(), 0) url = reverse('entitytype-add') form = self.app.get(url).forms['infrastructure-add-form'] form['name'] = 'person' response = form.submit('_save') self.assertRedirects(response,...
1,871
[ -0.0028617605566978455, -0.01854573003947735, 0.0376567468047142, -0.014034313149750233, 0.010800224728882313, 0.0077726831659674644, -0.02051336131989956, -0.027025021612644196, -0.0035031428560614586, 0.017567351460456848, -0.025916190817952156, 0.000006422739716072101, -0.0145017607137560...
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": "unit", "annotation": null, "type_comment": null}}], "kwarg": null...
def _getUnitScale(self, unit): for u in self._units: if u[0] == unit: scale = 1.0 / u[1] return scale else: unitNames = tuple(u[0] for u in self._units) raise ValueError("Invalid unit name '{}', must be one of '{}'".format(unit, "', '"....
1,872
[ 0.004799756687134504, 0.0023555730003863573, 0.00378073169849813, 0.02104213461279869, -0.008536183275282383, -0.006344540044665337, 0.0175213273614645, 0.01733229123055935, 0.04345478489995003, 0.004055425524711609, 0.014425854198634624, -0.05127617344260216, 0.008134480565786362, 0.04125...
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_entity_type_change_post (self): self.assertEqual(EntityType.objects.count(), 0) entity_type = self.create_entity_type('person') self.assertEqual(entity_type.get_admin_name(), 'person') url = reverse('entitytype-change', kwargs={ 'topic_id': entity_type.get_id()})...
1,873
[ 0.04475640878081322, 0.009448712691664696, 0.0244765467941761, -0.05194014683365822, -0.02757468819618225, -0.04075721651315689, -0.006801098119467497, -0.008313138969242573, 0.006436973810195923, -0.016712680459022522, 0.018095117062330246, 0.008683434687554836, -0.013108468614518642, -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": "name", "annotation": null, "type_comment": null}}], "kwarg": null...
def split(self, name=None): t = max(time.time() - self._t0, 0.0) if name is None: name = "__SPLIT_{}__".format(len(self._splits)) self._splits.append({ "name": name, "t": t, })
1,874
[ 0.013468805700540543, -0.03228023648262024, 0.004725306294858456, -0.0005341924843378365, -0.02570297196507454, 0.043571587651968, -0.035355616360902786, 0.027857979759573936, -0.013805526308715343, 0.04471643641591072, 0.01667887158691883, -0.0436389297246933, 0.008075671270489693, -0.002...
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": "minKeepCount", "annota...
class FrequencyEstimator(): def __init__(self, minKeepCount=10, minKeepTime=1.0): self.minKeepCount = minKeepCount self.minKeepTime = minKeepTime self._ts = [time.time()] def update(self): # save event time self._ts.append(time.time()) # clean entries which exce...
1,875
[ -0.010827017948031425, -0.015824545174837112, 0.019037649035453796, -0.049390021711587906, -0.006081949453800917, 0.045396588742733, -0.0005102956783957779, 0.011865539476275444, 0.03614743798971176, 0.008589318953454494, 0.03598678112030029, 0.0025202794931828976, -0.025819597765803337, -...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": {"_type": "arg", "_fields": {"arg": "kwargs", "annotation": null, "type_comment": null}}, "vararg": {"_type": "arg", "_fields": {"arg": "args", "annotation": null, "type_comment"...
def g(*args, **kwargs): t0 = time.time() ret = f(*args, **kwargs) t1 = time.time() _pdeco("ptdiff", f.__name__, "{dt} seconds".format( dt=around(max(0, t1 - t0), 3) )) return ret
1,876
[ 0.02075899764895439, -0.014369758777320385, 0.021397920325398445, -0.026714248582720757, 0.009457278065383434, 0.030716564506292343, 0.015117178671061993, 0.0049848114140331745, -0.006359100341796875, 0.01499662734568119, 0.02008390799164772, -0.04105989634990692, -0.007721334230154753, -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 update(self): # save event time self._ts.append(time.time()) # clean entries which exceed both the minKeepCount and the minKeepTime for nTime in range(len(self._ts) - self.minKeepCount, -1, -1): if self._ts[nTime] + self.minKeepTime < self._ts[-1]: break ...
1,877
[ -0.003026429796591401, 0.03684655949473381, 0.051293425261974335, -0.005882273428142071, 0.025246717035770416, 0.014082162640988827, 0.03357601538300514, 0.017411530017852783, 0.00038087720167823136, 0.01704682782292366, 0.01455274410545826, 0.02609376423060894, 0.01330570224672556, -0.039...
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_single_local_comment(self): with tempfile.TemporaryDirectory() as working_dir: test_env = setup_repos(working_dir) add_detached_comment("Adding a new local comment", 'test1.py', test_env.dir1) file_path = os.path.join(test_env.dir1, 'test1.py') response = ...
1,878
[ -0.013099153526127338, 0.01857632026076317, 0.0628177747130394, -0.007149399258196354, 0.013898917473852634, 0.007282693404704332, 0.0051954323425889015, -0.018951967358589172, -0.0081491032615304, 0.007724986877292395, -0.008918573148548603, -0.009269984439015388, 0.006925223395228386, -0...
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 TestLocalDetachedComments(tornado.testing.AsyncHTTPTestCase): def get_app(self): return create_tornado_app() def test_single_local_comment(self): with tempfile.TemporaryDirectory() as working_dir: test_env = setup_repos(working_dir) add_detached_comment("Adding a new local comment", 'tes...
1,879
[ 0.005609414540231228, 0.027831561863422394, 0.06137721240520477, -0.010135121643543243, 0.016514213755726814, 0.026378409937024117, 0.031181201338768005, -0.0005587863270193338, 0.007739883381873369, 0.026279890909790993, 0.026082852855324745, 0.010326001793146133, 0.0038052888121455908, -...
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_multiple_local_comments(self): with tempfile.TemporaryDirectory() as working_dir: test_env = setup_repos(working_dir) add_detached_comment('Adding a first local comment', 'test1.py', test_env.dir1) add_detached_comment('Adding a second local comment', 'test1.py'...
1,880
[ -0.009207384660840034, -0.016500120982527733, 0.04261006787419319, -0.014414739795029163, 0.03526855260133743, 0.030853884294629097, 0.004798815585672855, 0.00370124657638371, -0.0005068634636700153, 0.014390349388122559, 0.010579345747828484, -0.008390305563807487, 0.006100654602050781, -...
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 TestRemoteDetachedComments(tornado.testing.AsyncHTTPTestCase): def get_app(self): return create_tornado_app() def test_pull_from_remote(self): #Add comments in dir1, push to remote, pull in dir2 with tempfile.TemporaryDirectory() as working_dir: test_env = setup_repos(working_dir) ad...
1,881
[ 0.01119433157145977, 0.006752646993845701, 0.02012275904417038, -0.02273627184331417, 0.0349154993891716, 0.031825631856918335, 0.01016437541693449, 0.021126966923475266, 0.024088090285658836, 0.0172517579048872, 0.03058968484401703, -0.001336528453975916, 0.016028685495257378, -0.02022575...
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_add_comment(self): with tempfile.TemporaryDirectory() as working_dir: test_env = setup_repos(working_dir) file_path_dir_1 = os.path.join(test_env.dir1, 'test1.py') file_path_dir_2 = os.path.join(test_env.dir2, 'test1.py') response = self.fetch('/detachedComments?file_path=' + file_p...
1,882
[ -0.00624185660853982, -0.02980196662247181, 0.029139701277017593, -0.028344981372356415, 0.03854387626051903, 0.036535002291202545, 0.017406556755304337, 0.018554484471678734, 0.00032233723322860897, 0.03185499086976051, 0.03375348821282387, 0.022594306617975235, -0.008394220843911171, -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_pull_from_remote(self): #Add comments in dir1, push to remote, pull in dir2 with tempfile.TemporaryDirectory() as working_dir: test_env = setup_repos(working_dir) add_detached_comment("First comment", "test1.py", test_env.dir1) add_detached_comment("Second comment", "test1.py", test_e...
1,883
[ -0.014863626100122929, 0.013207993470132351, 0.07739464193582535, -0.008290518075227737, 0.022944100201129913, 0.0221162848174572, 0.004837165120989084, -0.015246645547449589, 0.003240220947191119, 0.011070498265326023, -0.026588963344693184, -0.012392533011734486, -0.010848099365830421, 0...
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 TestLocalReviewComments(tornado.testing.AsyncHTTPTestCase): def get_app(self): return create_tornado_app() def test_single_local_comment(self): with tempfile.TemporaryDirectory() as working_dir: test_env = setup_repos(working_dir) commit_hash = create_code_review(test_env.dir1, 'test1') ...
1,884
[ 0.013440586626529694, 0.03664735332131386, 0.05666319280862808, -0.0042394655756652355, 0.038895510137081146, 0.023847371339797974, 0.033287208527326584, 0.02369024232029915, 0.007989413104951382, 0.019484015181660652, 0.016957862302660942, 0.022179385647177696, 0.003097257576882839, -0.02...
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_single_local_comment(self): with tempfile.TemporaryDirectory() as working_dir: test_env = setup_repos(working_dir) commit_hash = create_code_review(test_env.dir1, 'test1') add_review_comment("First comment", "test1.py", commit_hash, test_env.dir1) file_path ...
1,885
[ 0.006528663914650679, -0.005923583172261715, 0.062307778745889664, -0.008986221626400948, 0.030880827456712723, 0.03433133661746979, 0.016234776005148888, 0.0062462929636240005, 0.015614180825650692, 0.016594721004366875, -0.02007005549967289, -0.024923112243413925, 0.00028004369232803583, ...
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 TestRemoteReviewComments(tornado.testing.AsyncHTTPTestCase): def get_app(self): return create_tornado_app() def test_single_remote_comment(self): with tempfile.TemporaryDirectory() as working_dir: test_env = setup_repos(working_dir) commit_hash = create_code_review(test_env.dir1, 'test')...
1,886
[ 0.00913151167333126, 0.033841393887996674, 0.0722639411687851, -0.00964873842895031, 0.017351718619465828, 0.03054099716246128, 0.02778245508670807, 0.012241028249263763, 0.011114213615655899, 0.02419881336390972, 0.01674828864634037, 0.005905003286898136, -0.008257152512669563, -0.0203811...
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_multiple_local_comments(self): with tempfile.TemporaryDirectory() as working_dir: test_env = setup_repos(working_dir) commit_hash = create_code_review(test_env.dir1, 'test1') add_review_comment("First comment", "test1.py", commit_hash, test_env.dir1) add_rev...
1,887
[ 0.01696871779859066, 0.010053508915007114, 0.043084729462862015, -0.00656245369464159, 0.03510517627000809, 0.03607829287648201, 0.032258808612823486, 0.03697842359542847, 0.00619145343080163, 0.020192164927721024, 0.023926500231027603, 0.005914723034948111, 0.014657566323876381, -0.027563...
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_single_remote_comment(self): with tempfile.TemporaryDirectory() as working_dir: test_env = setup_repos(working_dir) commit_hash = create_code_review(test_env.dir1, 'test') add_review_comment("First comment", "test1.py", commit_hash, test_env.dir1) appraise_p...
1,888
[ 0.01567200943827629, 0.0006730601890012622, 0.054833028465509415, -0.024147816002368927, 0.021208522841334343, 0.02650431916117668, 0.029722338542342186, 0.014481088146567345, -0.0033225419465452433, 0.037856072187423706, 0.02023298107087612, -0.016444841399788857, -0.010528245009481907, -...
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_multiple_remote_reviews(self): with tempfile.TemporaryDirectory() as working_dir: test_env = setup_repos(working_dir) commit_hash1 = create_code_review(test_env.dir1, 'test1') add_review_comment("First comment", "test1.py", commit_hash1, test_env.dir1) appra...
1,889
[ 0.014604376628994942, 0.017390113323926926, 0.028355250135064125, -0.012885517440736294, 0.029801463708281517, 0.025771034881472588, 0.03304951637983322, 0.05500349774956703, 0.012269099242985249, 0.01554085873067379, 0.012624724768102169, -0.0006512402324005961, -0.0033636298030614853, -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 test_add_review_comment(self): with tempfile.TemporaryDirectory() as working_dir: test_env = setup_repos(working_dir) file_path_dir1 = os.path.join(test_env.dir1, 'test1.py') file_path_dir2 = os.path.join(test_env.dir2, 'test1.py') commit_hash1 = create_code_review(test_env.dir1, 'test1'...
1,890
[ -0.018347816541790962, 0.012145237997174263, 0.023203548043966293, -0.027669403702020645, 0.028472786769270897, -0.00916209351271391, -0.015606867149472237, -0.02634618803858757, -0.037711672484874725, -0.022541940212249756, -0.021584970876574516, -0.030504869297146797, -0.003789479611441493...
15
{"_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 TestNotInGitRepo(tornado.testing.AsyncHTTPTestCase): def get_app(self): return create_tornado_app() def test_pull_file_not_in_git(self): with tempfile.TemporaryDirectory() as working_dir: test_env = setup_repos(working_dir) self.assertRaises( Exception, self.fetch('/r...
1,891
[ 0.0002536557149142027, -0.01297184731811285, 0.008401596918702126, -0.020338980481028557, 0.04654539376497269, -0.014329238794744015, -0.0005880433600395918, 0.007586067542433739, -0.03437265753746033, -0.006573496852070093, -0.011176587082445621, 0.010191383771598339, 0.020382767543196678, ...
14
{"_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_pull_file_not_in_git(self): with tempfile.TemporaryDirectory() as working_dir: test_env = setup_repos(working_dir) self.assertRaises( Exception, self.fetch('/remotePull?file_path=' + os.path.join(test_env.not_git_dir, 'test1.py') + '...
1,892
[ -0.0027876165695488453, 0.028552468866109848, 0.02184627577662468, -0.026051854714751244, 0.03669083118438721, 0.005632065236568451, -0.012889529578387737, 0.009030627086758614, -0.017254238948225975, -0.013969340361654758, -0.001236809534020722, -0.012173444963991642, 0.03955516964197159, ...
14
{"_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_fetch_detached_file_not_in_git(self): with tempfile.TemporaryDirectory() as working_dir: test_env = setup_repos(working_dir) self.assertRaises( Exception, self.fetch('/detachedComments?file_path=' + os.path.join(test_env.not_git_dir, 'test1.py') + ...
1,893
[ 0.006502839736640453, -0.006099514663219452, 0.05122847855091095, -0.00012671772856265306, -0.0018010011408478022, 0.032539017498493195, -0.003394134808331728, 0.018044140189886093, 0.0024851025082170963, 0.041772060096263885, 0.013377979397773743, -0.029759179800748825, 0.025688698515295982...
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 TestDetachedReplyComments(tornado.testing.AsyncHTTPTestCase): def get_app(self): return create_tornado_app() def test_comment_has_children(self): #Add comment in dir1, add reply to that comment in dir2, check that comment has children after pulling remote changes in dir1 with tempfile.TemporaryD...
1,894
[ -0.0016066193347796798, 0.04061805456876755, 0.01920023374259472, -0.031702447682619095, 0.036137621849775314, 0.004590745083987713, 0.0014093276113271713, 0.030118456110358238, -0.015104484744369984, -0.01935863308608532, -0.031136736273765564, -0.03131776303052902, 0.02443871833384037, -...
14
{"_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_fetch_review_file_not_in_git(self): with tempfile.TemporaryDirectory() as working_dir: test_env = setup_repos(working_dir) self.assertRaises( Exception, self.fetch('/reviewComments?file_path=' + os.path.join(test_env.not_git_dir, 'test1.py') + ...
1,895
[ 0.021766768768429756, -0.0033595289569348097, -0.0019718974363058805, -0.014285874553024769, 0.012521619908511639, 0.023049863055348396, 0.020346200093626976, 0.03931766003370285, 0.005899940151721239, 0.03665982186794281, 0.056868549436330795, -0.0017069729510694742, 0.020919010043144226, ...
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 test_comment_has_children(self): #Add comment in dir1, add reply to that comment in dir2, check that comment has children after pulling remote changes in dir1 with tempfile.TemporaryDirectory() as working_dir: test_env = setup_repos(working_dir) file_path_dir_1 = os.path.join(test_env.dir1, 'tes...
1,896
[ 0.0101893600076437, -0.009419306181371212, 0.02067442052066326, -0.028954045847058296, -0.0028045382350683212, 0.03102395310997963, 0.00763277942314744, 0.036100152879953384, 0.005723044741898775, 0.036888688802719116, 0.04240843653678894, -0.01782830059528351, 0.015364126302301884, -0.006...
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 test_multiple_children(self): #Add comment with 2 replies in dir1, pull and check in dir2 with tempfile.TemporaryDirectory() as working_dir: test_env = setup_repos(working_dir) file_path_dir_1 = os.path.join(test_env.dir1, 'test1.py') file_path_dir_2 = os.path.join(test_env.dir2, 'test1.py...
1,897
[ 0.05649620294570923, 0.014605820178985596, 0.00044872064609080553, -0.0009451775113120675, -0.04472224414348602, -0.014359060674905777, 0.002801015507429838, 0.0052348291501402855, 0.009470869787037373, -0.011162935756146908, 0.00025777568225748837, -0.0007090667495504022, 0.0343818403780460...
13
{"_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": "name", "annotation": null, "type_comment": null}}, {"_type": "arg...
def create_getter(self, name, getter=None): if getter is None: if name.endswith('_index'): ans = lambda db:partial(db.get_custom_extra, index_is_id=True, label=name[1:].replace('_index', '')) else: ans = lambda db:pa...
1,898
[ 0.007003219332545996, 0.0003680942754726857, 0.03887396305799484, -0.02411007508635521, 0.009378279559314251, 0.02921966463327408, 0.018230194225907326, 0.04958099499344826, 0.004576805979013443, 0.04703903943300247, 0.017151789739727974, -0.020887695252895355, 0.03604956716299057, 0.01160...
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 test_nested_replies(self): with tempfile.TemporaryDirectory() as working_dir: test_env = setup_repos(working_dir) file_path_dir_1 = os.path.join(test_env.dir1, 'test1.py') file_path_dir_2 = os.path.join(test_env.dir2, 'test1.py') self.fetch('/addDetachedComment?file_path=' + file_path_di...
1,899
[ 0.03698085620999336, -0.03223519027233124, 0.029988572001457214, -0.06734807044267654, -0.009617547504603863, -0.011043771170079708, 0.0015256181359291077, -0.024182703346014023, -0.01432534959167242, -0.00754131842404604, 0.06436941027641296, -0.02225162275135517, -0.03491093963384628, 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 test_set_author_data(self): # {{{ cache = self.init_cache() adata = cache.author_data() ldata = {aid:str(aid) for aid in adata} self.assertEqual({1,2,3}, cache.set_link_for_authors(ldata)) for c in (cache, self.init_cache()): self.assertEqual(ldata, {aid:d['link'...
1,900
[ 0.01080178190022707, -0.0011989353224635124, 0.06623122841119766, -0.0794592946767807, -0.0010490684071555734, 0.0014290626859292388, 0.024660564959049225, -0.05573060363531113, -0.017319217324256897, 0.01664872281253338, 0.027456186711788177, -0.004852562677115202, -0.014125843532383442, ...
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": "tests", "annotation": null, "type_comment": null}}], "kwarg": nul...
def run_tests(self, tests): results = {} for test in tests: results[test] = [] for val in test.vals: cl = self.cloned_library cache = self.init_cache(cl) cache.set_field(test.name, {1: val}) cached_res = cache.field_...