project_name string | class_name string | class_modifiers string | class_implements int64 | class_extends int64 | function_name string | function_body string | cyclomatic_complexity int64 | NLOC int64 | num_parameter int64 | num_token int64 | num_variable int64 | start_line int64 | end_line int64 | function_index int64 | function_params string | function_variable string | function_return_type string | function_body_line_type string | function_num_functions int64 | function_num_lines int64 | outgoing_function_count int64 | outgoing_function_names string | incoming_function_count int64 | incoming_function_names string | lexical_representation string |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
pasteorg_paste | public | public | 0 | 0 | test_logger | def test_logger():fn = setup_file('test_logger.log')rep = LogReporter(filename=fn,show_hidden_frames=False)try:int('a')except Exception:exc_data = collector.collect_exception(*sys.exc_info())else:assert 0rep.report(exc_data)content = open(fn).read()assert len(content.splitlines()) == 4assert 'ValueError' in contentasse... | 3 | 29 | 0 | 151 | 4 | 20 | 49 | 20 | ['fn', 'exc_data', 'rep', 'content'] | None | {"Assign": 6, "Expr": 5, "Try": 2} | 18 | 30 | 18 | ["setup_file", "LogReporter", "int", "collector.collect_exception", "sys.exc_info", "rep.report", "read", "open", "len", "content.splitlines", "collector.collect_exception", "sys.exc_info", "rep.report", "read", "open", "print", "len", "content.splitlines"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3706078_confluentinc_ducktape.ducktape.tests.runner_client_py.RunnerClient.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3706078_confluentinc_ducktape.ducktape.tests.test_py.TestContext.logger"] | The function (test_logger) defined within the public class called public.The function start at line 20 and ends at 49. It contains 29 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value. It declares 18.0 functions, It has 18.0 functions called i... | |
pasteorg_paste | public | public | 0 | 0 | test_fonts | def test_fonts():text = "Hello Robbie!"assert small(text) == f'<small>{text}</small>'assert strong(text) == f'<strong>{text}</strong>'assert grey(text) == f'<font color="#909090">{text}</font>' | 1 | 5 | 0 | 31 | 1 | 12 | 16 | 12 | ['text'] | None | {"Assign": 1} | 3 | 5 | 3 | ["small", "strong", "grey"] | 0 | [] | The function (test_fonts) defined within the public class called public.The function start at line 12 and ends at 16. It contains 5 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 3.0 functions, and It has 3.0 functions called ... | |
pasteorg_paste | public | public | 0 | 0 | test_blanks | def test_blanks():assert small('') == ''assert strong('') == ''assert grey('') == '' | 1 | 4 | 0 | 25 | 0 | 19 | 22 | 19 | [] | None | {} | 3 | 4 | 3 | ["small", "strong", "grey"] | 0 | [] | The function (test_blanks) defined within the public class called public.The function start at line 19 and ends at 22. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 3.0 functions, and It has 3.0 functions called... | |
pasteorg_paste | public | public | 0 | 0 | test_html | def test_html():try:raise ValueError("Hello World")except ValueError as err:# If the html was templated we could do a bit more here.# At least check that we get details on what we just raised.out = html(sys.exc_info())assert 'ValueError' in outassert str(err) in out | 2 | 7 | 0 | 37 | 1 | 25 | 33 | 25 | ['out'] | None | {"Assign": 1, "Try": 1} | 4 | 9 | 4 | ["ValueError", "html", "sys.exc_info", "str"] | 0 | [] | The function (test_html) defined within the public class called public.The function start at line 25 and ends at 33. It contains 7 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 4.0 functions, and It has 4.0 functions called i... | |
pasteorg_paste | public | public | 0 | 0 | test_text | def test_text():try:raise ValueError("Hello World")except ValueError:out = text(sys.exc_info())assert 'ValueError' in outassert 'Hello World' in out | 2 | 7 | 0 | 32 | 1 | 36 | 42 | 36 | ['out'] | None | {"Assign": 1, "Try": 1} | 3 | 7 | 3 | ["ValueError", "text", "sys.exc_info"] | 0 | [] | The function (test_text) defined within the public class called public.The function start at line 36 and ends at 42. It contains 7 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 3.0 functions, and It has 3.0 functions called i... | |
pasteorg_paste | public | public | 0 | 0 | dummy_error | def dummy_error():raise RuntimeError("Hello World") | 1 | 2 | 0 | 9 | 0 | 45 | 46 | 45 | [] | None | {} | 1 | 2 | 1 | ["RuntimeError"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.tests.test_util.test_cgitb_hook_py.test_syshook_no_logdir_default_format"] | The function (dummy_error) defined within the public class called public.The function start at line 45 and ends at 46. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, It has 1.0 function called inside ... | |
pasteorg_paste | public | public | 0 | 0 | test_syshook_no_logdir_default_format | def test_syshook_no_logdir_default_format(format, capsys, tmp_path):excepthook = sys.excepthookargs = {'logdir': tmp_path}if format:args['format'] = formathook = Hook(**args)try:dummy_error()except RuntimeError as err:hook(err.__class__, err, err.__traceback__)finally:sys.excepthook = excepthooklog_files = list(tmp_pat... | 7 | 37 | 3 | 202 | 8 | 50 | 91 | 50 | format,capsys,tmp_path | ['out', 'args', 'output', 'log_files', 'hook', 'captured', 'log_file', 'excepthook'] | None | {"Assign": 10, "Expr": 3, "If": 3, "Try": 1} | 11 | 42 | 11 | ["Hook", "dummy_error", "hook", "list", "tmp_path.glob", "len", "read", "log_file.open", "log_file.unlink", "capsys.readouterr", "pytest.mark.parametrize"] | 0 | [] | The function (test_syshook_no_logdir_default_format) defined within the public class called public.The function start at line 50 and ends at 91. It contains 37 lines of code and it has a cyclomatic complexity of 7. It takes 3 parameters, represented as [50.0] and does not return any value. It declares 11.0 functions, a... |
pasteorg_paste | public | public | 0 | 0 | test_timedelta | def test_timedelta():assert('' == normalize_timedelta(""))assert('0.10' == normalize_timedelta("6m"))assert('0.50' == normalize_timedelta("30m"))assert('0.75' == normalize_timedelta("45m"))assert('1.00' == normalize_timedelta("60 min"))assert('1.50' == normalize_timedelta("90min"))assert('1.50' == normalize_timedelta("... | 1 | 18 | 0 | 157 | 0 | 14 | 31 | 14 | [] | None | {} | 17 | 18 | 17 | ["normalize_timedelta", "normalize_timedelta", "normalize_timedelta", "normalize_timedelta", "normalize_timedelta", "normalize_timedelta", "normalize_timedelta", "normalize_timedelta", "normalize_timedelta", "normalize_timedelta", "normalize_timedelta", "normalize_timedelta", "normalize_timedelta", "normalize_timedelta... | 0 | [] | The function (test_timedelta) defined within the public class called public.The function start at line 14 and ends at 31. It contains 18 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 17.0 functions, and It has 17.0 functions ... | |
pasteorg_paste | public | public | 0 | 0 | test_time | def test_time():assert('03:00 PM' == normalize_time("3p", ampm=True))assert('03:00 AM' == normalize_time("300", ampm=True))assert('03:22 AM' == normalize_time("322", ampm=True))assert('01:22 PM' == normalize_time("1322", ampm=True))assert('01:00 PM' == normalize_time("13", ampm=True))assert('12:00 PM' == normalize_time... | 1 | 16 | 0 | 199 | 0 | 33 | 48 | 33 | [] | None | {} | 15 | 16 | 15 | ["normalize_time", "normalize_time", "normalize_time", "normalize_time", "normalize_time", "normalize_time", "normalize_time", "normalize_time", "normalize_time", "normalize_time", "normalize_time", "normalize_time", "normalize_time", "normalize_time", "normalize_time"] | 0 | [] | The function (test_time) defined within the public class called public.The function start at line 33 and ends at 48. It contains 16 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 15.0 functions, and It has 15.0 functions calle... | |
pasteorg_paste | public | public | 0 | 0 | test_date.assertError | def assertError(val):try:normalize_date(val)except (TypeError,ValueError):returnraise ValueError("type error expected", val) | 2 | 6 | 1 | 26 | 0 | 119 | 124 | 119 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_date.assertError) defined within the public class called public.The function start at line 119 and ends at 124. It contains 6 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value.. |
pasteorg_paste | public | public | 0 | 0 | test_date | def test_date():tm = localtime()yr = tm[0]mo = tm[1]assert(date(yr,4,11)== parse_date("411"))assert(date(yr,4,11)== parse_date("APR11"))assert(date(yr,4,11)== parse_date("11APR"))assert(date(yr,4,11)== parse_date("4 11"))assert(date(yr,4,11)== parse_date("11 APR"))assert(date(yr,4,11)== parse_date("APR 11"))assert(date... | 1 | 78 | 0 | 681 | 3 | 50 | 139 | 50 | ['yr', 'tm', 'mo'] | None | {"Assign": 3, "Expr": 15, "Return": 1, "Try": 1} | 87 | 90 | 87 | ["localtime", "date", "parse_date", "date", "parse_date", "date", "parse_date", "date", "parse_date", "date", "parse_date", "date", "parse_date", "date", "parse_date", "date", "parse_date", "date", "parse_date", "date.today", "parse_date", "date.today", "parse_date", "parse_date", "normalize_date", "normalize_date", "n... | 0 | [] | The function (test_date) defined within the public class called public.The function start at line 50 and ends at 139. It contains 78 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 87.0 functions, and It has 87.0 functions call... | |
pasteorg_paste | public | public | 0 | 0 | gen_result | def gen_result(data, environ):encoding = 'latin-1'fake_stdin = BytesIO(data.encode(encoding))fake_stdin.seek(0)form = FieldStorage(fp=fake_stdin, environ=environ, encoding=encoding)return {k: form.getlist(k) if isinstance(v, list) else v.valuefor k, v in dict(form).items()} | 3 | 7 | 2 | 78 | 3 | 72 | 78 | 72 | data,environ | ['encoding', 'form', 'fake_stdin'] | Returns | {"Assign": 3, "Expr": 1, "Return": 1} | 8 | 7 | 8 | ["BytesIO", "data.encode", "fake_stdin.seek", "FieldStorage", "isinstance", "form.getlist", "items", "dict"] | 4 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.tests.test_util.test_field_storage_py.test_fieldstorage_multipart_maxline", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.tests.test_util.test_field_storage_py.test_qs... | The function (gen_result) defined within the public class called public.The function start at line 72 and ends at 78. It contains 7 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [72.0], and this function return a value. It declares 8.0 functions, It has 8.0 functions calle... |
pasteorg_paste | public | public | 0 | 0 | test_fieldstorage_properties | def test_fieldstorage_properties():fs = FieldStorage()assert not fsassert "FieldStorage" in repr(fs)assert list(fs) == list(fs.keys())fs.list.append(namedtuple('MockFieldStorage', 'name')('fieldvalue'))assert fs | 1 | 7 | 0 | 51 | 1 | 81 | 87 | 81 | ['fs'] | None | {"Assign": 1, "Expr": 1} | 7 | 7 | 7 | ["FieldStorage", "repr", "list", "list", "fs.keys", "fs.list.append", "namedtuple"] | 0 | [] | The function (test_fieldstorage_properties) defined within the public class called public.The function start at line 81 and ends at 87. It contains 7 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 7.0 functions, and It has 7.0... | |
pasteorg_paste | public | public | 0 | 0 | test_fieldstorage_invalid | def test_fieldstorage_invalid():with pytest.raises(TypeError):FieldStorage("not-a-file-obj", environ={"REQUEST_METHOD": "PUT"})with pytest.raises(TypeError):FieldStorage("foo", "bar")fs = FieldStorage(headers={'content-type': 'text/plain'})with pytest.raises(TypeError):bool(fs) | 1 | 8 | 0 | 62 | 1 | 90 | 97 | 90 | ['fs'] | None | {"Assign": 1, "Expr": 3, "With": 3} | 7 | 8 | 7 | ["pytest.raises", "FieldStorage", "pytest.raises", "FieldStorage", "FieldStorage", "pytest.raises", "bool"] | 0 | [] | The function (test_fieldstorage_invalid) defined within the public class called public.The function start at line 90 and ends at 97. It contains 8 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 7.0 functions, and It has 7.0 fu... | |
pasteorg_paste | public | public | 0 | 0 | test_strict | def test_strict():for orig, expect in parse_strict_test_cases:env = {'QUERY_STRING': orig}fs = FieldStorage(environ=env)if isinstance(expect, dict):# test dict interfaceassert len(expect) == len(fs)assert len(expect.keys()) == len(fs.keys())assert fs.getvalue("nonexistent field", "default") == "default"# test individua... | 5 | 15 | 0 | 123 | 3 | 100 | 116 | 100 | ['env', 'fs', 'expect_val'] | None | {"Assign": 3, "For": 2, "If": 2} | 13 | 17 | 13 | ["FieldStorage", "isinstance", "len", "len", "len", "expect.keys", "len", "fs.keys", "fs.getvalue", "expect.keys", "len", "fs.getvalue", "fs.getvalue"] | 0 | [] | The function (test_strict) defined within the public class called public.The function start at line 100 and ends at 116. It contains 15 lines of code and it has a cyclomatic complexity of 5. The function does not take any parameters and does not return any value. It declares 13.0 functions, and It has 13.0 functions c... | |
pasteorg_paste | public | public | 0 | 0 | test_separator | def test_separator():parse_semicolon = [("x=1;y=2.0", {'x': ['1'], 'y': ['2.0']}),("x=1;y=2.0;z=2-3.%2b0", {'x': ['1'], 'y': ['2.0'], 'z': ['2-3.+0']}),(";", ValueError("bad query field: ''")),(";;", ValueError("bad query field: ''")),("=;a", ValueError("bad query field: 'a'")),(";b=a", ValueError("bad query field: ''"... | 5 | 23 | 0 | 211 | 4 | 119 | 141 | 119 | ['env', 'fs', 'expect_val', 'parse_semicolon'] | None | {"Assign": 4, "For": 2, "If": 2} | 11 | 23 | 11 | ["ValueError", "ValueError", "ValueError", "ValueError", "ValueError", "FieldStorage", "isinstance", "expect.keys", "len", "fs.getvalue", "fs.getvalue"] | 0 | [] | The function (test_separator) defined within the public class called public.The function start at line 119 and ends at 141. It contains 23 lines of code and it has a cyclomatic complexity of 5. The function does not take any parameters and does not return any value. It declares 11.0 functions, and It has 11.0 function... | |
pasteorg_paste | public | public | 0 | 0 | test_fieldstorage_readline.__init__ | def __init__(self, file):self.file = fileself.numcalls = 0 | 1 | 3 | 2 | 17 | 0 | 150 | 152 | 150 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_fieldstorage_readline.__init__) defined within the public class called public.The function start at line 150 and ends at 152. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [150.0] and does not return any value.. |
pasteorg_paste | public | public | 0 | 0 | test_fieldstorage_readline.readline | def readline(self, size=None):self.numcalls += 1if size:return self.file.readline(size)else:return self.file.readline() | 2 | 6 | 2 | 36 | 0 | 154 | 159 | 154 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_fieldstorage_readline.readline) defined within the public class called public.The function start at line 154 and ends at 159. It contains 6 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [154.0] and does not return any value.. |
pasteorg_paste | public | public | 0 | 0 | test_fieldstorage_readline.__getattr__ | def __getattr__(self, name):file = self.__dict__['file']a = getattr(file, name)if not isinstance(a, int):setattr(self, name, a)return a | 2 | 6 | 2 | 42 | 0 | 161 | 166 | 161 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_fieldstorage_readline.__getattr__) defined within the public class called public.The function start at line 161 and ends at 166. It contains 6 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [161.0] and does not return any value.. |
pasteorg_paste | public | public | 0 | 0 | test_fieldstorage_readline | def test_fieldstorage_readline():# FieldStorage uses readline, which has the capacity to read all# contents of the input file into memory; we use readline's size argument# to prevent that for files that do not contain any newlines in# non-GET/HEAD requestsclass TestReadlineFile:def __init__(self, file):self.file = file... | 3 | 17 | 0 | 86 | 5 | 144 | 182 | 144 | ['env', 'file', 'fs', 'a', 'f'] | Returns | {"Assign": 7, "AugAssign": 1, "Expr": 5, "If": 2, "Return": 3, "Try": 2} | 12 | 39 | 12 | ["self.file.readline", "self.file.readline", "getattr", "isinstance", "setattr", "TestReadlineFile", "tempfile.TemporaryFile", "f.write", "f.seek", "FieldStorage", "fs.file.close", "f.close"] | 0 | [] | The function (test_fieldstorage_readline) defined within the public class called public.The function start at line 144 and ends at 182. It contains 17 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters, and this function return a value. It declares 12.0 functions, and It h... | |
pasteorg_paste | public | public | 0 | 0 | test_fieldstorage_multipart | def test_fieldstorage_multipart():# Test basic FieldStorage multipart parsingenv = {'REQUEST_METHOD': 'POST','CONTENT_TYPE': f'multipart/form-data; boundary={BOUNDARY}','CONTENT_LENGTH': '558'}fp = BytesIO(POSTDATA.encode('latin-1'))fs = FieldStorage(fp, environ=env, encoding="latin-1")assert len(fs.list) == 4expect = ... | 3 | 17 | 0 | 158 | 5 | 185 | 202 | 185 | ['env', 'expect', 'got', 'fs', 'fp'] | None | {"Assign": 5, "For": 2} | 8 | 18 | 8 | ["BytesIO", "POSTDATA.encode", "FieldStorage", "len", "range", "len", "items", "getattr"] | 0 | [] | The function (test_fieldstorage_multipart) defined within the public class called public.The function start at line 185 and ends at 202. It contains 17 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value. It declares 8.0 functions, and It has 8... | |
pasteorg_paste | public | public | 0 | 0 | test_fieldstorage_multipart_leading_whitespace | def test_fieldstorage_multipart_leading_whitespace():env = {'REQUEST_METHOD': 'POST','CONTENT_TYPE': f'multipart/form-data; boundary={BOUNDARY}','CONTENT_LENGTH': '560'}# Add some leading whitespace to our post data that will cause the# first line to not be the inner boundary.fp = BytesIO(b"\r\n" + POSTDATA.encode('lat... | 3 | 17 | 0 | 161 | 5 | 205 | 223 | 205 | ['env', 'expect', 'got', 'fs', 'fp'] | None | {"Assign": 5, "For": 2} | 8 | 19 | 8 | ["BytesIO", "POSTDATA.encode", "FieldStorage", "len", "range", "len", "items", "getattr"] | 0 | [] | The function (test_fieldstorage_multipart_leading_whitespace) defined within the public class called public.The function start at line 205 and ends at 223. It contains 17 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value. It declares 8.0 funct... | |
pasteorg_paste | public | public | 0 | 0 | test_fieldstorage_multipart_non_ascii | def test_fieldstorage_multipart_non_ascii():# Test basic FieldStorage multipart parsingenv = {'REQUEST_METHOD': 'POST', 'CONTENT_TYPE': f'multipart/form-data; boundary={BOUNDARY}', 'CONTENT_LENGTH': '558'}for encoding in ['iso-8859-1', 'utf-8']:fp = BytesIO(POSTDATA_NON_ASCII.encode(encoding))fs = FieldStorage(fp, envi... | 4 | 13 | 0 | 124 | 5 | 226 | 239 | 226 | ['env', 'expect', 'got', 'fs', 'fp'] | None | {"Assign": 5, "For": 3} | 8 | 14 | 8 | ["BytesIO", "POSTDATA_NON_ASCII.encode", "FieldStorage", "len", "range", "len", "items", "getattr"] | 0 | [] | The function (test_fieldstorage_multipart_non_ascii) defined within the public class called public.The function start at line 226 and ends at 239. It contains 13 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters and does not return any value. It declares 8.0 functions, and... | |
pasteorg_paste | public | public | 0 | 0 | test_fieldstorage_multipart_maxline.check | def check(content):data = """---123Content-Disposition: form-data; name="upload"; filename="fake.txt"Content-Type: text/plain{}---123--""".replace('\n', '\r\n').format(content)environ = {'CONTENT_LENGTH': str(len(data)),'CONTENT_TYPE': 'multipart/form-data; boundary=-123','REQUEST_METHOD': 'POST',}assert gen_result(dat... | 1 | 15 | 1 | 60 | 0 | 246 | 261 | 246 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_fieldstorage_multipart_maxline.check) defined within the public class called public.The function start at line 246 and ends at 261. It contains 15 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
pasteorg_paste | public | public | 0 | 0 | test_fieldstorage_multipart_maxline | def test_fieldstorage_multipart_maxline():# Issue #18167maxline = 1 << 16 - 1def check(content):data = """---123Content-Disposition: form-data; name="upload"; filename="fake.txt"Content-Type: text/plain{}---123--""".replace('\n', '\r\n').format(content)environ = {'CONTENT_LENGTH': str(len(data)),'CONTENT_TYPE': 'multip... | 1 | 6 | 0 | 40 | 3 | 242 | 264 | 242 | ['data', 'maxline', 'environ'] | None | {"Assign": 3, "Expr": 3} | 9 | 23 | 9 | ["format", "replace", "str", "len", "gen_result", "content.encode", "check", "check", "check"] | 0 | [] | The function (test_fieldstorage_multipart_maxline) defined within the public class called public.The function start at line 242 and ends at 264. It contains 6 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 9.0 functions, and I... | |
pasteorg_paste | public | public | 0 | 0 | test_fieldstorage_multipart_w3c | def test_fieldstorage_multipart_w3c():# Test basic FieldStorage multipart parsing (W3C sample)env = {'REQUEST_METHOD': 'POST','CONTENT_TYPE': f'multipart/form-data; boundary={BOUNDARY_W3}','CONTENT_LENGTH': str(len(POSTDATA_W3))}fp = BytesIO(POSTDATA_W3.encode('latin-1'))fs = FieldStorage(fp, environ=env, encoding="lat... | 3 | 21 | 0 | 183 | 6 | 267 | 288 | 267 | ['env', 'expect', 'fp', 'fs', 'got', 'files'] | None | {"Assign": 6, "For": 2} | 11 | 22 | 11 | ["str", "len", "BytesIO", "POSTDATA_W3.encode", "FieldStorage", "len", "len", "range", "len", "items", "getattr"] | 0 | [] | The function (test_fieldstorage_multipart_w3c) defined within the public class called public.The function start at line 267 and ends at 288. It contains 21 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value. It declares 11.0 functions, and It ... | |
pasteorg_paste | public | public | 0 | 0 | test_fieldstorage_part_content_length | def test_fieldstorage_part_content_length():boundary = "JfISa01"postdata = """--JfISa01Content-Disposition: form-data; name="submit-name"Content-Length: 5Larry--JfISa01"""env = {'REQUEST_METHOD': 'POST','CONTENT_TYPE': f'multipart/form-data; boundary={boundary}','CONTENT_LENGTH': str(len(postdata))}fp = BytesIO(postdat... | 1 | 17 | 0 | 88 | 5 | 291 | 307 | 291 | ['env', 'postdata', 'fp', 'fs', 'boundary'] | None | {"Assign": 5} | 6 | 17 | 6 | ["str", "len", "BytesIO", "postdata.encode", "FieldStorage", "len"] | 0 | [] | The function (test_fieldstorage_part_content_length) defined within the public class called public.The function start at line 291 and ends at 307. It contains 17 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 6.0 functions, and... | |
pasteorg_paste | public | public | 0 | 0 | test_field_storage_multipart_no_content_length | def test_field_storage_multipart_no_content_length():fp = BytesIO(b"""--MyBoundaryContent-Disposition: form-data; name="my-arg"; filename="foo"Test--MyBoundary--""")env = {"REQUEST_METHOD": "POST","CONTENT_TYPE": "multipart/form-data; boundary=MyBoundary","wsgi.input": fp,}fields = FieldStorage(fp, environ=env)assert l... | 1 | 8 | 0 | 53 | 3 | 310 | 325 | 310 | ['env', 'fp', 'fields'] | None | {"Assign": 3} | 4 | 16 | 4 | ["BytesIO", "FieldStorage", "len", "file.read"] | 0 | [] | The function (test_field_storage_multipart_no_content_length) defined within the public class called public.The function start at line 310 and ends at 325. It contains 8 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 4.0 functi... | |
pasteorg_paste | public | public | 0 | 0 | test_fieldstorage_as_context_manager | def test_fieldstorage_as_context_manager():fp = BytesIO(b'x' * 10)env = {'REQUEST_METHOD': 'PUT'}with FieldStorage(fp=fp, environ=env) as fs:content = fs.file.read()assert fs.file.closed is Falseassert fs.file.closed is Trueassert content == 'x' * 10with pytest.raises(ValueError, match='I/O operation on closed file'):f... | 1 | 10 | 0 | 84 | 3 | 328 | 337 | 328 | ['env', 'fp', 'content'] | None | {"Assign": 3, "Expr": 1, "With": 2} | 5 | 10 | 5 | ["BytesIO", "FieldStorage", "fs.file.read", "pytest.raises", "fs.file.read"] | 0 | [] | The function (test_fieldstorage_as_context_manager) defined within the public class called public.The function start at line 328 and ends at 337. It contains 10 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 5.0 functions, and ... | |
pasteorg_paste | public | public | 0 | 0 | test_qs_and_url_encode | def test_qs_and_url_encode():data = "key2=value2x&key3=value3&key4=value4"environ = {'CONTENT_LENGTH': str(len(data)),'CONTENT_TYPE': 'application/x-www-form-urlencoded','QUERY_STRING': 'key1=value1&key2=value2y','REQUEST_METHOD': 'POST',}assert gen_result(data, environ) == _qs_result | 1 | 9 | 0 | 42 | 2 | 348 | 356 | 348 | ['data', 'environ'] | None | {"Assign": 2} | 3 | 9 | 3 | ["str", "len", "gen_result"] | 0 | [] | The function (test_qs_and_url_encode) defined within the public class called public.The function start at line 348 and ends at 356. It contains 9 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 3.0 functions, and It has 3.0 fun... | |
pasteorg_paste | public | public | 0 | 0 | test_max_num_fields | def test_max_num_fields():# For application/x-www-form-urlencodeddata = '&'.join(['a=a']*11)environ = {'CONTENT_LENGTH': str(len(data)),'CONTENT_TYPE': 'application/x-www-form-urlencoded','REQUEST_METHOD': 'POST',}with pytest.raises(ValueError):FieldStorage(fp=BytesIO(data.encode()),environ=environ,max_num_fields=10,)#... | 1 | 44 | 0 | 149 | 2 | 359 | 411 | 359 | ['data', 'environ'] | None | {"Assign": 4, "Expr": 3, "With": 2} | 16 | 53 | 16 | ["join", "str", "len", "pytest.raises", "FieldStorage", "BytesIO", "data.encode", "str", "len", "pytest.raises", "FieldStorage", "BytesIO", "data.encode", "FieldStorage", "BytesIO", "data.encode"] | 0 | [] | The function (test_max_num_fields) defined within the public class called public.The function start at line 359 and ends at 411. It contains 44 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 16.0 functions, and It has 16.0 fun... | |
pasteorg_paste | public | public | 0 | 0 | test_qs_and_form_data | def test_qs_and_form_data():data = """---123Content-Disposition: form-data; name="key2"value2y---123Content-Disposition: form-data; name="key3"value3---123Content-Disposition: form-data; name="key4"value4---123--"""environ = {'CONTENT_LENGTH': str(len(data)),'CONTENT_TYPE': 'multipart/form-data; boundary=-123','QUERY_S... | 1 | 22 | 0 | 42 | 2 | 414 | 435 | 414 | ['data', 'environ'] | None | {"Assign": 2} | 3 | 22 | 3 | ["str", "len", "gen_result"] | 0 | [] | The function (test_qs_and_form_data) defined within the public class called public.The function start at line 414 and ends at 435. It contains 22 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 3.0 functions, and It has 3.0 fun... | |
pasteorg_paste | public | public | 0 | 0 | test_qs_and_form_data_file | def test_qs_and_form_data_file():data = """---123Content-Disposition: form-data; name="key2"value2y---123Content-Disposition: form-data; name="key3"value3---123Content-Disposition: form-data; name="key4"value4---123Content-Disposition: form-data; name="upload"; filename="fake.txt"Content-Type: text/plainthis is the con... | 1 | 30 | 0 | 53 | 3 | 438 | 467 | 438 | ['result', 'data', 'environ'] | None | {"Assign": 3} | 3 | 30 | 3 | ["str", "len", "gen_result"] | 0 | [] | The function (test_qs_and_form_data_file) defined within the public class called public.The function start at line 438 and ends at 467. It contains 30 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 3.0 functions, and It has 3.... | |
pasteorg_paste | public | public | 0 | 0 | test_parse_header | def test_parse_header():assert parse_header("text/plain") == ("text/plain", {})assert parse_header("text/vnd.just.made.this.up ; ") == ("text/vnd.just.made.this.up", {})assert parse_header("text/plain;charset=us-ascii") == ("text/plain", {"charset": "us-ascii"})assert parse_header('text/plain ; charset="us-ascii"') == ... | 1 | 18 | 0 | 145 | 0 | 470 | 487 | 470 | [] | None | {} | 9 | 18 | 9 | ["parse_header", "parse_header", "parse_header", "parse_header", "parse_header", "parse_header", "parse_header", "parse_header", "parse_header"] | 0 | [] | The function (test_parse_header) defined within the public class called public.The function start at line 470 and ends at 487. It contains 18 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 9.0 functions, and It has 9.0 functio... | |
pasteorg_paste | public | public | 0 | 0 | test_parse_mime_type | def test_parse_mime_type():parse = parse_mime_typeassert parse('*/*') == ('*', '*', {})assert parse('text/html') == ('text', 'html', {})assert parse('audio/*; q=0.2') == ('audio', '*', {'q': '0.2'})assert parse('text/x-dvi;level=1') == ('text', 'x-dvi', {'level': '1'})assert parse('image/gif; level=2; q=0.4') == ('imag... | 1 | 20 | 0 | 222 | 1 | 15 | 34 | 15 | ['parse'] | None | {"Assign": 1} | 12 | 20 | 12 | ["parse", "parse", "parse", "parse", "parse", "parse", "parse", "parse", "parse", "parse", "parse", "parse"] | 0 | [] | The function (test_parse_mime_type) defined within the public class called public.The function start at line 15 and ends at 34. It contains 20 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 12.0 functions, and It has 12.0 func... | |
pasteorg_paste | public | public | 0 | 0 | test_parse_illformed_mime_type | def test_parse_illformed_mime_type():parse = parse_mime_typeassert parse('*') == ('*', '*', {})assert parse('text') == ('text', '*', {})assert parse('text/') == ('text', '*', {})assert parse('/plain') == ('*', 'plain', {})assert parse('/') == ('*', '*', {})assert parse('text/plain;') == ('text', 'plain', {})assert pars... | 1 | 22 | 0 | 288 | 1 | 36 | 57 | 36 | ['parse'] | None | {"Assign": 1} | 18 | 22 | 18 | ["parse", "parse", "parse", "parse", "parse", "parse", "parse", "parse", "parse", "parse", "parse", "parse", "parse", "parse", "parse", "parse", "parse", "parse"] | 0 | [] | The function (test_parse_illformed_mime_type) defined within the public class called public.The function start at line 36 and ends at 57. It contains 22 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 18.0 functions, and It has... | |
pasteorg_paste | public | public | 0 | 0 | test_parse_media_range | def test_parse_media_range():parse = parse_media_rangeassert parse('application/*;q=0.5') == ('application', '*', {'q': '0.5'})assert parse('text/plain') == ('text', 'plain', {'q': '1'})assert parse('*') == ('*', '*', {'q': '1'})assert parse(';q=0.5') == ('*', '*', {'q': '0.5'})assert parse('*;q=0.5') == ('*', '*', {'q... | 1 | 34 | 0 | 486 | 1 | 59 | 92 | 59 | ['parse'] | None | {"Assign": 1} | 27 | 34 | 27 | ["parse", "parse", "parse", "parse", "parse", "parse", "parse", "parse", "parse", "parse", "parse", "parse", "parse", "parse", "parse", "parse", "parse", "parse", "parse", "parse", "parse", "parse", "parse", "parse", "parse", "parse", "parse"] | 0 | [] | The function (test_parse_media_range) defined within the public class called public.The function start at line 59 and ends at 92. It contains 34 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 27.0 functions, and It has 27.0 fu... | |
pasteorg_paste | public | public | 0 | 0 | test_fitness_and_quality_parsed | def test_fitness_and_quality_parsed():faq = fitness_and_quality_parsedassert faq('*/*;q=0.7', [('foo', 'bar', {'q': '0.5'})]) == (0, 0.5)assert faq('foo/*;q=0.7', [('foo', 'bar', {'q': '0.5'})]) == (100, 0.5)assert faq('*/bar;q=0.7', [('foo', 'bar', {'q': '0.5'})]) == (10, 0.5)assert faq('foo/bar;q=0.7', [('foo', 'bar'... | 1 | 56 | 0 | 865 | 1 | 94 | 149 | 94 | ['faq'] | None | {"Assign": 1} | 19 | 56 | 19 | ["faq", "faq", "faq", "faq", "faq", "faq", "faq", "faq", "faq", "faq", "faq", "faq", "faq", "faq", "faq", "faq", "faq", "faq", "faq"] | 0 | [] | The function (test_fitness_and_quality_parsed) defined within the public class called public.The function start at line 94 and ends at 149. It contains 56 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 19.0 functions, and It h... | |
pasteorg_paste | public | public | 0 | 0 | test_quality_parsed | def test_quality_parsed():qp = quality_parsedassert qp('image/gif;q=0.7', [('image', 'jpg', {'q': '0.5'})]) == 0assert qp('image/gif;q=0.7', [('image', '*', {'q': '0.5'})]) == 0.5assert qp('audio/mp3;q=0.7;quality=100', [('*', '*', {'q': '0', 'quality': '100'}),('audio', '*', {'q': '0', 'quality': '100'}),('*', 'mp3', ... | 1 | 11 | 0 | 154 | 1 | 151 | 161 | 151 | ['qp'] | None | {"Assign": 1} | 3 | 11 | 3 | ["qp", "qp", "qp"] | 0 | [] | The function (test_quality_parsed) defined within the public class called public.The function start at line 151 and ends at 161. It contains 11 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 3.0 functions, and It has 3.0 funct... | |
pasteorg_paste | public | public | 0 | 0 | test_quality | def test_quality():assert quality('text/html','text/*;q=0.3, text/html;q=0.75, text/html;level=1,'' text/html;level=2;q=0.4, */*;q=0.5') == 0.75assert quality('text/html;level=2','text/*;q=0.3, text/html;q=0.7, text/html;level=1,'' text/html;level=2;q=0.4, */*;q=0.5') == 0.4assert quality('text/plain','text/*;q=0.25, t... | 1 | 25 | 0 | 98 | 0 | 163 | 187 | 163 | [] | None | {} | 8 | 25 | 8 | ["quality", "quality", "quality", "quality", "quality", "quality", "quality", "quality"] | 0 | [] | The function (test_quality) defined within the public class called public.The function start at line 163 and ends at 187. It contains 25 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 8.0 functions, and It has 8.0 functions ca... | |
pasteorg_paste | public | public | 0 | 0 | test_best_match | def test_best_match():bm = best_matchassert bm([], '*/*') == ''assert bm(['application/xbel+xml', 'text/xml'],'text/*;q=0.5,*/*; q=0.1') == 'text/xml'assert bm(['application/xbel+xml', 'audio/mp3'],'text/*;q=0.5,*/*; q=0.1') == 'application/xbel+xml'assert bm(['application/xbel+xml', 'audio/mp3'],'text/*;q=0.5,*/mp3; q... | 1 | 35 | 0 | 244 | 1 | 189 | 223 | 189 | ['bm'] | None | {"Assign": 1} | 18 | 35 | 18 | ["bm", "bm", "bm", "bm", "bm", "bm", "bm", "bm", "bm", "bm", "bm", "bm", "bm", "bm", "bm", "bm", "bm", "bm"] | 0 | [] | The function (test_best_match) defined within the public class called public.The function start at line 189 and ends at 223. It contains 35 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 18.0 functions, and It has 18.0 functio... | |
pasteorg_paste | public | public | 0 | 0 | test_illformed_best_match | def test_illformed_best_match():bm = best_matchassert bm(['image/png', 'image/jpeg', 'image/gif', 'text/html'],'text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2') == 'image/jpeg'assert bm(['image/png', 'image/jpg', 'image/tif', 'text/html'],'text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2') == 'text/html'asser... | 1 | 8 | 0 | 58 | 1 | 225 | 232 | 225 | ['bm'] | None | {"Assign": 1} | 3 | 8 | 3 | ["bm", "bm", "bm"] | 0 | [] | The function (test_illformed_best_match) defined within the public class called public.The function start at line 225 and ends at 232. It contains 8 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 3.0 functions, and It has 3.0 ... | |
pasteorg_paste | public | public | 0 | 0 | test_sorted_match | def test_sorted_match():dm = desired_matchesassert dm(['text/html', 'application/xml'],'text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,''text/plain;q=0.8,image/png') == ['text/html', 'application/xml']assert dm(['text/html', 'application/xml'],'application/xml,application/json') == ['application/xml']as... | 1 | 10 | 0 | 58 | 1 | 234 | 243 | 234 | ['dm'] | None | {"Assign": 1} | 3 | 10 | 3 | ["dm", "dm", "dm"] | 0 | [] | The function (test_sorted_match) defined within the public class called public.The function start at line 234 and ends at 243. It contains 10 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 3.0 functions, and It has 3.0 functio... | |
pasteorg_paste | TestQuoting | public | 0 | 1 | test_html_unquote | def test_html_unquote(self):self.assertEqual(quoting.html_unquote(b'<hey you>'), '<hey\xa0you>')self.assertEqual(quoting.html_unquote(b''), '')self.assertEqual(quoting.html_unquote(b'&blahblah;'), '&blahblah;')self.assertEqual(quoting.html_unquote(b'\xe1\x80\xa9'), '\u1029') | 1 | 9 | 1 | 61 | 0 | 5 | 13 | 5 | self | [] | None | {"Expr": 4} | 8 | 9 | 8 | ["self.assertEqual", "quoting.html_unquote", "self.assertEqual", "quoting.html_unquote", "self.assertEqual", "quoting.html_unquote", "self.assertEqual", "quoting.html_unquote"] | 0 | [] | The function (test_html_unquote) defined within the public class called TestQuoting, that inherit another class.The function start at line 5 and ends at 13. It contains 9 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 8.0 funct... |
pasteorg_paste | TestQuoting | public | 0 | 1 | test_html_quote | def test_html_quote(self):self.assertEqual(quoting.html_quote(1), '1')self.assertEqual(quoting.html_quote(None), '')self.assertEqual(quoting.html_quote('<hey!>'), '<hey!>')self.assertEqual(quoting.html_quote(b'<hey!>'), b'<hey!>')self.assertEqual(quoting.html_quote('<\u1029>'), '<\u1029>') | 1 | 11 | 1 | 72 | 0 | 15 | 25 | 15 | self | [] | None | {"Expr": 5} | 10 | 11 | 10 | ["self.assertEqual", "quoting.html_quote", "self.assertEqual", "quoting.html_quote", "self.assertEqual", "quoting.html_quote", "self.assertEqual", "quoting.html_quote", "self.assertEqual", "quoting.html_quote"] | 0 | [] | The function (test_html_quote) defined within the public class called TestQuoting, that inherit another class.The function start at line 15 and ends at 25. It contains 11 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 10.0 func... |
pasteorg_paste | public | public | 0 | 0 | urlparser_hook | def urlparser_hook(environ):first, rest = request.path_info_split(environ.get('PATH_INFO', ''))if not first:# No usernamereturnenviron['app.user'] = firstenviron['SCRIPT_NAME'] += '/' + firstenviron['PATH_INFO'] = rest | 2 | 7 | 1 | 47 | 0 | 3 | 10 | 3 | environ | [] | None | {"Assign": 3, "AugAssign": 1, "If": 1, "Return": 1} | 2 | 8 | 2 | ["request.path_info_split", "environ.get"] | 0 | [] | The function (urlparser_hook) defined within the public class called public.The function start at line 3 and ends at 10. It contains 7 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 2.0 functions, and It has 2.0 functions call... |
pasteorg_paste | public | public | 0 | 0 | application | def application(environ, start_response):start_response('200 OK', [('Content-type', 'text/html')])body = 'user: %s' % environ['app.user']body = body.encode('ascii')return [body] | 1 | 5 | 2 | 39 | 1 | 2 | 6 | 2 | environ,start_response | ['body'] | Returns | {"Assign": 2, "Expr": 1, "Return": 1} | 2 | 5 | 2 | ["start_response", "body.encode"] | 30 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3718286_gawel_pyquery.tests.apps_py.secure_application", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3964585_django_channels.channels.routing_py.ChannelNameRouter.__call__", "_.content.gdrive.MyDrive.Phd_Thesis.Da... | The function (application) defined within the public class called public.The function start at line 2 and ends at 6. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [2.0], and this function return a value. It declares 2.0 functions, It has 2.0 functions called ... |
pasteorg_paste | public | public | 0 | 0 | application | def application(environ, start_response):start_response('200 OK', [('Content-type', 'text/html')])body = 'index: %s' % environ['app.user']body = body.encode('ascii')return [body] | 1 | 5 | 2 | 39 | 1 | 2 | 6 | 2 | environ,start_response | ['body'] | Returns | {"Assign": 2, "Expr": 1, "Return": 1} | 2 | 5 | 2 | ["start_response", "body.encode"] | 30 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3718286_gawel_pyquery.tests.apps_py.secure_application", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3964585_django_channels.channels.routing_py.ChannelNameRouter.__call__", "_.content.gdrive.MyDrive.Phd_Thesis.Da... | The function (application) defined within the public class called public.The function start at line 2 and ends at 6. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [2.0], and this function return a value. It declares 2.0 functions, It has 2.0 functions called ... |
pasteorg_paste | public | public | 0 | 0 | not_found_hook | def not_found_hook(environ, start_response):urlparser = environ['paste.urlparser.not_found_parser']path = environ.get('PATH_INFO', '')if not path:return urlparser.not_found(environ, start_response)# Strip off leading _'spath = '/' + path.lstrip('/').lstrip('_')environ['PATH_INFO'] = pathreturn urlparser(environ, start_... | 2 | 8 | 2 | 64 | 2 | 1 | 9 | 1 | environ,start_response | ['urlparser', 'path'] | Returns | {"Assign": 4, "If": 1, "Return": 2} | 5 | 9 | 5 | ["environ.get", "urlparser.not_found", "lstrip", "path.lstrip", "urlparser"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.paste.urlparser_py.URLParser.__call__"] | The function (not_found_hook) defined within the public class called public.The function start at line 1 and ends at 9. It contains 8 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [1.0], and this function return a value. It declares 5.0 functions, It has 5.0 functions call... |
pasteorg_paste | public | public | 0 | 0 | not_found_hook | def not_found_hook(environ, start_response):start_response('200 OK', [('Content-type', 'text/plain')])return [b'not found'] | 1 | 3 | 2 | 24 | 0 | 1 | 3 | 1 | environ,start_response | [] | Returns | {"Expr": 1, "Return": 1} | 1 | 3 | 1 | ["start_response"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.paste.urlparser_py.URLParser.__call__"] | The function (not_found_hook) defined within the public class called public.The function start at line 1 and ends at 3. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [1.0], and this function return a value. It declare 1.0 function, It has 1.0 function called ... |
pasteorg_paste | public | public | 0 | 0 | not_found_hook | def not_found_hook(environ, start_response):urlparser = environ['paste.urlparser.not_found_parser']first, rest = request.path_info_split(environ.get('PATH_INFO', ''))if not first:# No usernamereturnenviron['app.user'] = firstenviron['SCRIPT_NAME'] += '/' + firstenviron['PATH_INFO'] = restreturn urlparser(environ, start... | 2 | 9 | 2 | 62 | 1 | 3 | 12 | 3 | environ,start_response | ['urlparser'] | Returns | {"Assign": 4, "AugAssign": 1, "If": 1, "Return": 2} | 3 | 10 | 3 | ["request.path_info_split", "environ.get", "urlparser"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.paste.urlparser_py.URLParser.__call__"] | The function (not_found_hook) defined within the public class called public.The function start at line 3 and ends at 12. It contains 9 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [3.0], and this function return a value. It declares 3.0 functions, It has 3.0 functions cal... |
pasteorg_paste | public | public | 0 | 0 | application | def application(environ, start_response):start_response('200 OK', [('Content-type', 'text/plain')])body = 'user: %s' % environ.get('app.user')body = body.encode('ascii')return [body] | 1 | 5 | 2 | 41 | 1 | 2 | 6 | 2 | environ,start_response | ['body'] | Returns | {"Assign": 2, "Expr": 1, "Return": 1} | 3 | 5 | 3 | ["start_response", "environ.get", "body.encode"] | 30 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3718286_gawel_pyquery.tests.apps_py.secure_application", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3964585_django_channels.channels.routing_py.ChannelNameRouter.__call__", "_.content.gdrive.MyDrive.Phd_Thesis.Da... | The function (application) defined within the public class called public.The function start at line 2 and ends at 6. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [2.0], and this function return a value. It declares 3.0 functions, It has 3.0 functions called ... |
pasteorg_paste | public | public | 0 | 0 | application | def application(environ, start_response):start_response('200 OK', [('Content-type', 'text/html'),('test-header', 'TEST!')])return [b'test1'] | 1 | 4 | 2 | 30 | 0 | 1 | 4 | 1 | environ,start_response | [] | Returns | {"Expr": 1, "Return": 1} | 1 | 4 | 1 | ["start_response"] | 30 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3718286_gawel_pyquery.tests.apps_py.secure_application", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3964585_django_channels.channels.routing_py.ChannelNameRouter.__call__", "_.content.gdrive.MyDrive.Phd_Thesis.Da... | The function (application) defined within the public class called public.The function start at line 1 and ends at 4. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [1.0], and this function return a value. It declare 1.0 function, It has 1.0 function called ins... |
pasteorg_paste | public | public | 0 | 0 | stream.app | def app(environ, start_response):writer = start_response('200 OK', [('Content-type', 'text/html')])writer(b'te')writer(b'st')return [b'2'] | 1 | 5 | 2 | 36 | 0 | 2 | 6 | 2 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (stream.app) defined within the public class called public.The function start at line 2 and ends at 6. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [2.0] and does not return any value.. |
pasteorg_paste | public | public | 0 | 0 | stream | def stream():def app(environ, start_response):writer = start_response('200 OK', [('Content-type', 'text/html')])writer(b'te')writer(b'st')return [b'2']return app | 1 | 3 | 0 | 8 | 1 | 1 | 7 | 1 | ['writer'] | Returns | {"Assign": 1, "Expr": 2, "Return": 2} | 3 | 7 | 3 | ["start_response", "writer", "writer"] | 4 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3953282_googlecloudplatform_getting_started_python.background.app.main_py.index", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94533096_lancedb_lancedb.python.python.tests.test_util_py.test_sanitize_data_stream", "... | The function (stream) defined within the public class called public.The function start at line 1 and ends at 7. It contains 3 lines of code and it has a cyclomatic complexity of 1. It take 0 parameter, represented as [1.0], and this function return a value. It declares 3.0 functions, It has 3.0 functions called inside ... | |
pasteorg_paste | public | public | 0 | 0 | application | def application(environ, start_response):start_response('200 OK', [('Content-type', 'text/html'),('test-header', 'TEST!')])return [b'subsimple'] | 1 | 4 | 2 | 30 | 0 | 1 | 4 | 1 | environ,start_response | [] | Returns | {"Expr": 1, "Return": 1} | 1 | 4 | 1 | ["start_response"] | 30 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3718286_gawel_pyquery.tests.apps_py.secure_application", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3964585_django_channels.channels.routing_py.ChannelNameRouter.__call__", "_.content.gdrive.MyDrive.Phd_Thesis.Da... | The function (application) defined within the public class called public.The function start at line 1 and ends at 4. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [1.0], and this function return a value. It declare 1.0 function, It has 1.0 function called ins... |
unifyai_unify | Visitor | public | 0 | 1 | __init__ | def __init__(self):self.class_stack = []self.function_stack = []self.classes = []self.functions = [] | 1 | 5 | 1 | 29 | 0 | 24 | 28 | 24 | self | [] | None | {"Assign": 4} | 0 | 5 | 0 | [] | 14,667 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.query_py.AllocationError.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.query_py.ContentError.__init__", "_... | The function (__init__) defined within the public class called Visitor, that inherit another class.The function start at line 24 and ends at 28. It contains 5 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It has 14667.0 functions calling ... |
unifyai_unify | Visitor | public | 0 | 1 | visit_ClassDef | def visit_ClassDef(self, node):self.class_stack.append(node.name)self.classes.append({"name": node.name, "lineno": node.lineno})self.generic_visit(node)self.class_stack.pop() | 1 | 5 | 2 | 50 | 0 | 30 | 34 | 30 | self,node | [] | None | {"Expr": 4} | 4 | 5 | 4 | ["self.class_stack.append", "self.classes.append", "self.generic_visit", "self.class_stack.pop"] | 11 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69677202_py2many_py2many.pycpp.transpiler_py.CppTranspiler.visit_ClassDef", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69677202_py2many_py2many.pyd.transpiler_py.DTranspiler.visit_ClassDef", "_.content.gdrive.MyD... | The function (visit_ClassDef) defined within the public class called Visitor, that inherit another class.The function start at line 30 and ends at 34. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [30.0] and does not return any value. It declares 4.0 function... |
unifyai_unify | Visitor | public | 0 | 1 | visit_FunctionDef | def visit_FunctionDef(self, node):if self.function_stack or self.class_stack:returnself.function_stack.append(node.name)self.functions.append({"name": node.name, "lineno": node.lineno})self.generic_visit(node)self.function_stack.pop() | 3 | 7 | 2 | 60 | 0 | 36 | 42 | 36 | self,node | [] | None | {"Expr": 4, "If": 1, "Return": 1} | 4 | 7 | 4 | ["self.function_stack.append", "self.functions.append", "self.generic_visit", "self.function_stack.pop"] | 0 | [] | The function (visit_FunctionDef) defined within the public class called Visitor, that inherit another class.The function start at line 36 and ends at 42. It contains 7 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [36.0] and does not return any value. It declares 4.0 funct... |
unifyai_unify | public | public | 0 | 0 | get_all_modules | def get_all_modules():# get all modules in the packagemodule_paths = []for root, _, files in os.walk("unify"):for file in files:if "__init__" not in file and file[-3:] == ".py":module_paths.append(os.path.join(root, file))return module_paths | 5 | 7 | 0 | 59 | 1 | 45 | 52 | 45 | ['module_paths'] | Returns | {"Assign": 1, "Expr": 1, "For": 2, "If": 1, "Return": 1} | 3 | 8 | 3 | ["os.walk", "module_paths.append", "os.path.join"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95169609_codelion_optillm.optillm.plugins.deepthink.self_discover_py.SelfDiscover.__init__"] | The function (get_all_modules) defined within the public class called public.The function start at line 45 and ends at 52. It contains 7 lines of code and it has a cyclomatic complexity of 5. The function does not take any parameters, and this function return a value. It declares 3.0 functions, It has 3.0 functions cal... | |
unifyai_unify | public | public | 0 | 0 | get_functions_and_classes | def get_functions_and_classes(module_paths):# ast parse to get functions and classes in each moduledetails = dict()for module_path in module_paths:visitor = Visitor()with open(module_path) as f:code = f.read()tree = ast.parse(code)visitor.visit(tree)details[module_path] = {"class_names": visitor.classes,"function_names... | 2 | 13 | 1 | 70 | 4 | 55 | 68 | 55 | module_paths | ['code', 'visitor', 'tree', 'details'] | Returns | {"Assign": 5, "Expr": 1, "For": 1, "Return": 1, "With": 1} | 6 | 14 | 6 | ["dict", "Visitor", "open", "f.read", "ast.parse", "visitor.visit"] | 0 | [] | The function (get_functions_and_classes) defined within the public class called public.The function start at line 55 and ends at 68. It contains 13 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters, and this function return a value. It declares 6.0 functions, and It has 6... |
unifyai_unify | public | public | 0 | 0 | filter_and_import | def filter_and_import(details):# filter and import the public functions and classes in public modulesprivate_modules = []for module_path in details:private_module = Falsemodule_name = module_path[:-3].replace("/", ".")# check if there are any private modulesfor namespace in module_name.split("."):if namespace.startswit... | 9 | 38 | 1 | 213 | 7 | 71 | 117 | 71 | details | ['private_module', 'classes', 'function_names', 'module_name', 'functions', 'private_modules', 'class_names'] | Returns | {"Assign": 11, "Expr": 1, "For": 2, "If": 2, "Return": 1} | 8 | 47 | 8 | ["replace", "module_name.split", "namespace.startswith", "private_modules.append", "importlib.import_module", "startswith", "importlib.import_module", "startswith"] | 0 | [] | The function (filter_and_import) defined within the public class called public.The function start at line 71 and ends at 117. It contains 38 lines of code and it has a cyclomatic complexity of 9. The function does not take any parameters, and this function return a value. It declares 8.0 functions, and It has 8.0 func... |
unifyai_unify | public | public | 0 | 0 | get_function_signature | def get_function_signature(source_code):# get function signaturesig_start, sig_end = re.search(r"def\s+([a-zA-Z_][a-zA-Z0-9_]*)\s*\(\s*((?:[^()]*|\([^()]*\))*)\s*\)\s*(?:->\s*([^:]+))?\s*:",source_code,).span()signature = source_code[sig_start:sig_end]return signature | 1 | 7 | 1 | 33 | 1 | 120 | 127 | 120 | source_code | ['signature'] | Returns | {"Assign": 2, "Return": 1} | 2 | 8 | 2 | ["span", "re.search"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.generate_docs_py.write_function_and_class_jsons"] | The function (get_function_signature) defined within the public class called public.The function start at line 120 and ends at 127. It contains 7 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declares 2.0 functions, It has 2.0 func... |
unifyai_unify | public | public | 0 | 0 | get_formatted_docstring | def get_formatted_docstring(func):# get the docstring and split into linesdocstring = "\n".join(line.lstrip(" ") for line in func.__doc__.split("\n"))sections = docstring.strip().split("\n\n")# in case there's additional newlines, collect all the sections togetherfinal_sections = []count = 0for section in sections:if s... | 21 | 59 | 1 | 429 | 13 | 130 | 205 | 130 | func | ['docstring', 'raises_str', 'final_sections', 'count', 'arg_lines', 'return_lines', 'formatted_docstring', 'description', 'raise_lines', 'match', 'args_str', 'returns_str', 'sections'] | Returns | {"Assign": 22, "AugAssign": 5, "Expr": 8, "For": 5, "If": 14, "Return": 1} | 40 | 76 | 40 | ["join", "line.lstrip", "func.__doc__.split", "split", "docstring.strip", "section.startswith", "final_sections.append", "section.startswith", "final_sections.append", "section.startswith", "final_sections.append", "final_sections.append", "section.startswith", "split", "section.strip", "re.match", "match.groups", "arg... | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.generate_docs_py.write_function_and_class_jsons"] | The function (get_formatted_docstring) defined within the public class called public.The function start at line 130 and ends at 205. It contains 59 lines of code and it has a cyclomatic complexity of 21. The function does not take any parameters, and this function return a value. It declares 40.0 functions, It has 40.0... |
unifyai_unify | public | public | 0 | 0 | write_function_and_class_jsons | def write_function_and_class_jsons(details, private_modules):# create the json_files folderos.makedirs("json_files", exist_ok=True)os.makedirs("json_files/functions", exist_ok=True)os.makedirs("json_files/classes", exist_ok=True)# load all function and class docsfor module_path in details:# skip private modulesif modul... | 28 | 120 | 2 | 809 | 18 | 208 | 364 | 208 | details,private_modules | ['init_method', 'classes', 'class_', 'module_path', 'function', 'obj', 'member_names', 'source_code', 'formatted_docstring', 'lineno', 'module_name', 'signature', 'class_lineno', 'class_docstring', 'members', 'functions', 'class_module', 'module'] | None | {"Assign": 44, "Expr": 7, "For": 9, "If": 11, "Try": 2, "With": 2} | 41 | 157 | 41 | ["os.makedirs", "os.makedirs", "os.makedirs", "replace", "inspect.getsource", "warnings.warn", "get_function_signature", "get_formatted_docstring", "dict", "inspect.getmembers", "getattr", "isinstance", "module.startswith", "isinstance", "startswith", "startswith", "isinstance", "members.copy", "isinstance", "inspect.g... | 0 | [] | The function (write_function_and_class_jsons) defined within the public class called public.The function start at line 208 and ends at 364. It contains 120 lines of code and it has a cyclomatic complexity of 28. It takes 2 parameters, represented as [208.0] and does not return any value. It declares 41.0 functions, and... |
unifyai_unify | public | public | 0 | 0 | write_docs | def write_docs(latest_hash: str):files = [os.path.join("functions", path) for path in os.listdir("json_files/functions")] + [os.path.join("classes", path) for path in os.listdir("json_files/classes")]new_line = lambda f: f.write("\n\n")python_path_json = dict()github_url = f"https://github.com/unifyai/unify/tree/{lates... | 16 | 75 | 1 | 599 | 20 | 367 | 470 | 367 | latest_hash | ['actual_path', 'escaped_member_name', 'files', 'info', 'sections', 'module_path', 'new_line', 'namespace', 'lineno', 'module_name', 'module_data', 'github_path', 'python_file_path', 'member', 'signature', 'python_path_json', 'name', 'docstring', 'github_url', 'class_lineno'] | None | {"Assign": 29, "Expr": 27, "For": 5, "If": 6, "With": 3} | 56 | 104 | 56 | ["os.path.join", "os.listdir", "os.path.join", "os.listdir", "f.write", "dict", "sorted", "file_path.replace", "module_name.replace", "join", "module_name.split", "module_path.replace", "module_name.split", "dict", "os.makedirs", "join", "actual_path.split", "open", "os.path.join", "json.load", "module_name.split", "op... | 0 | [] | The function (write_docs) defined within the public class called public.The function start at line 367 and ends at 470. It contains 75 lines of code and it has a cyclomatic complexity of 16. The function does not take any parameters and does not return any value. It declares 56.0 functions, and It has 56.0 functions c... |
unifyai_unify | public | public | 0 | 0 | get_mint_format | def get_mint_format(python_path, root=""):results = []for key in python_path:results.append({"group": key,"pages": get_mint_format(python_path[key], os.path.join(root, key)),},)if len(results[-1]["pages"]) == 0:results[-1] = os.path.join(root, key)return results | 3 | 12 | 2 | 84 | 1 | 473 | 484 | 473 | python_path,root | ['results'] | Returns | {"Assign": 2, "Expr": 1, "For": 1, "If": 1, "Return": 1} | 5 | 12 | 5 | ["results.append", "get_mint_format", "os.path.join", "len", "os.path.join"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.generate_docs_py.get_mint_format", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.generate_docs_py.update_mint"] | The function (get_mint_format) defined within the public class called public.The function start at line 473 and ends at 484. It contains 12 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [473.0], and this function return a value. It declares 5.0 functions, It has 5.0 functi... |
unifyai_unify | public | public | 0 | 0 | update_function_classes_path | def update_function_classes_path(mint_format):if isinstance(mint_format, str):mint_format = mint_format.replace("python/", "")obj_name = mint_format.split("/")[-1]return (f"python/functions/{mint_format}"if obj_name[0].islower()else f"python/classes/{mint_format}")updated_pages = []for page in sorted(mint_format["pages... | 5 | 17 | 1 | 106 | 3 | 487 | 503 | 487 | mint_format | ['obj_name', 'updated_pages', 'mint_format'] | Returns | {"Assign": 4, "Expr": 1, "For": 1, "If": 1, "Return": 2} | 8 | 17 | 8 | ["isinstance", "mint_format.replace", "mint_format.split", "islower", "sorted", "isinstance", "updated_pages.append", "update_function_classes_path"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.generate_docs_py.update_function_classes_path", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.generate_docs_py.update_mint"] | The function (update_function_classes_path) defined within the public class called public.The function start at line 487 and ends at 503. It contains 17 lines of code and it has a cyclomatic complexity of 5. The function does not take any parameters, and this function return a value. It declares 8.0 functions, It has 8... |
unifyai_unify | public | public | 0 | 0 | update_mint | def update_mint():with open("mint.json") as f:mint = json.load(f)with open("python_path.json") as f:python_path = json.load(f)mint_format = get_mint_format(python_path["unify"], root="python")updated_mint_format = [update_function_classes_path(group) for group in mint_format]mint["navigation"][1] = {"group": "","pages"... | 2 | 13 | 0 | 101 | 4 | 506 | 521 | 506 | ['mint', 'updated_mint_format', 'mint_format', 'python_path'] | None | {"Assign": 5, "Expr": 1, "With": 3} | 8 | 16 | 8 | ["open", "json.load", "open", "json.load", "get_mint_format", "update_function_classes_path", "open", "json.dump"] | 0 | [] | The function (update_mint) defined within the public class called public.The function start at line 506 and ends at 521. It contains 13 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 8.0 functions, and It has 8.0 functions cal... | |
unifyai_unify | public | public | 0 | 0 | pytest_sessionstart | def pytest_sessionstart(session):if os.environ.get("CI"):unify.delete_logs() | 2 | 3 | 1 | 20 | 0 | 6 | 8 | 6 | session | [] | None | {"Expr": 1, "If": 1} | 2 | 3 | 2 | ["os.environ.get", "unify.delete_logs"] | 0 | [] | The function (pytest_sessionstart) defined within the public class called public.The function start at line 6 and ends at 8. It contains 3 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 2.0 functions, and It has 2.0 functions ... |
unifyai_unify | public | public | 0 | 0 | _handle_project.wrapper | def wrapper(*args, **kwargs):project = test_fn.__name__if project in unify.list_projects():unify.delete_project(project)try:with unify.Project(project):unify.unset_context()test_fn(*args, **kwargs)unify.delete_project(project)except:unify.delete_project(project)exc_type, exc_value, exc_tb = sys.exc_info()tb_string = ""... | 3 | 14 | 2 | 100 | 0 | 12 | 25 | 12 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (_handle_project.wrapper) defined within the public class called public.The function start at line 12 and ends at 25. It contains 14 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [12.0] and does not return any value.. |
unifyai_unify | public | public | 0 | 0 | _handle_project.async_wrapper | async def async_wrapper(*args, **kwargs):project = test_fn.__name__if project in unify.list_projects():unify.delete_project(project)try:with unify.Project(project):unify.unset_context()await test_fn(*args, **kwargs)unify.delete_project(project)except:unify.delete_project(project)exc_type, exc_value, exc_tb = sys.exc_in... | 3 | 14 | 2 | 101 | 0 | 28 | 41 | 28 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (_handle_project.async_wrapper) defined within the public class called public.The function start at line 28 and ends at 41. It contains 14 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [28.0] and does not return any value.. |
unifyai_unify | public | public | 0 | 0 | _handle_project | def _handle_project(test_fn):# noinspection PyBroadException@functools.wraps(test_fn)def wrapper(*args, **kwargs):project = test_fn.__name__if project in unify.list_projects():unify.delete_project(project)try:with unify.Project(project):unify.unset_context()test_fn(*args, **kwargs)unify.delete_project(project)except:un... | 2 | 6 | 1 | 35 | 2 | 9 | 43 | 9 | test_fn | ['tb_string', 'project'] | Returns | {"Assign": 6, "Expr": 10, "If": 2, "Return": 1, "Try": 2, "With": 2} | 25 | 35 | 25 | ["unify.list_projects", "unify.delete_project", "unify.Project", "unify.unset_context", "test_fn", "unify.delete_project", "unify.delete_project", "sys.exc_info", "join", "traceback.format_exception", "Exception", "functools.wraps", "unify.list_projects", "unify.delete_project", "unify.Project", "unify.unset_context", ... | 0 | [] | The function (_handle_project) defined within the public class called public.The function start at line 9 and ends at 43. It contains 6 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters, and this function return a value. It declares 25.0 functions, and It has 25.0 functio... |
unifyai_unify | TestDatasetConstruction | public | 0 | 0 | test_create_dataset_from_str | def test_create_dataset_from_str(self) -> None:dataset = unify.Dataset("a")assert isinstance(dataset[0], unify.Log)data = dataset.dataassert isinstance(data, list)assert len(data) == 1assert isinstance(data[0], str)assert data[0] == "a" | 1 | 8 | 1 | 63 | 0 | 16 | 23 | 16 | self | [] | None | {"Assign": 2} | 5 | 8 | 5 | ["unify.Dataset", "isinstance", "isinstance", "len", "isinstance"] | 0 | [] | The function (test_create_dataset_from_str) defined within the public class called TestDatasetConstruction.The function start at line 16 and ends at 23. It contains 8 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 5.0 functions... |
unifyai_unify | TestDatasetConstruction | public | 0 | 0 | test_create_dataset_from_list_of_str | def test_create_dataset_from_list_of_str(self) -> None:dataset = unify.Dataset(["a", "b", "c"])assert isinstance(dataset[0], unify.Log)data = dataset.dataassert isinstance(data, list)assert len(data) == 3assert isinstance(data[0], str)assert data[0] == "a" | 1 | 8 | 1 | 69 | 0 | 26 | 33 | 26 | self | [] | None | {"Assign": 2} | 5 | 8 | 5 | ["unify.Dataset", "isinstance", "isinstance", "len", "isinstance"] | 0 | [] | The function (test_create_dataset_from_list_of_str) defined within the public class called TestDatasetConstruction.The function start at line 26 and ends at 33. It contains 8 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 5.0 f... |
unifyai_unify | TestDatasetConstruction | public | 0 | 0 | test_create_dataset_from_prompt | def test_create_dataset_from_prompt(self) -> None:dataset = unify.Dataset(Prompt(messages=[{"role": "user", "content": "a"}]))assert isinstance(dataset[0], unify.Log)data = dataset.dataassert isinstance(data, list)assert len(data) == 1assert isinstance(data[0], Prompt)assert data[0].components["messages"][0] == {"role"... | 1 | 8 | 1 | 94 | 0 | 36 | 43 | 36 | self | [] | None | {"Assign": 2} | 6 | 8 | 6 | ["unify.Dataset", "Prompt", "isinstance", "isinstance", "len", "isinstance"] | 0 | [] | The function (test_create_dataset_from_prompt) defined within the public class called TestDatasetConstruction.The function start at line 36 and ends at 43. It contains 8 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 6.0 functi... |
unifyai_unify | TestDatasetConstruction | public | 0 | 0 | test_create_dataset_from_list_of_prompts | def test_create_dataset_from_list_of_prompts(self) -> None:dataset = unify.Dataset([Prompt(messages=[{"role": "user", "content": usr_msg}])for usr_msg in ["a", "b", "c"]],)assert isinstance(dataset[0], unify.Log)data = dataset.dataassert isinstance(data, list)assert len(data) == 3assert isinstance(data[0], Prompt)asser... | 2 | 13 | 1 | 107 | 0 | 46 | 58 | 46 | self | [] | None | {"Assign": 2} | 6 | 13 | 6 | ["unify.Dataset", "Prompt", "isinstance", "isinstance", "len", "isinstance"] | 0 | [] | The function (test_create_dataset_from_list_of_prompts) defined within the public class called TestDatasetConstruction.The function start at line 46 and ends at 58. It contains 13 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares ... |
unifyai_unify | TestDatasetConstruction | public | 0 | 0 | test_create_dataset_from_dict | def test_create_dataset_from_dict(self) -> None:dataset = unify.Dataset(dict(messages=[{"role": "user", "content": "a"}]))assert isinstance(dataset[0], unify.Log)data = dataset.dataassert isinstance(data, list)assert len(data) == 1assert isinstance(data[0], dict)assert data[0]["messages"][0] == {"role": "user", "conten... | 1 | 8 | 1 | 92 | 0 | 61 | 68 | 61 | self | [] | None | {"Assign": 2} | 6 | 8 | 6 | ["unify.Dataset", "dict", "isinstance", "isinstance", "len", "isinstance"] | 0 | [] | The function (test_create_dataset_from_dict) defined within the public class called TestDatasetConstruction.The function start at line 61 and ends at 68. It contains 8 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 6.0 function... |
unifyai_unify | TestDatasetConstruction | public | 0 | 0 | test_create_dataset_from_list_of_dicts | def test_create_dataset_from_list_of_dicts(self) -> None:dataset = unify.Dataset([dict(messages=[{"role": "user", "content": usr_msg}])for usr_msg in ["a", "b", "c"]],)assert isinstance(dataset[0], unify.Log)data = dataset.dataassert isinstance(data, list)assert len(data) == 3assert isinstance(data[0], dict)assert data... | 2 | 13 | 1 | 105 | 0 | 71 | 83 | 71 | self | [] | None | {"Assign": 2} | 6 | 13 | 6 | ["unify.Dataset", "dict", "isinstance", "isinstance", "len", "isinstance"] | 0 | [] | The function (test_create_dataset_from_list_of_dicts) defined within the public class called TestDatasetConstruction.The function start at line 71 and ends at 83. It contains 13 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 6.... |
unifyai_unify | TestDatasetConstruction | public | 0 | 0 | test_create_dataset_from_dict_w_prompt | def test_create_dataset_from_dict_w_prompt(self) -> None:dataset = unify.Dataset(dict(prompt=Prompt(messages=[{"role": "user", "content": "a"}])),)assert isinstance(dataset[0], unify.Log)data = dataset.dataassert isinstance(data, list)assert len(data) == 1assert isinstance(data[0], dict)assert data[0]["prompt"].compone... | 1 | 13 | 1 | 104 | 0 | 86 | 98 | 86 | self | [] | None | {"Assign": 2} | 7 | 13 | 7 | ["unify.Dataset", "dict", "Prompt", "isinstance", "isinstance", "len", "isinstance"] | 0 | [] | The function (test_create_dataset_from_dict_w_prompt) defined within the public class called TestDatasetConstruction.The function start at line 86 and ends at 98. It contains 13 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 7.... |
unifyai_unify | TestDatasetConstruction | public | 0 | 0 | test_create_dataset_from_list_of_prompt_dicts | def test_create_dataset_from_list_of_prompt_dicts(self) -> None:dataset = unify.Dataset([dict(prompt=Prompt(messages=[{"role": "user", "content": usr_msg}]))for usr_msg in ["a", "b", "c"]],)assert isinstance(dataset[0], unify.Log)data = dataset.dataassert isinstance(data, list)assert len(data) == 3assert isinstance(dat... | 2 | 16 | 1 | 116 | 0 | 101 | 116 | 101 | self | [] | None | {"Assign": 2} | 7 | 16 | 7 | ["unify.Dataset", "dict", "Prompt", "isinstance", "isinstance", "len", "isinstance"] | 0 | [] | The function (test_create_dataset_from_list_of_prompt_dicts) defined within the public class called TestDatasetConstruction.The function start at line 101 and ends at 116. It contains 16 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It de... |
unifyai_unify | TestDatasetConstruction | public | 0 | 0 | test_create_dataset_from_upstream | def test_create_dataset_from_upstream(self) -> None:if "TestCreateDatasetFromStr" in unify.list_datasets():unify.delete_dataset("TestCreateDatasetFromStr")dataset = unify.Dataset(["a", "b", "c"], name="TestCreateDatasetFromStr")assert dataset.name not in unify.list_datasets()dataset.upload()assert "TestCreateDatasetFro... | 2 | 11 | 1 | 101 | 0 | 119 | 130 | 119 | self | [] | None | {"Assign": 2, "Expr": 3, "If": 1} | 10 | 12 | 10 | ["unify.list_datasets", "unify.delete_dataset", "unify.Dataset", "unify.list_datasets", "dataset.upload", "unify.list_datasets", "unify.Dataset.from_upstream", "isinstance", "unify.delete_dataset", "unify.list_datasets"] | 0 | [] | The function (test_create_dataset_from_upstream) defined within the public class called TestDatasetConstruction.The function start at line 119 and ends at 130. It contains 11 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 10.0 ... |
unifyai_unify | TestDatasetManipulation | public | 0 | 0 | test_iterate_over_dataset | def test_iterate_over_dataset(self) -> None:msgs = ["a", "b", "c"]dataset = unify.Dataset(msgs)assert len(dataset) == len(msgs)for log, item, msg in zip(dataset, dataset.data, msgs):assert isinstance(log, unify.Log)assert item == msg | 2 | 7 | 1 | 65 | 0 | 136 | 142 | 136 | self | [] | None | {"Assign": 2, "For": 1} | 5 | 7 | 5 | ["unify.Dataset", "len", "len", "zip", "isinstance"] | 0 | [] | The function (test_iterate_over_dataset) defined within the public class called TestDatasetManipulation.The function start at line 136 and ends at 142. It contains 7 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 5.0 functions,... |
unifyai_unify | TestDatasetManipulation | public | 0 | 0 | test_index_dataset | def test_index_dataset(self) -> None:dataset = unify.Dataset(["a", "b", "c"])data = dataset.dataassert isinstance(dataset[0], unify.Log)assert data[0] == "a"assert isinstance(dataset[1], unify.Log)assert data[1] == "b"assert isinstance(dataset[2], unify.Log)assert data[2] == "c"assert isinstance(dataset[-1], unify.Log)... | 1 | 13 | 1 | 116 | 0 | 145 | 157 | 145 | self | [] | None | {"Assign": 2, "Expr": 1, "With": 1} | 6 | 13 | 6 | ["unify.Dataset", "isinstance", "isinstance", "isinstance", "isinstance", "pytest.raises"] | 0 | [] | The function (test_index_dataset) defined within the public class called TestDatasetManipulation.The function start at line 145 and ends at 157. It contains 13 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 6.0 functions, and ... |
unifyai_unify | TestDatasetManipulation | public | 0 | 0 | test_slice_dataset | def test_slice_dataset(self) -> None:msgs = ["a", "b", "c", "d"]dataset = unify.Dataset(["a", "b", "c", "d"])msgs = msgs[1:-1]dataset = dataset[1:-1]data = dataset.data[1:-1]for log, item, msg in zip(dataset, data, msgs):assert isinstance(log, unify.Log)assert item == msg | 2 | 9 | 1 | 92 | 0 | 160 | 168 | 160 | self | [] | None | {"Assign": 5, "For": 1} | 3 | 9 | 3 | ["unify.Dataset", "zip", "isinstance"] | 0 | [] | The function (test_slice_dataset) defined within the public class called TestDatasetManipulation.The function start at line 160 and ends at 168. It contains 9 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 3.0 functions, and I... |
unifyai_unify | TestDatasetManipulation | public | 0 | 0 | test_dataset_contains | def test_dataset_contains(self) -> None:dataset1 = unify.Dataset(["a", "b", "c"])dataset2 = unify.Dataset(["a", "b"])assert dataset2 in dataset1assert "a" in dataset1assert "b" in dataset1assert dataset1.data[1] in dataset1assert dataset1.data[0:2] in dataset1assert ["b", "c"] in dataset1assert "d" not in dataset1datas... | 1 | 12 | 1 | 95 | 0 | 171 | 182 | 171 | self | [] | None | {"Assign": 3} | 3 | 12 | 3 | ["unify.Dataset", "unify.Dataset", "unify.Dataset"] | 0 | [] | The function (test_dataset_contains) defined within the public class called TestDatasetManipulation.The function start at line 171 and ends at 182. It contains 12 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 3.0 functions, an... |
unifyai_unify | TestDatasetManipulation | public | 0 | 0 | test_dataset_one_liners | def test_dataset_one_liners(self) -> None:dataset = (unify.Dataset(["a"]) + "b").add("c").set_name("my_dataset")assert dataset.name == "my_dataset"assert "a" in datasetassert "b" in datasetassert "c" in dataset | 1 | 6 | 1 | 49 | 0 | 185 | 190 | 185 | self | [] | None | {"Assign": 1} | 3 | 6 | 3 | ["set_name", "add", "unify.Dataset"] | 0 | [] | The function (test_dataset_one_liners) defined within the public class called TestDatasetManipulation.The function start at line 185 and ends at 190. It contains 6 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 3.0 functions, a... |
unifyai_unify | TestDatasetCombining | public | 0 | 0 | test_add_datasets | def test_add_datasets(self) -> None:msgs = ["a", "b", "c", "d"]dataset1 = unify.Dataset(msgs[0:2])dataset2 = unify.Dataset(msgs[2:])dataset = dataset1 + dataset2assert len(dataset) == len(msgs)data = dataset.datafor log, item, msg in zip(dataset, data, msgs):assert isinstance(log, unify.Log)assert item == msg | 2 | 10 | 1 | 92 | 0 | 196 | 205 | 196 | self | [] | None | {"Assign": 5, "For": 1} | 6 | 10 | 6 | ["unify.Dataset", "unify.Dataset", "len", "len", "zip", "isinstance"] | 0 | [] | The function (test_add_datasets) defined within the public class called TestDatasetCombining.The function start at line 196 and ends at 205. It contains 10 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 6.0 functions, and It h... |
unifyai_unify | TestDatasetCombining | public | 0 | 0 | test_sum_datasets | def test_sum_datasets(self) -> None:msgs = ["a", "b", "c", "d"]dataset1 = unify.Dataset(msgs[0:2])dataset2 = unify.Dataset(msgs[2:])dataset = sum([dataset1, dataset2])assert len(dataset) == len(msgs)data = dataset.datafor log, item, msg in zip(dataset, data, msgs):assert isinstance(log, unify.Log)assert item == msg | 2 | 10 | 1 | 97 | 0 | 208 | 217 | 208 | self | [] | None | {"Assign": 5, "For": 1} | 7 | 10 | 7 | ["unify.Dataset", "unify.Dataset", "sum", "len", "len", "zip", "isinstance"] | 0 | [] | The function (test_sum_datasets) defined within the public class called TestDatasetCombining.The function start at line 208 and ends at 217. It contains 10 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 7.0 functions, and It h... |
unifyai_unify | TestDatasetCombining | public | 0 | 0 | test_add_datasets_w_duplicates | def test_add_datasets_w_duplicates(self) -> None:msgs1 = ["a", "b"]msgs2 = ["b", "c"]dataset1 = unify.Dataset(msgs1)dataset2 = unify.Dataset(msgs2)dataset = dataset1 + dataset2assert len(dataset) == 3data = dataset.datafor log, item, msg in zip(dataset, data, ("a", "b", "c")):assert isinstance(log, unify.Log)assert ite... | 2 | 11 | 1 | 89 | 0 | 220 | 230 | 220 | self | [] | None | {"Assign": 6, "For": 1} | 5 | 11 | 5 | ["unify.Dataset", "unify.Dataset", "len", "zip", "isinstance"] | 0 | [] | The function (test_add_datasets_w_duplicates) defined within the public class called TestDatasetCombining.The function start at line 220 and ends at 230. It contains 11 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 5.0 functio... |
unifyai_unify | TestDatasetCombining | public | 0 | 0 | test_dataset_inplace_addition | def test_dataset_inplace_addition(self) -> None:msgs = ["a", "b", "c", "d"]dataset = unify.Dataset(msgs[0:2])did = id(dataset)dataset2 = unify.Dataset(msgs[2:])dataset += dataset2assert did == id(dataset)assert len(dataset) == len(msgs)data = dataset.datafor log, item, msg in zip(dataset, data, msgs):assert isinstance(... | 2 | 12 | 1 | 103 | 0 | 233 | 244 | 233 | self | [] | None | {"Assign": 5, "AugAssign": 1, "For": 1} | 8 | 12 | 8 | ["unify.Dataset", "id", "unify.Dataset", "id", "len", "len", "zip", "isinstance"] | 0 | [] | The function (test_dataset_inplace_addition) defined within the public class called TestDatasetCombining.The function start at line 233 and ends at 244. It contains 12 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 8.0 function... |
unifyai_unify | TestDatasetCombining | public | 0 | 0 | test_dataset_single_item_addition | def test_dataset_single_item_addition(self) -> None:dataset = unify.Dataset("a") + "b"data = dataset.dataassert len(dataset) == 2assert isinstance(dataset[0], unify.Log)assert data[0] == "a"assert isinstance(dataset[1], unify.Log)assert data[1] == "b" | 1 | 8 | 1 | 67 | 0 | 247 | 254 | 247 | self | [] | None | {"Assign": 2} | 4 | 8 | 4 | ["unify.Dataset", "len", "isinstance", "isinstance"] | 0 | [] | The function (test_dataset_single_item_addition) defined within the public class called TestDatasetCombining.The function start at line 247 and ends at 254. It contains 8 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 4.0 funct... |
unifyai_unify | TestDatasetCombining | public | 0 | 0 | test_dataset_reverse_addition | def test_dataset_reverse_addition(self) -> None:dataset = "a" + unify.Dataset("b")data = dataset.dataassert len(dataset) == 2assert isinstance(dataset[0], unify.Log)assert data[0] == "a"assert isinstance(dataset[1], unify.Log)assert data[1] == "b" | 1 | 8 | 1 | 67 | 0 | 257 | 264 | 257 | self | [] | None | {"Assign": 2} | 4 | 8 | 4 | ["unify.Dataset", "len", "isinstance", "isinstance"] | 0 | [] | The function (test_dataset_reverse_addition) defined within the public class called TestDatasetCombining.The function start at line 257 and ends at 264. It contains 8 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 4.0 functions... |
unifyai_unify | TestDatasetTrimming | public | 0 | 0 | test_sub_datasets | def test_sub_datasets(self) -> None:msgs = ["a", "b", "c", "d"]dataset1 = unify.Dataset(msgs)dataset2 = unify.Dataset(msgs[2:])dataset = dataset1 - dataset2assert len(dataset) == 2data = dataset.datafor log, item, msg in zip(dataset, data, msgs[0:2]):assert isinstance(log, unify.Log)assert item == msg | 2 | 10 | 1 | 89 | 0 | 269 | 278 | 269 | self | [] | None | {"Assign": 5, "For": 1} | 5 | 10 | 5 | ["unify.Dataset", "unify.Dataset", "len", "zip", "isinstance"] | 0 | [] | The function (test_sub_datasets) defined within the public class called TestDatasetTrimming.The function start at line 269 and ends at 278. It contains 10 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 5.0 functions, and It ha... |
unifyai_unify | TestDatasetTrimming | public | 0 | 0 | test_sub_datasets_w_non_overlap | def test_sub_datasets_w_non_overlap(self) -> None:msgs1 = ["a", "b"]msgs2 = ["b", "c"]dataset1 = unify.Dataset(msgs1)dataset2 = unify.Dataset(msgs2)with pytest.raises(AssertionError):dataset1 - dataset2 | 1 | 7 | 1 | 48 | 0 | 281 | 287 | 281 | self | [] | None | {"Assign": 4, "Expr": 1, "With": 1} | 3 | 7 | 3 | ["unify.Dataset", "unify.Dataset", "pytest.raises"] | 0 | [] | The function (test_sub_datasets_w_non_overlap) defined within the public class called TestDatasetTrimming.The function start at line 281 and ends at 287. It contains 7 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 3.0 function... |
unifyai_unify | TestDatasetTrimming | public | 0 | 0 | test_dataset_inplace_subtraction | def test_dataset_inplace_subtraction(self) -> None:msgs = ["a", "b", "c", "d"]dataset = unify.Dataset(msgs)did = id(dataset)dataset2 = unify.Dataset(msgs[2:])dataset -= dataset2assert did == id(dataset)assert len(dataset) == 2data = dataset.datafor log, item, msg in zip(dataset, data, msgs[0:2]):assert isinstance(log, ... | 2 | 12 | 1 | 100 | 0 | 290 | 301 | 290 | self | [] | None | {"Assign": 5, "AugAssign": 1, "For": 1} | 7 | 12 | 7 | ["unify.Dataset", "id", "unify.Dataset", "id", "len", "zip", "isinstance"] | 0 | [] | The function (test_dataset_inplace_subtraction) defined within the public class called TestDatasetTrimming.The function start at line 290 and ends at 301. It contains 12 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 7.0 functi... |
unifyai_unify | TestDatasetTrimming | public | 0 | 0 | test_dataset_single_item_subtraction | def test_dataset_single_item_subtraction(self) -> None:dataset = unify.Dataset(["a", "b"]) - "b"assert len(dataset) == 1data = dataset.dataassert isinstance(dataset[0], unify.Log)assert data[0] == "a" | 1 | 6 | 1 | 52 | 0 | 304 | 309 | 304 | self | [] | None | {"Assign": 2} | 3 | 6 | 3 | ["unify.Dataset", "len", "isinstance"] | 0 | [] | The function (test_dataset_single_item_subtraction) defined within the public class called TestDatasetTrimming.The function start at line 304 and ends at 309. It contains 6 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 3.0 fun... |
unifyai_unify | TestDatasetTrimming | public | 0 | 0 | test_dataset_reverse_subtraction | def test_dataset_reverse_subtraction(self) -> None:dataset = ["a", "b"] - unify.Dataset("b")assert len(dataset) == 1data = dataset.dataassert isinstance(dataset[0], unify.Log)assert data[0] == "a" | 1 | 6 | 1 | 52 | 0 | 312 | 317 | 312 | self | [] | None | {"Assign": 2} | 3 | 6 | 3 | ["unify.Dataset", "len", "isinstance"] | 0 | [] | The function (test_dataset_reverse_subtraction) defined within the public class called TestDatasetTrimming.The function start at line 312 and ends at 317. It contains 6 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 3.0 functio... |
unifyai_unify | TestDatasetTrimming | public | 0 | 0 | test_dataset_from_item_subtraction | def test_dataset_from_item_subtraction(self) -> None:dataset = unify.Dataset("b") + "a" - "b"assert len(dataset) == 1data = dataset.dataassert isinstance(dataset[0], unify.Log)assert data[0] == "a" | 1 | 6 | 1 | 50 | 0 | 320 | 325 | 320 | self | [] | None | {"Assign": 2} | 3 | 6 | 3 | ["unify.Dataset", "len", "isinstance"] | 0 | [] | The function (test_dataset_from_item_subtraction) defined within the public class called TestDatasetTrimming.The function start at line 320 and ends at 325. It contains 6 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 3.0 funct... |
unifyai_unify | UploadTesting | public | 0 | 0 | __enter__ | def __enter__(self):if "test_dataset" in unify.list_datasets():unify.delete_dataset("test_dataset") | 2 | 3 | 1 | 20 | 0 | 329 | 331 | 329 | self | [] | None | {"Expr": 1, "If": 1} | 2 | 3 | 2 | ["unify.list_datasets", "unify.delete_dataset"] | 35 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3928915_donnemartin_gitsome.xonsh.contexts_py.Functor.__enter__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3967063_matthew_brett_delocate.delocate.tmpdirs_py.InTemporaryDirectory.__enter__", "_.content.gdrive.M... | The function (__enter__) defined within the public class called UploadTesting.The function start at line 329 and ends at 331. It contains 3 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 2.0 functions, It has 2.0 functions call... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.