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 | TestApp | public | 0 | 0 | _make_environ | def _make_environ(self):environ = self.extra_environ.copy()environ['paste.throw_errors'] = Truereturn environ | 1 | 4 | 1 | 22 | 0 | 153 | 156 | 153 | self | [] | Returns | {"Assign": 2, "Return": 1} | 1 | 4 | 1 | ["self.extra_environ.copy"] | 0 | [] | The function (_make_environ) defined within the public class called TestApp.The function start at line 153 and ends at 156. It contains 4 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 declare 1.0 function, and It has 1.0 function ... |
pasteorg_paste | TestApp | public | 0 | 0 | get | def get(self, url, params=None, headers=None, extra_environ=None,status=None, expect_errors=False):"""Get the given url (well, actually a path like``'/page.html'``).``params``:A query string, or a dictionary that will be encodedinto a query string.You may also include a querystring on the ``url``.``headers``:A dictiona... | 6 | 23 | 7 | 158 | 0 | 158 | 210 | 158 | self,url,params,headers,extra_environ,status,expect_errors | [] | Returns | {"Assign": 8, "AugAssign": 3, "Expr": 3, "If": 5, "Return": 1} | 9 | 53 | 9 | ["isinstance", "urlencode", "self._make_environ", "str", "url.split", "self._set_headers", "environ.update", "TestRequest", "self.do_request"] | 2,985 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.Meson.dependencies", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15217004_shayypy_guilded_py.guilded.abc_py.User.__init__", "_.content.gdrive.MyDrive.Phd... | The function (get) defined within the public class called TestApp.The function start at line 158 and ends at 210. It contains 23 lines of code and it has a cyclomatic complexity of 6. It takes 7 parameters, represented as [158.0], and this function return a value. It declares 9.0 functions, It has 9.0 functions called ... |
pasteorg_paste | TestApp | public | 0 | 0 | _gen_request | def _gen_request(self, method, url, params=b'', headers=None, extra_environ=None, status=None, upload_files=None, expect_errors=False):"""Do a generic request."""if headers is None:headers = {}if extra_environ is None:extra_environ = {}environ = self._make_environ()# @@: Should this be all non-strings?if isinstance(par... | 9 | 32 | 9 | 256 | 0 | 212 | 248 | 212 | self,method,url,params,headers,extra_environ,status,upload_files,expect_errors | [] | Returns | {"Assign": 16, "Expr": 4, "If": 8, "Return": 1} | 20 | 37 | 20 | ["self._make_environ", "isinstance", "urlencode", "hasattr", "urlencode", "params.items", "isinstance", "params.encode", "urlparse.parse_qsl", "self.encode_multipart", "environ.setdefault", "str", "url.split", "str", "len", "io.BytesIO", "self._set_headers", "environ.update", "TestRequest", "self.do_request"] | 0 | [] | The function (_gen_request) defined within the public class called TestApp.The function start at line 212 and ends at 248. It contains 32 lines of code and it has a cyclomatic complexity of 9. It takes 9 parameters, represented as [212.0], and this function return a value. It declares 20.0 functions, and It has 20.0 f... |
pasteorg_paste | TestApp | public | 0 | 0 | post | def post(self, url, params=b'', headers=None, extra_environ=None, status=None, upload_files=None, expect_errors=False):"""Do a POST request.Very like the ``.get()`` method.``params`` are put in the body of the request.``upload_files`` is for file uploads.It should be a list of``[(fieldname, filename, file_content)]``.Y... | 1 | 6 | 8 | 66 | 0 | 250 | 267 | 250 | self,url,params,headers,extra_environ,status,upload_files,expect_errors | [] | Returns | {"Expr": 1, "Return": 1} | 1 | 18 | 1 | ["self._gen_request"] | 70 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.api_py.Api.create_token", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.endpoint_py.DetailEndpoint.create", "_.conten... | The function (post) defined within the public class called TestApp.The function start at line 250 and ends at 267. It contains 6 lines of code and it has a cyclomatic complexity of 1. It takes 8 parameters, represented as [250.0], and this function return a value. It declare 1.0 function, It has 1.0 function called ins... |
pasteorg_paste | TestApp | public | 0 | 0 | put | def put(self, url, params=b'', headers=None, extra_environ=None, status=None, upload_files=None, expect_errors=False):"""Do a PUT request.Very like the ``.get()`` method.``params`` are put in the body of the request.``upload_files`` is for file uploads.It should be a list of``[(fieldname, filename, file_content)]``.You... | 1 | 6 | 8 | 66 | 0 | 269 | 286 | 269 | self,url,params,headers,extra_environ,status,upload_files,expect_errors | [] | Returns | {"Expr": 1, "Return": 1} | 1 | 18 | 1 | ["self._gen_request"] | 104 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3510604_dieseldev_diesel.diesel.util.queue_py.Dispatcher.dispatch", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3546011_hashdist_hashdist.hashdist.deps.sh_py.StreamReader.close", "_.content.gdrive.MyDrive.Phd_Thes... | The function (put) defined within the public class called TestApp.The function start at line 269 and ends at 286. It contains 6 lines of code and it has a cyclomatic complexity of 1. It takes 8 parameters, represented as [269.0], and this function return a value. It declare 1.0 function, It has 1.0 function called insi... |
pasteorg_paste | TestApp | public | 0 | 0 | delete | def delete(self, url, params=b'', headers=None, extra_environ=None, status=None, expect_errors=False):"""Do a DELETE request.Very like the ``.get()`` method.``params`` are put in the body of the request.Returns a `response object<class-paste.fixture.TestResponse.html>`_"""return self._gen_request('DELETE', url, params=... | 1 | 5 | 7 | 62 | 0 | 288 | 299 | 288 | self,url,params,headers,extra_environ,status,expect_errors | [] | Returns | {"Expr": 1, "Return": 1} | 1 | 12 | 1 | ["self._gen_request"] | 334 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3470350_lincolnloop_django_debug_logging.debug_logging.views_py.delete_runs", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3513788_docker_archive_docker_registry.docker_registry.lib.index.db_py.SQLAlchemyIndex._han... | The function (delete) defined within the public class called TestApp.The function start at line 288 and ends at 299. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 7 parameters, represented as [288.0], and this function return a value. It declare 1.0 function, It has 1.0 function called i... |
pasteorg_paste | TestApp | public | 0 | 0 | head | def head(self, url, headers=None, extra_environ=None, status=None, expect_errors=False):"""Do a HEAD request.Very like the ``.get()`` method.Returns a `response object<class-paste.fixture.TestResponse.html>`_"""return self._gen_request('HEAD', url, headers=headers, extra_environ=extra_environ,status=status, upload_file... | 1 | 5 | 6 | 53 | 0 | 301 | 311 | 301 | self,url,headers,extra_environ,status,expect_errors | [] | Returns | {"Expr": 1, "Return": 1} | 1 | 11 | 1 | ["self._gen_request"] | 21 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3564431_devstructure_blueprint.blueprint.io.server.backend_py.delete", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3564431_devstructure_blueprint.blueprint.io.server.backend_py.head_blueprint", "_.content.gdrive.M... | The function (head) defined within the public class called TestApp.The function start at line 301 and ends at 311. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 6 parameters, represented as [301.0], and this function return a value. It declare 1.0 function, It has 1.0 function called ins... |
pasteorg_paste | TestApp | public | 0 | 0 | _set_headers | def _set_headers(self, headers, environ):"""Turn any headers into environ variables"""if not headers:returnfor header, value in headers.items():if header.lower() == 'content-type':var = 'CONTENT_TYPE'elif header.lower() == 'content-length':var = 'CONTENT_LENGTH'else:var = 'HTTP_%s' % header.replace('-', '_').upper()env... | 5 | 11 | 3 | 74 | 0 | 316 | 329 | 316 | self,headers,environ | [] | None | {"Assign": 4, "Expr": 1, "For": 1, "If": 3, "Return": 1} | 5 | 14 | 5 | ["headers.items", "header.lower", "header.lower", "upper", "header.replace"] | 0 | [] | The function (_set_headers) defined within the public class called TestApp.The function start at line 316 and ends at 329. It contains 11 lines of code and it has a cyclomatic complexity of 5. It takes 3 parameters, represented as [316.0] and does not return any value. It declares 5.0 functions, and It has 5.0 functio... |
pasteorg_paste | TestApp | public | 0 | 0 | encode_multipart | def encode_multipart(self, params, files):"""Encodes a set of parameters (typically a name/value list) anda set of files (a list of (name, filename, file_body)) into atypical POST body, returning the (content_type, body)."""boundary = '----------a_BoUnDaRy%s$' % random.random()content_type = 'multipart/form-data; bound... | 4 | 28 | 3 | 225 | 0 | 331 | 364 | 331 | self,params,files | [] | Returns | {"Assign": 11, "Expr": 12, "For": 2, "Return": 1} | 22 | 34 | 22 | ["random.random", "boundary.encode", "lines.append", "ensure_binary", "lines.append", "lines.append", "ensure_binary", "lines.append", "self._get_file_info", "lines.append", "ensure_binary", "ensure_binary", "lines.append", "mimetypes.guess_type", "ensure_str", "fcontent.encode", "lines.append", "lines.append", "lines.... | 0 | [] | The function (encode_multipart) defined within the public class called TestApp.The function start at line 331 and ends at 364. It contains 28 lines of code and it has a cyclomatic complexity of 4. It takes 3 parameters, represented as [331.0], and this function return a value. It declares 22.0 functions, and It has 22... |
pasteorg_paste | TestApp | public | 0 | 0 | _get_file_info | def _get_file_info(self, file_info):if len(file_info) == 2:# It only has a filenamefilename = file_info[1]if self.relative_to:filename = os.path.join(self.relative_to, filename)f = open(filename, 'rb')content = f.read()f.close()return (file_info[0], filename, content)elif len(file_info) == 3:return file_infoelse:raise ... | 4 | 17 | 2 | 99 | 0 | 366 | 383 | 366 | self,file_info | [] | Returns | {"Assign": 4, "Expr": 1, "If": 3, "Return": 2} | 8 | 18 | 8 | ["len", "os.path.join", "open", "f.read", "f.close", "len", "ValueError", "repr"] | 0 | [] | The function (_get_file_info) defined within the public class called TestApp.The function start at line 366 and ends at 383. It contains 17 lines of code and it has a cyclomatic complexity of 4. It takes 2 parameters, represented as [366.0], and this function return a value. It declares 8.0 functions, and It has 8.0 f... |
pasteorg_paste | TestApp | public | 0 | 0 | do_request | def do_request(self, req, status):"""Executes the given request (``req``), with the expected``status``.Generally ``.get()`` and ``.post()`` are usedinstead."""if self.pre_request_hook:self.pre_request_hook(self)__tracebackhide__ = Trueif self.cookies:c = BaseCookie()for name, value in self.cookies.items():c[name] = val... | 14 | 51 | 3 | 364 | 0 | 385 | 443 | 385 | self,req,status | [] | Returns | {"Assign": 23, "Expr": 7, "For": 4, "If": 7, "Return": 1, "Try": 1} | 24 | 59 | 24 | ["self.pre_request_hook", "BaseCookie", "self.cookies.items", "join", "join", "c.values", "lint.middleware", "CaptureStdout", "time.time", "wsgilib.raw_interactive", "time.time", "sys.stderr.write", "out.getvalue", "self._make_response", "items", "hasattr", "ValueError", "setattr", "self._check_status", "self._check_er... | 10 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.80560341_prozorroukr_openprocurement_api.docs.tests.base.test_py.DumpsWebTestApp.do_request", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.tests.test_cgitb_catcher_py.test_after_start", "_.c... | The function (do_request) defined within the public class called TestApp.The function start at line 385 and ends at 443. It contains 51 lines of code and it has a cyclomatic complexity of 14. It takes 3 parameters, represented as [385.0], and this function return a value. It declares 24.0 functions, It has 24.0 functio... |
pasteorg_paste | TestApp | public | 0 | 0 | _check_status | def _check_status(self, status, res):__tracebackhide__ = Trueif status == '*':returnif isinstance(status, (list, tuple)):if res.status not in status:raise AppError("Bad response: %s (not one of %s for %s)\n%s"% (res.full_status, ', '.join(map(str, status)), res.request.url, res.body))returnif status is None:if res.stat... | 8 | 23 | 3 | 145 | 0 | 445 | 467 | 445 | self,status,res | [] | None | {"Assign": 3, "If": 6, "Return": 3} | 7 | 23 | 7 | ["isinstance", "AppError", "join", "map", "body.decode", "AppError", "AppError"] | 0 | [] | The function (_check_status) defined within the public class called TestApp.The function start at line 445 and ends at 467. It contains 23 lines of code and it has a cyclomatic complexity of 8. It takes 3 parameters, represented as [445.0] and does not return any value. It declares 7.0 functions, and It has 7.0 functi... |
pasteorg_paste | TestApp | public | 0 | 0 | _check_errors | def _check_errors(self, res):if res.errors:raise AppError("Application had errors logged:\n%s" % res.errors) | 2 | 4 | 2 | 21 | 0 | 469 | 472 | 469 | self,res | [] | None | {"If": 1} | 1 | 4 | 1 | ["AppError"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69848474_vaskivskyi_ha_asusrouter.custom_components.asusrouter.config_flow_py._async_process_step"] | The function (_check_errors) defined within the public class called TestApp.The function start at line 469 and ends at 472. It contains 4 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [469.0] and does not return any value. It declare 1.0 function, It has 1.0 function calle... |
pasteorg_paste | TestApp | public | 0 | 0 | _make_response | def _make_response(self, resp, total_time):status, headers, body, errors = respreturn TestResponse(self, status, headers, body, errors,total_time) | 1 | 4 | 3 | 33 | 0 | 474 | 477 | 474 | self,resp,total_time | [] | Returns | {"Assign": 1, "Return": 1} | 1 | 4 | 1 | ["TestResponse"] | 0 | [] | The function (_make_response) defined within the public class called TestApp.The function start at line 474 and ends at 477. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [474.0], and this function return a value. It declare 1.0 function, and It has 1.0 func... |
pasteorg_paste | Dummy_smtplib | public | 0 | 0 | __init__ | def __init__(self, actual):self.captured = io.StringIO()self.actual = actual | 1 | 3 | 2 | 21 | 0 | 481 | 483 | 481 | self,server | [] | None | {"Assign": 3, "Expr": 1} | 1 | 11 | 1 | ["warnings.warn"] | 6,814 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.Autotools.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.CMake.__init__", "_.content.... | The function (__init__) defined within the public class called Dummy_smtplib.The function start at line 481 and ends at 483. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [481.0] and does not return any value. It declare 1.0 function, It has 1.0 function call... |
pasteorg_paste | CaptureStdout | public | 0 | 0 | write | def write(self, s):self.captured.write(s)self.actual.write(s) | 1 | 3 | 2 | 23 | 0 | 485 | 487 | 485 | self,s | [] | None | {"Expr": 2} | 2 | 3 | 2 | ["self.captured.write", "self.actual.write"] | 501 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3495544_aio_libs_multidict.tests.gen_pickles_py.generate", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3510604_dieseldev_diesel.examples.crawler_py.write_file", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creatio... | The function (write) defined within the public class called CaptureStdout.The function start at line 485 and ends at 487. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [485.0] and does not return any value. It declares 2.0 functions, It has 2.0 functions call... |
pasteorg_paste | CaptureStdout | public | 0 | 0 | flush | def flush(self):self.actual.flush() | 1 | 2 | 1 | 12 | 0 | 489 | 490 | 489 | self | [] | None | {"Expr": 1} | 1 | 2 | 1 | ["self.actual.flush"] | 9 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3625987_abdur_rahmaanj_honeybot.honeybot.plugins.poker_assets.best5_py.hand_rank", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3675065_rouxrc_gazouilleur.gazouilleur.lib.filelogger_py.FileLogger.close", "_.content... | The function (flush) defined within the public class called CaptureStdout.The function start at line 489 and ends at 490. 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 insi... |
pasteorg_paste | CaptureStdout | public | 0 | 0 | writelines | def writelines(self, lines):for item in lines:self.write(item) | 2 | 3 | 2 | 18 | 0 | 492 | 494 | 492 | self,lines | [] | None | {"Expr": 1, "For": 1} | 1 | 3 | 1 | ["self.write"] | 0 | [] | The function (writelines) defined within the public class called CaptureStdout.The function start at line 492 and ends at 494. It contains 3 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [492.0] and does not return any value. It declare 1.0 function, and It has 1.0 functi... |
pasteorg_paste | CaptureStdout | public | 0 | 0 | getvalue | def getvalue(self):return self.captured.getvalue() | 1 | 2 | 1 | 13 | 0 | 496 | 497 | 496 | self | [] | Returns | {"Return": 1} | 1 | 2 | 1 | ["self.captured.getvalue"] | 11 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3546011_hashdist_hashdist.hashdist.deps.yaml.__init___py.dump_all", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3546011_hashdist_hashdist.hashdist.deps.yaml.__init___py.emit", "_.content.gdrive.MyDrive.Phd_Thesis.... | The function (getvalue) defined within the public class called CaptureStdout.The function start at line 496 and ends at 497. It contains 2 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 declare 1.0 function, It has 1.0 function call... |
pasteorg_paste | Dummy_smtplib | public | 0 | 0 | __init__ | def __init__(self, test_app, status, headers, body, errors, total_time):self.test_app = test_appself.status = int(status.split()[0])self.full_status = statusself.headers = headersself.header_dict = HeaderDict.fromlist(self.headers)self.body = bodyself.errors = errorsself._normal_body = Noneself.time = total_timeself._f... | 1 | 12 | 7 | 84 | 0 | 509 | 520 | 509 | self,server | [] | None | {"Assign": 3, "Expr": 1} | 1 | 11 | 1 | ["warnings.warn"] | 6,814 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.Autotools.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.CMake.__init__", "_.content.... | The function (__init__) defined within the public class called Dummy_smtplib.The function start at line 509 and ends at 520. It contains 12 lines of code and it has a cyclomatic complexity of 1. It takes 7 parameters, represented as [509.0] and does not return any value. It declare 1.0 function, It has 1.0 function cal... |
pasteorg_paste | TestResponse | public | 0 | 0 | forms__get | def forms__get(self):"""Returns a dictionary of ``Form`` objects.Indexes are both inorder (from zero) and by form id (if the form is given an id)."""if self._forms_indexed is None:self._parse_forms()return self._forms_indexed | 2 | 4 | 1 | 22 | 0 | 522 | 529 | 522 | self | [] | Returns | {"Expr": 2, "If": 1, "Return": 1} | 1 | 8 | 1 | ["self._parse_forms"] | 0 | [] | The function (forms__get) defined within the public class called TestResponse.The function start at line 522 and ends at 529. It contains 4 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 declare 1.0 function, and It has 1.0 functio... |
pasteorg_paste | TestResponse | public | 0 | 0 | form__get | def form__get(self):forms = self.formsif not forms:raise TypeError("You used response.form, but no forms exist")if 1 in forms:# There is more than one formraise TypeError("You used response.form, but more than one form exists")return forms[0] | 3 | 9 | 1 | 34 | 0 | 537 | 546 | 537 | self | [] | Returns | {"Assign": 1, "If": 2, "Return": 1} | 2 | 10 | 2 | ["TypeError", "TypeError"] | 0 | [] | The function (form__get) defined within the public class called TestResponse.The function start at line 537 and ends at 546. It contains 9 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 2.0 functions, and It has 2.0 functi... |
pasteorg_paste | TestResponse | public | 0 | 0 | _parse_forms | def _parse_forms(self):forms = self._forms_indexed = {}form_texts = []started = Nonebody = self.bodybody = body.decode('utf8', 'xmlcharrefreplace')for match in self._tag_re.finditer(body):end = match.group(1) == '/'tag = match.group(2).lower()if tag != 'form':continueif end:assert started, ("</form> unexpected at %s" %... | 6 | 27 | 1 | 180 | 0 | 558 | 584 | 558 | self | [] | None | {"Assign": 12, "Expr": 1, "For": 2, "If": 3} | 12 | 27 | 12 | ["body.decode", "self._tag_re.finditer", "match.group", "lower", "match.group", "match.start", "form_texts.append", "match.end", "match.start", "match.start", "enumerate", "Form"] | 0 | [] | The function (_parse_forms) defined within the public class called TestResponse.The function start at line 558 and ends at 584. It contains 27 lines of code and it has a cyclomatic complexity of 6. 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 | TestResponse | public | 0 | 0 | header | def header(self, name, default=NO_DEFAULT):"""Returns the named header; an error if there is not exactly onematching header (unless you give a default -- always an errorif there is more than one header)"""found = Nonefor cur_name, value in self.headers:if cur_name.lower() == name.lower():assert not found, ("Ambiguous h... | 6 | 16 | 3 | 97 | 0 | 586 | 606 | 586 | self,name,default | [] | Returns | {"Assign": 2, "Expr": 1, "For": 1, "If": 3, "Return": 2} | 4 | 21 | 4 | ["cur_name.lower", "name.lower", "KeyError", "join"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.70258536_basetenlabs_truss.truss.remote.baseten.service_py.BasetenService.authenticate", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.70258536_basetenlabs_truss.truss_chains.truss_chains.deployment.deployment_clien... | The function (header) defined within the public class called TestResponse.The function start at line 586 and ends at 606. It contains 16 lines of code and it has a cyclomatic complexity of 6. It takes 3 parameters, represented as [586.0], and this function return a value. It declares 4.0 functions, It has 4.0 functions... |
pasteorg_paste | TestResponse | public | 0 | 0 | all_headers | def all_headers(self, name):"""Gets all headers by the ``name``, returns as a list"""found = []for cur_name, value in self.headers:if cur_name.lower() == name.lower():found.append(value)return found | 3 | 6 | 2 | 42 | 0 | 608 | 616 | 608 | self,name | [] | Returns | {"Assign": 1, "Expr": 2, "For": 1, "If": 1, "Return": 1} | 3 | 9 | 3 | ["cur_name.lower", "name.lower", "found.append"] | 0 | [] | The function (all_headers) defined within the public class called TestResponse.The function start at line 608 and ends at 616. It contains 6 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [608.0], and this function return a value. It declares 3.0 functions, and It has 3.0 ... |
pasteorg_paste | TestResponse | public | 0 | 0 | follow | def follow(self, **kw):"""If this request is a redirect, follow that redirect.Itis an error if this is not a redirect response.Returnsanother response object."""assert self.status >= 300 and self.status < 400, ("You can only follow redirect responses (not %s)"% self.full_status)location = self.header('location')# @@: W... | 2 | 6 | 2 | 49 | 0 | 618 | 629 | 618 | self,**kw | [] | Returns | {"Assign": 1, "Expr": 1, "Return": 1} | 2 | 12 | 2 | ["self.header", "self.test_app.get"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3636841_databio_pypiper.pypiper.manager_py.PipelineManager.run"] | The function (follow) defined within the public class called TestResponse.The function start at line 618 and ends at 629. It contains 6 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [618.0], and this function return a value. It declares 2.0 functions, It has 2.0 functions ... |
pasteorg_paste | TestResponse | public | 0 | 0 | click | def click(self, description=None, linkid=None, href=None,anchor=None, index=None, verbose=False):"""Click the link as described.Each of ``description``,``linkid``, and ``url`` are *patterns*, meaning that they areeither strings (regular expressions), compiled regularexpressions (objects with a ``search`` method), or ca... | 1 | 12 | 7 | 89 | 0 | 631 | 679 | 631 | self,description,linkid,href,anchor,index,verbose | [] | Returns | {"Assign": 2, "Expr": 1, "Return": 1} | 2 | 49 | 2 | ["self._find_element", "self.goto"] | 38 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3687462_toscawidgets_tw2_core.tests.test_js_py.TestJS.test_encoding_widget_id", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3694126_pythonindia_wye.tests.base_py.login", "_.content.gdrive.MyDrive.Phd_Thesis.Datase... | The function (click) defined within the public class called TestResponse.The function start at line 631 and ends at 679. It contains 12 lines of code and it has a cyclomatic complexity of 1. It takes 7 parameters, represented as [631.0], and this function return a value. It declares 2.0 functions, It has 2.0 functions ... |
pasteorg_paste | TestResponse | public | 0 | 0 | clickbutton | def clickbutton(self, description=None, buttonid=None, href=None,button=None, index=None, verbose=False):"""Like ``.click()``, except looks for link-like buttons.This kind of button should look like``<button onclick="...location.href='url'...">``."""__tracebackhide__ = Truefound_html, found_desc, found_attrs = self._fi... | 1 | 12 | 7 | 95 | 0 | 681 | 697 | 681 | self,description,buttonid,href,button,index,verbose | [] | Returns | {"Assign": 2, "Expr": 1, "Return": 1} | 3 | 17 | 3 | ["self._find_element", "re.compile", "self.goto"] | 0 | [] | The function (clickbutton) defined within the public class called TestResponse.The function start at line 681 and ends at 697. It contains 12 lines of code and it has a cyclomatic complexity of 1. It takes 7 parameters, represented as [681.0], and this function return a value. It declares 3.0 functions, and It has 3.0... |
pasteorg_paste | public | public | 0 | 0 | _find_element.printlog | def printlog(s):if verbose:print(s) | 2 | 3 | 1 | 12 | 0 | 712 | 714 | 712 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (_find_element.printlog) defined within the public class called public.The function start at line 712 and ends at 714. 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.. |
pasteorg_paste | TestResponse | public | 0 | 0 | _find_element | def _find_element(self, tag, href_attr, href_extract,content, id,href_pattern,html_pattern,index, verbose):content_pat = _make_pattern(content)id_pat = _make_pattern(id)href_pat = _make_pattern(href_pattern)html_pat = _make_pattern(html_pattern)_tag_re = re.compile(r'<%s\s+(.*?)>(.*?)</%s>' % (tag, tag), re.I+re.S)def ... | 21 | 71 | 10 | 380 | 0 | 699 | 774 | 699 | self,tag,href_attr,href_extract,content,id,href_pattern,html_pattern,index,verbose | [] | Returns | {"Assign": 17, "AugAssign": 1, "Expr": 12, "For": 1, "If": 14, "Return": 1, "Try": 1} | 39 | 76 | 39 | ["_make_pattern", "_make_pattern", "_make_pattern", "_make_pattern", "re.compile", "print", "_tag_re.finditer", "match.group", "match.group", "match.group", "_parse_attrs", "printlog", "attrs.get", "printlog", "href_extract.search", "printlog", "m.group", "el_href.startswith", "printlog", "el_href.startswith", "printlo... | 0 | [] | The function (_find_element) defined within the public class called TestResponse.The function start at line 699 and ends at 774. It contains 71 lines of code and it has a cyclomatic complexity of 21. It takes 10 parameters, represented as [699.0], and this function return a value. It declares 39.0 functions, and It ha... |
pasteorg_paste | TestResponse | public | 0 | 0 | goto | def goto(self, href, method='get', **args):"""Go to the (potentially relative) link ``href``, using thegiven method (``'get'`` or ``'post'``) and any extra argumentsyou want to pass to the ``app.get()`` or ``app.post()``methods.All hostnames and schemes will be ignored."""scheme, host, path, query, fragment = urlparse.... | 2 | 14 | 4 | 120 | 0 | 776 | 798 | 776 | self,href,method,**args | [] | Returns | {"Assign": 7, "Expr": 1, "If": 1, "Return": 1} | 5 | 23 | 5 | ["urlparse.urlsplit", "urlparse.urlunsplit", "urlparse.urljoin", "method.lower", "method"] | 0 | [] | The function (goto) defined within the public class called TestResponse.The function start at line 776 and ends at 798. It contains 14 lines of code and it has a cyclomatic complexity of 2. It takes 4 parameters, represented as [776.0], and this function return a value. It declares 5.0 functions, and It has 5.0 functi... |
pasteorg_paste | TestResponse | public | 0 | 0 | normal_body__get | def normal_body__get(self):if self._normal_body is None:self._normal_body = self._normal_body_regex.sub(b' ', self.body)return self._normal_body | 2 | 5 | 1 | 33 | 0 | 802 | 806 | 802 | self | [] | Returns | {"Assign": 1, "If": 1, "Return": 1} | 1 | 5 | 1 | ["self._normal_body_regex.sub"] | 0 | [] | The function (normal_body__get) defined within the public class called TestResponse.The function start at line 802 and ends at 806. It contains 5 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 declare 1.0 function, and It has 1.0 f... |
pasteorg_paste | TestResponse | public | 0 | 0 | __contains__ | def __contains__(self, s):"""A response 'contains' a string if it is present in the bodyof the response.Whitespace is normalized when searchingfor a string."""if not isinstance(s, (bytes, str)):s = str(s)if isinstance(s, str):## FIXME: we don't know that this response uses utf8:s = s.encode('utf8')return (self.body.fin... | 4 | 7 | 2 | 69 | 0 | 813 | 825 | 813 | self,s | [] | Returns | {"Assign": 2, "Expr": 1, "If": 2, "Return": 1} | 6 | 13 | 6 | ["isinstance", "str", "isinstance", "s.encode", "self.body.find", "self.normal_body.find"] | 10 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3627162_cinpla_exdir.exdir.core.exdir_file_py.File.__contains__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3692721_yelp_bravado_core.bravado_core.util_py.AliasKeyDict.__contains__", "_.content.gdrive.MyDrive.Ph... | The function (__contains__) defined within the public class called TestResponse.The function start at line 813 and ends at 825. It contains 7 lines of code and it has a cyclomatic complexity of 4. It takes 2 parameters, represented as [813.0], and this function return a value. It declares 6.0 functions, It has 6.0 func... |
pasteorg_paste | TestResponse | public | 0 | 0 | mustcontain | def mustcontain(self, *strings, **kw):"""Assert that the response contains all of the strings passedin as arguments.Equivalent to::assert string in res"""if 'no' in kw:no = kw['no']del kw['no']if isinstance(no, (bytes, str)):no = [no]else:no = []if kw:raise TypeError("The only keyword argument allowed is 'no'")for s in... | 8 | 23 | 3 | 138 | 0 | 827 | 857 | 827 | self,*strings,**kw | [] | None | {"Assign": 3, "Expr": 5, "For": 2, "If": 5} | 8 | 31 | 8 | ["isinstance", "TypeError", "print", "print", "IndexError", "print", "print", "IndexError"] | 0 | [] | The function (mustcontain) defined within the public class called TestResponse.The function start at line 827 and ends at 857. It contains 23 lines of code and it has a cyclomatic complexity of 8. It takes 3 parameters, represented as [827.0] and does not return any value. It declares 8.0 functions, and It has 8.0 fun... |
pasteorg_paste | TestResponse | public | 0 | 0 | __repr__ | def __repr__(self):body = self.bodybody = body.decode('utf8', 'xmlcharrefreplace')body = body[:20]return '<Response %s %r>' % (self.full_status, body) | 1 | 5 | 1 | 37 | 0 | 859 | 863 | 859 | self | [] | Returns | {"Assign": 3, "Return": 1} | 1 | 5 | 1 | ["body.decode"] | 29 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3659669_pyopenapi_pyswagger.pyswagger.tests.v1_2.test_app_py.AppTestCase.test_ref", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3696868_turbogears_ming.ming.schema_py.Array.__repr__", "_.content.gdrive.MyDrive.Phd... | The function (__repr__) defined within the public class called TestResponse.The function start at line 859 and ends at 863. It contains 5 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 declare 1.0 function, It has 1.0 function calle... |
pasteorg_paste | TestResponse | public | 0 | 0 | __str__ | def __str__(self):simple_body = b'\n'.join([l for l in self.body.splitlines() if l.strip()])simple_body = simple_body.decode('utf8', 'xmlcharrefreplace')return 'Response: %s\n%s\n%s' % (self.status,'\n'.join(['%s: %s' % (n, v) for n, v in self.headers]),simple_body) | 4 | 8 | 1 | 75 | 0 | 865 | 872 | 865 | self | [] | Returns | {"Assign": 2, "Return": 1} | 5 | 8 | 5 | ["join", "self.body.splitlines", "l.strip", "simple_body.decode", "join"] | 64 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.models.ipam_py.Vlans.__str__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3609375_dyninc_dyn_python.dyn.tm.session_py.DynectSession.__str__", "_.content.gdrive.MyDrive.... | The function (__str__) defined within the public class called TestResponse.The function start at line 865 and ends at 872. It contains 8 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters, and this function return a value. It declares 5.0 functions, It has 5.0 functions cal... |
pasteorg_paste | TestResponse | public | 0 | 0 | showbrowser | def showbrowser(self):"""Show this response in a browser window (for debugging purposes,when it's hard to read the HTML)."""import webbrowserfn = tempnam_no_warning(None, 'paste-fixture') + '.html'f = open(fn, 'wb')f.write(self.body)f.close()url = 'file:' + fn.replace(os.sep, '/')webbrowser.open_new(url) | 1 | 8 | 1 | 59 | 0 | 874 | 885 | 874 | self | [] | None | {"Assign": 3, "Expr": 4} | 6 | 12 | 6 | ["tempnam_no_warning", "open", "f.write", "f.close", "fn.replace", "webbrowser.open_new"] | 0 | [] | The function (showbrowser) defined within the public class called TestResponse.The function start at line 874 and ends at 885. 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 functions, and It has 6.0 function... |
pasteorg_paste | Dummy_smtplib | public | 0 | 0 | __init__ | def __init__(self, url, environ, expect_errors=False):if url.startswith('http://localhost'):url = url[len('http://localhost'):]self.url = urlself.environ = environif environ.get('QUERY_STRING'):self.full_url = url + '?' + environ['QUERY_STRING']else:self.full_url = urlself.expect_errors = expect_errors | 3 | 10 | 4 | 73 | 0 | 913 | 922 | 913 | self,server | [] | None | {"Assign": 3, "Expr": 1} | 1 | 11 | 1 | ["warnings.warn"] | 6,814 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.Autotools.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.CMake.__init__", "_.content.... | The function (__init__) defined within the public class called Dummy_smtplib.The function start at line 913 and ends at 922. It contains 10 lines of code and it has a cyclomatic complexity of 3. It takes 4 parameters, represented as [913.0] and does not return any value. It declare 1.0 function, It has 1.0 function cal... |
pasteorg_paste | Dummy_smtplib | public | 0 | 0 | __init__ | def __init__(self, response, text):self.response = responseself.text = textself._parse_fields()self._parse_action() | 1 | 5 | 3 | 29 | 0 | 954 | 958 | 954 | self,server | [] | None | {"Assign": 3, "Expr": 1} | 1 | 11 | 1 | ["warnings.warn"] | 6,814 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.Autotools.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.CMake.__init__", "_.content.... | The function (__init__) defined within the public class called Dummy_smtplib.The function start at line 954 and ends at 958. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [954.0] and does not return any value. It declare 1.0 function, It has 1.0 function call... |
pasteorg_paste | Form | public | 0 | 0 | _parse_fields | def _parse_fields(self):in_select = Nonein_textarea = Nonefields = {}text = self.textfor match in self._tag_re.finditer(text):end = match.group(1) == b'/'tag = match.group(2).lower()if tag not in ('input', 'select', 'option', 'textarea', 'button'):continueif tag == 'select' and end:assert in_select, ('%r without starti... | 16 | 61 | 1 | 426 | 0 | 960 | 1,020 | 960 | self | [] | None | {"Assign": 22, "Expr": 4, "For": 1, "If": 11} | 32 | 61 | 32 | ["self._tag_re.finditer", "match.group", "lower", "match.group", "match.group", "match.start", "html_unquote", "match.start", "_parse_attrs", "match.group", "attrs.pop", "in_select.options.append", "attrs.get", "attrs.get", "fields.get", "Radio", "match.start", "append", "fields.setdefault", "isinstance", "field.option... | 0 | [] | The function (_parse_fields) defined within the public class called Form.The function start at line 960 and ends at 1020. It contains 61 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 32.0 functions, and It has 32.0 functions... |
pasteorg_paste | Form | public | 0 | 0 | _parse_action | def _parse_action(self):self.action = Nonetext = self.textfor match in self._tag_re.finditer(text):end = match.group(1) == '/'tag = match.group(2).lower()if tag != 'form':continueif end:breakattrs = _parse_attrs(match.group(3))self.action = attrs.get('action', '')self.method = attrs.get('method', 'GET')self.id = attrs.... | 4 | 18 | 1 | 121 | 0 | 1,022 | 1,040 | 1,022 | self | [] | None | {"Assign": 8, "For": 1, "If": 2} | 9 | 19 | 9 | ["self._tag_re.finditer", "match.group", "lower", "match.group", "_parse_attrs", "match.group", "attrs.get", "attrs.get", "attrs.get"] | 0 | [] | The function (_parse_action) defined within the public class called Form.The function start at line 1022 and ends at 1040. It contains 18 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 9.0 functions, and It has 9.0 functions c... |
pasteorg_paste | Form | public | 0 | 0 | __setitem__ | def __setitem__(self, name, value):"""Set the value of the named field.If there is 0 or multiplefields by that name, it is an error.Setting the value of a ``<select>`` selects the given option(and confirms it is an option).Setting radio fields does thesame.Checkboxes get boolean values.You cannot set hiddenfields or bu... | 1 | 9 | 3 | 86 | 0 | 1,042 | 1,062 | 1,042 | self,name,value | [] | None | {"Assign": 2, "Expr": 1} | 7 | 21 | 7 | ["self.fields.get", "join", "map", "self.fields.keys", "len", "join", "map"] | 33 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3609375_dyninc_dyn_python.dyn.mm.utils_py.APIDict.__setitem__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3621460_cos_archives_modular_odm.modularodm.fields.lists_py.BaseForeignList.__setitem__", "_.content.gdri... | The function (__setitem__) defined within the public class called Form.The function start at line 1042 and ends at 1062. It contains 9 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [1042.0] and does not return any value. It declares 7.0 functions, It has 7.0 functions call... |
pasteorg_paste | Form | public | 0 | 0 | __getitem__ | def __getitem__(self, name):"""Get the named field object (ambiguity is an error)."""fields = self.fields.get(name)assert fields is not None, ("No field by the name %r found" % name)assert len(fields) == 1, ("Multiple fields match %r: %s"% (name, ', '.join(map(repr, fields))))return fields[0] | 1 | 8 | 2 | 61 | 0 | 1,064 | 1,074 | 1,064 | self,name | [] | Returns | {"Assign": 1, "Expr": 1, "Return": 1} | 4 | 11 | 4 | ["self.fields.get", "len", "join", "map"] | 28 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3621460_cos_archives_modular_odm.modularodm.fields.lists_py.AbstractForeignList.__getitem__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3621460_cos_archives_modular_odm.modularodm.fields.lists_py.ForeignList.__g... | The function (__getitem__) defined within the public class called Form.The function start at line 1064 and ends at 1074. It contains 8 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [1064.0], and this function return a value. It declares 4.0 functions, It has 4.0 functions ... |
pasteorg_paste | Form | public | 0 | 0 | set | def set(self, name, value, index=None):"""Set the given name, using ``index`` to disambiguate."""if index is None:self[name] = valueelse:fields = self.fields.get(name)assert fields is not None, ("No fields found matching %r" % name)field = fields[index]field.value = value | 2 | 9 | 4 | 59 | 0 | 1,076 | 1,087 | 1,076 | self,name,value,index | [] | None | {"Assign": 4, "Expr": 1, "If": 1} | 1 | 12 | 1 | ["self.fields.get"] | 4,532 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.build_dep_tree", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15217004_shayypy_guilded_py.guilded.channel_py.DMChannel.__init__", "_.content.gdrive.MyDriv... | The function (set) defined within the public class called Form.The function start at line 1076 and ends at 1087. It contains 9 lines of code and it has a cyclomatic complexity of 2. It takes 4 parameters, represented as [1076.0] and does not return any value. It declare 1.0 function, It has 1.0 function called inside w... |
pasteorg_paste | TestApp | public | 0 | 0 | get | def get(self, name, index=None, default=NO_DEFAULT):"""Get the named/indexed field object, or ``default`` if no fieldis found."""fields = self.fields.get(name)if fields is None and default is not NO_DEFAULT:return defaultif index is None:return self[name]else:fields = self.fields.get(name)assert fields is not None, ("N... | 4 | 12 | 4 | 79 | 0 | 1,089 | 1,104 | 1,089 | self,url,params,headers,extra_environ,status,expect_errors | [] | Returns | {"Assign": 8, "AugAssign": 3, "Expr": 3, "If": 5, "Return": 1} | 9 | 53 | 9 | ["isinstance", "urlencode", "self._make_environ", "str", "url.split", "self._set_headers", "environ.update", "TestRequest", "self.do_request"] | 2,985 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.Meson.dependencies", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15217004_shayypy_guilded_py.guilded.abc_py.User.__init__", "_.content.gdrive.MyDrive.Phd... | The function (get) defined within the public class called TestApp.The function start at line 1089 and ends at 1104. It contains 12 lines of code and it has a cyclomatic complexity of 4. It takes 4 parameters, represented as [1089.0], and this function return a value. It declares 9.0 functions, It has 9.0 functions call... |
pasteorg_paste | Form | public | 0 | 0 | select | def select(self, name, value, index=None):"""Like ``.set()``, except also confirms the target is a``<select>``."""field = self.get(name, index=index)assert isinstance(field, Select)field.value = value | 1 | 4 | 4 | 38 | 0 | 1,106 | 1,113 | 1,106 | self,name,value,index | [] | None | {"Assign": 2, "Expr": 1} | 2 | 8 | 2 | ["self.get", "isinstance"] | 886 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3470342_bitprophet_ssh.ssh.agent_py.AgentProxyThread._communicate", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3677152_ckan_ckanext_showcase.ckanext.showcase.tests.test_plugin_py.TestDatasetView.test_dataset_show... | The function (select) defined within the public class called Form.The function start at line 1106 and ends at 1113. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [1106.0] and does not return any value. It declares 2.0 functions, It has 2.0 functions called in... |
pasteorg_paste | Form | public | 0 | 0 | submit | def submit(self, name=None, index=None, **args):"""Submits the form.If ``name`` is given, then also select thatbutton (using ``index`` to disambiguate)``.Any extra keyword arguments are passed to the ``.get()`` or``.post()`` method.Returns a response object."""fields = self.submit_fields(name, index=index)return self.r... | 1 | 4 | 4 | 53 | 0 | 1,115 | 1,127 | 1,115 | self,name,index,**args | [] | Returns | {"Assign": 1, "Expr": 1, "Return": 1} | 2 | 13 | 2 | ["self.submit_fields", "self.response.goto"] | 4 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3957766_benchopt_benchopt.benchopt.utils.slurm_executor_py.run_on_slurm", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3958607_irods_python_irodsclient.irods.test.data_obj_test_py.TestDataObjOps.test_temporary_xml_... | The function (submit) defined within the public class called Form.The function start at line 1115 and ends at 1127. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [1115.0], and this function return a value. It declares 2.0 functions, It has 2.0 functions calle... |
pasteorg_paste | Form | public | 0 | 0 | submit_fields | def submit_fields(self, name=None, index=None):"""Return a list of ``[(name, value), ...]`` for the currentstate of the form."""submit = []if name is not None:field = self.get(name, index=index)submit.append((field.name, field.value_if_submitted()))for name, fields in self.fields.items():if name is None:continuefor fie... | 6 | 14 | 3 | 99 | 0 | 1,129 | 1,146 | 1,129 | self,name,index | [] | Returns | {"Assign": 3, "Expr": 3, "For": 2, "If": 3, "Return": 1} | 5 | 18 | 5 | ["self.get", "submit.append", "field.value_if_submitted", "self.fields.items", "submit.append"] | 0 | [] | The function (submit_fields) defined within the public class called Form.The function start at line 1129 and ends at 1146. It contains 14 lines of code and it has a cyclomatic complexity of 6. It takes 3 parameters, represented as [1129.0], and this function return a value. It declares 5.0 functions, and It has 5.0 fu... |
pasteorg_paste | public | public | 0 | 0 | _parse_attrs | def _parse_attrs(text):attrs = {}for match in _attr_re.finditer(text):attr_name = match.group(1).lower()attr_body = match.group(2) or match.group(3)attr_body = html_unquote(attr_body or '')attrs[attr_name] = attr_bodyreturn attrs | 4 | 8 | 1 | 62 | 3 | 1,151 | 1,158 | 1,151 | text | ['attr_body', 'attrs', 'attr_name'] | Returns | {"Assign": 5, "For": 1, "Return": 1} | 6 | 8 | 6 | ["_attr_re.finditer", "lower", "match.group", "match.group", "match.group", "html_unquote"] | 3 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.paste.fixture_py.Form._parse_action", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.paste.fixture_py.Form._parse_fields", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_... | The function (_parse_attrs) defined within the public class called public.The function start at line 1151 and ends at 1158. It contains 8 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters, and this function return a value. It declares 6.0 functions, It has 6.0 functions ca... |
pasteorg_paste | Dummy_smtplib | public | 0 | 0 | __init__ | def __init__(self, form, tag, name, pos, value=None, id=None, **attrs):self.form = formself.tag = tagself.name = nameself.pos = posself._value = valueself.id = idself.attrs = attrs | 1 | 9 | 8 | 59 | 0 | 1,171 | 1,179 | 1,171 | self,server | [] | None | {"Assign": 3, "Expr": 1} | 1 | 11 | 1 | ["warnings.warn"] | 6,814 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.Autotools.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.CMake.__init__", "_.content.... | The function (__init__) defined within the public class called Dummy_smtplib.The function start at line 1171 and ends at 1179. It contains 9 lines of code and it has a cyclomatic complexity of 1. It takes 8 parameters, represented as [1171.0] and does not return any value. It declare 1.0 function, It has 1.0 function c... |
pasteorg_paste | Field | public | 0 | 0 | value__set | def value__set(self, value):if not self.settable:raise AttributeError("You cannot set the value of the <%s> field %r"% (self.tag, self.name))self._value = value | 2 | 6 | 2 | 33 | 0 | 1,181 | 1,186 | 1,181 | self,value | [] | None | {"Assign": 1, "If": 1} | 1 | 6 | 1 | ["AttributeError"] | 0 | [] | The function (value__set) defined within the public class called Field.The function start at line 1181 and ends at 1186. It contains 6 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [1181.0] and does not return any value. It declare 1.0 function, and It has 1.0 function ca... |
pasteorg_paste | Field | public | 0 | 0 | force_value | def force_value(self, value):"""Like setting a value, except forces it even for, say, hiddenfields."""self._value = value | 1 | 2 | 2 | 13 | 0 | 1,188 | 1,193 | 1,188 | self,value | [] | None | {"Assign": 1, "Expr": 1} | 0 | 6 | 0 | [] | 0 | [] | The function (force_value) defined within the public class called Field.The function start at line 1188 and ends at 1193. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [1188.0] and does not return any value.. |
pasteorg_paste | Field | public | 0 | 0 | value__get | def value__get(self):return self._value | 1 | 2 | 1 | 9 | 0 | 1,195 | 1,196 | 1,195 | self | [] | Returns | {"Return": 1} | 0 | 2 | 0 | [] | 0 | [] | The function (value__get) defined within the public class called Field.The function start at line 1195 and ends at 1196. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value.. |
pasteorg_paste | Dummy_smtplib | public | 0 | 0 | __init__ | def __init__(self, *args, **attrs):super(Select, self).__init__(*args, **attrs)self.options = []self.multiple = attrs.get('multiple')assert not self.multiple, ("<select multiple> not yet supported")# Undetermined yet:self.selectedIndex = None | 1 | 7 | 3 | 56 | 0 | 1,206 | 1,213 | 1,206 | self,server | [] | None | {"Assign": 3, "Expr": 1} | 1 | 11 | 1 | ["warnings.warn"] | 6,814 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.Autotools.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.CMake.__init__", "_.content.... | The function (__init__) defined within the public class called Dummy_smtplib.The function start at line 1206 and ends at 1213. It contains 7 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [1206.0] and does not return any value. It declare 1.0 function, It has 1.0 function c... |
pasteorg_paste | Field | public | 0 | 0 | value__set | def value__set(self, value):for i, (option, checked) in enumerate(self.options):if option == str(value):self.selectedIndex = ibreakelse:raise ValueError("Option %r not found (from %s)"% (value, ', '.join([repr(o) for o, c in self.options]))) | 4 | 10 | 2 | 68 | 0 | 1,215 | 1,224 | 1,215 | self,value | [] | None | {"Assign": 1, "If": 1} | 1 | 6 | 1 | ["AttributeError"] | 0 | [] | The function (value__set) defined within the public class called Field.The function start at line 1215 and ends at 1224. It contains 10 lines of code and it has a cyclomatic complexity of 4. It takes 2 parameters, represented as [1215.0] and does not return any value. It declare 1.0 function, and It has 1.0 function c... |
pasteorg_paste | Field | public | 0 | 0 | value__get | def value__get(self):if self.selectedIndex is not None:return self.options[self.selectedIndex][0]else:for option, checked in self.options:if checked:return optionelse:if self.options:return self.options[0][0]else:return None | 5 | 12 | 1 | 62 | 0 | 1,226 | 1,237 | 1,226 | self | [] | Returns | {"Return": 1} | 0 | 2 | 0 | [] | 0 | [] | The function (value__get) defined within the public class called Field.The function start at line 1226 and ends at 1237. It contains 12 lines of code and it has a cyclomatic complexity of 5. The function does not take any parameters, and this function return a value.. |
pasteorg_paste | Dummy_smtplib | public | 0 | 0 | __init__ | def __init__(self, *args, **attrs):super(Checkbox, self).__init__(*args, **attrs)self.checked = 'checked' in attrs | 1 | 3 | 3 | 33 | 0 | 1,257 | 1,259 | 1,257 | self,server | [] | None | {"Assign": 3, "Expr": 1} | 1 | 11 | 1 | ["warnings.warn"] | 6,814 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.Autotools.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.CMake.__init__", "_.content.... | The function (__init__) defined within the public class called Dummy_smtplib.The function start at line 1257 and ends at 1259. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [1257.0] and does not return any value. It declare 1.0 function, It has 1.0 function c... |
pasteorg_paste | Field | public | 0 | 0 | value__set | def value__set(self, value):self.checked = not not value | 1 | 2 | 2 | 14 | 0 | 1,261 | 1,262 | 1,261 | self,value | [] | None | {"Assign": 1, "If": 1} | 1 | 6 | 1 | ["AttributeError"] | 0 | [] | The function (value__set) defined within the public class called Field.The function start at line 1261 and ends at 1262. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [1261.0] and does not return any value. It declare 1.0 function, and It has 1.0 function ca... |
pasteorg_paste | Field | public | 0 | 0 | value__get | def value__get(self):if self.checked:if self._value is None:return 'on'else:return self._valueelse:return None | 3 | 8 | 1 | 29 | 0 | 1,264 | 1,271 | 1,264 | self | [] | Returns | {"Return": 1} | 0 | 2 | 0 | [] | 0 | [] | The function (value__get) defined within the public class called Field.The function start at line 1264 and ends at 1271. It contains 8 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters, and this function return a value.. |
pasteorg_paste | Dummy_smtplib | public | 0 | 0 | __init__ | def __init__(self, form, tag, name, pos, value='', id=None, **attrs):#text fields default to empty stringField.__init__(self, form, tag, name, pos, value=value, id=id, **attrs) | 1 | 4 | 8 | 49 | 0 | 1,281 | 1,285 | 1,281 | self,server | [] | None | {"Assign": 3, "Expr": 1} | 1 | 11 | 1 | ["warnings.warn"] | 6,814 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.Autotools.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.CMake.__init__", "_.content.... | The function (__init__) defined within the public class called Dummy_smtplib.The function start at line 1281 and ends at 1285. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 8 parameters, represented as [1281.0] and does not return any value. It declare 1.0 function, It has 1.0 function c... |
pasteorg_paste | Field | public | 0 | 0 | value__get | def value__get(self):return None | 1 | 2 | 1 | 7 | 0 | 1,310 | 1,311 | 1,310 | self | [] | Returns | {"Return": 1} | 0 | 2 | 0 | [] | 0 | [] | The function (value__get) defined within the public class called Field.The function start at line 1310 and ends at 1311. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value.. |
pasteorg_paste | Submit | public | 0 | 1 | value_if_submitted | def value_if_submitted(self):return self._value | 1 | 2 | 1 | 9 | 0 | 1,315 | 1,316 | 1,315 | self | [] | Returns | {"Return": 1} | 0 | 2 | 0 | [] | 0 | [] | The function (value_if_submitted) defined within the public class called Submit, that inherit another class.The function start at line 1315 and ends at 1316. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value.. |
pasteorg_paste | Dummy_smtplib | public | 0 | 0 | __init__ | def __init__(self, base_path, template_path=None, script_path=None, environ=None, cwd=None, start_clear=True, ignore_paths=None, ignore_hidden=True):"""Creates an environment.``base_path`` is used as the currentworking directory, and generally where changes are looked for.``template_path`` is the directory to look for ... | 8 | 24 | 9 | 165 | 0 | 1,338 | 1,386 | 1,338 | self,server | [] | None | {"Assign": 3, "Expr": 1} | 1 | 11 | 1 | ["warnings.warn"] | 6,814 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.Autotools.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.CMake.__init__", "_.content.... | The function (__init__) defined within the public class called Dummy_smtplib.The function start at line 1338 and ends at 1386. It contains 24 lines of code and it has a cyclomatic complexity of 8. It takes 9 parameters, represented as [1338.0] and does not return any value. It declare 1.0 function, It has 1.0 function ... |
pasteorg_paste | TestFileEnvironment | public | 0 | 0 | run | def run(self, script, *args, **kw):"""Run the command, with the given arguments.The ``script``argument can have space-separated arguments, or you can usethe positional arguments.Keywords allowed are:``expect_error``: (default False)Don't raise an exception in case of errors``expect_stderr``: (default ``expect_error``)D... | 5 | 39 | 4 | 273 | 0 | 1,388 | 1,447 | 1,388 | self,script,*args,**kw | [] | Returns | {"Assign": 16, "Expr": 5, "If": 4, "Return": 1} | 21 | 60 | 21 | ["_popget", "_popget", "_popget", "_popget", "_popget", "list", "map", "join", "kw.keys", "script.split", "shlex.split", "self._find_exe", "self._find_files", "subprocess.Popen", "proc.communicate", "self._find_files", "ProcResult", "print", "print", "result.assert_no_error", "result.assert_no_stderr"] | 506 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3514474_ntfreedom_neverendshadowsocks.shadowsocks.manager_py.run", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3535523_dbcli_vcli.tests.test_vexecute_py.test_bools_are_treated_as_strings", "_.content.gdrive.MyDriv... | The function (run) defined within the public class called TestFileEnvironment.The function start at line 1388 and ends at 1447. It contains 39 lines of code and it has a cyclomatic complexity of 5. It takes 4 parameters, represented as [1388.0], and this function return a value. It declares 21.0 functions, It has 21.0 ... |
pasteorg_paste | TestFileEnvironment | public | 0 | 0 | _find_exe | def _find_exe(self, script_name):if self.script_path is None:script_name = os.path.join(self.cwd, script_name)if not os.path.exists(script_name):raise OSError("Script %s does not exist" % script_name)return script_namefor path in self.script_path:fn = os.path.join(path, script_name)if os.path.exists(fn):return fnraise ... | 5 | 14 | 2 | 97 | 0 | 1,449 | 1,462 | 1,449 | self,script_name | [] | Returns | {"Assign": 2, "For": 1, "If": 3, "Return": 2} | 7 | 14 | 7 | ["os.path.join", "os.path.exists", "OSError", "os.path.join", "os.path.exists", "OSError", "join"] | 0 | [] | The function (_find_exe) defined within the public class called TestFileEnvironment.The function start at line 1449 and ends at 1462. It contains 14 lines of code and it has a cyclomatic complexity of 5. It takes 2 parameters, represented as [1449.0], and this function return a value. It declares 7.0 functions, and It... |
pasteorg_paste | TestFileEnvironment | public | 0 | 0 | _find_files | def _find_files(self):result = {}for fn in os.listdir(self.base_path):if self._ignore_file(fn):continueself._find_traverse(fn, result)return result | 3 | 7 | 1 | 40 | 0 | 1,464 | 1,470 | 1,464 | self | [] | Returns | {"Assign": 1, "Expr": 1, "For": 1, "If": 1, "Return": 1} | 3 | 7 | 3 | ["os.listdir", "self._ignore_file", "self._find_traverse"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3675202_galaxyproject_galaxy_lib.galaxy.tools.loader_directory_py._find_tool_files"] | The function (_find_files) defined within the public class called TestFileEnvironment.The function start at line 1464 and ends at 1470. It contains 7 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 3.0 functions, It has 3.0 ... |
pasteorg_paste | TestFileEnvironment | public | 0 | 0 | _ignore_file | def _ignore_file(self, fn):if fn in self.ignore_paths:return Trueif self.ignore_hidden and os.path.basename(fn).startswith('.'):return Truereturn False | 4 | 6 | 2 | 39 | 0 | 1,472 | 1,477 | 1,472 | self,fn | [] | Returns | {"If": 2, "Return": 3} | 2 | 6 | 2 | ["startswith", "os.path.basename"] | 0 | [] | The function (_ignore_file) defined within the public class called TestFileEnvironment.The function start at line 1472 and ends at 1477. It contains 6 lines of code and it has a cyclomatic complexity of 4. It takes 2 parameters, represented as [1472.0], and this function return a value. It declares 2.0 functions, and ... |
pasteorg_paste | TestFileEnvironment | public | 0 | 0 | _find_traverse | def _find_traverse(self, path, result):full = os.path.join(self.base_path, path)if os.path.isdir(full):result[path] = FoundDir(self.base_path, path)for fn in os.listdir(full):fn = os.path.join(path, fn)if self._ignore_file(fn):continueself._find_traverse(fn, result)else:result[path] = FoundFile(self.base_path, path) | 4 | 11 | 3 | 100 | 0 | 1,479 | 1,489 | 1,479 | self,path,result | [] | None | {"Assign": 4, "Expr": 1, "For": 1, "If": 2} | 8 | 11 | 8 | ["os.path.join", "os.path.isdir", "FoundDir", "os.listdir", "os.path.join", "self._ignore_file", "self._find_traverse", "FoundFile"] | 0 | [] | The function (_find_traverse) defined within the public class called TestFileEnvironment.The function start at line 1479 and ends at 1489. It contains 11 lines of code and it has a cyclomatic complexity of 4. It takes 3 parameters, represented as [1479.0] and does not return any value. It declares 8.0 functions, and I... |
pasteorg_paste | TestFileEnvironment | public | 0 | 0 | clear | def clear(self):"""Delete all the files in the base directory."""if os.path.exists(self.base_path):shutil.rmtree(self.base_path)os.mkdir(self.base_path) | 2 | 4 | 1 | 34 | 0 | 1,491 | 1,497 | 1,491 | self | [] | None | {"Expr": 3, "If": 1} | 3 | 7 | 3 | ["os.path.exists", "shutil.rmtree", "os.mkdir"] | 54 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3567333_spadgos_sublime_jsdocs.jsdocs_py.JsdocsWrapLines.run", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3567333_spadgos_sublime_jsdocs.test_runner_py.ViewTestCase.tearDown", "_.content.gdrive.MyDrive.Phd_Thesis... | The function (clear) defined within the public class called TestFileEnvironment.The function start at line 1491 and ends at 1497. It contains 4 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, It has 3.0 functions ... |
pasteorg_paste | TestFileEnvironment | public | 0 | 0 | writefile | def writefile(self, path, content=None,frompath=None):"""Write a file to the given path.If ``content`` is given thenthat text is written, otherwise the file in ``frompath`` isused.``frompath`` is relative to ``self.template_path``"""full = os.path.join(self.base_path, path)if not os.path.exists(os.path.dirname(full)):o... | 5 | 16 | 4 | 143 | 0 | 1,499 | 1,519 | 1,499 | self,path,content,frompath | [] | Returns | {"Assign": 4, "Expr": 6, "If": 4, "Return": 1} | 14 | 21 | 14 | ["os.path.join", "os.path.exists", "os.path.dirname", "os.makedirs", "os.path.dirname", "open", "f.write", "os.path.join", "open", "f.write", "f2.read", "f2.close", "f.close", "FoundFile"] | 0 | [] | The function (writefile) defined within the public class called TestFileEnvironment.The function start at line 1499 and ends at 1519. It contains 16 lines of code and it has a cyclomatic complexity of 5. It takes 4 parameters, represented as [1499.0], and this function return a value. It declares 14.0 functions, and I... |
pasteorg_paste | Dummy_smtplib | public | 0 | 0 | __init__ | def __init__(self, test_env, args, stdin, stdout, stderr, returncode, files_before, files_after):self.test_env = test_envself.args = argsself.stdin = stdinself.stdout = stdoutself.stderr = stderrself.returncode = returncodeself.files_before = files_beforeself.files_after = files_afterself.files_deleted = {}self.files_u... | 4 | 20 | 9 | 138 | 0 | 1,539 | 1,558 | 1,539 | self,server | [] | None | {"Assign": 3, "Expr": 1} | 1 | 11 | 1 | ["warnings.warn"] | 6,814 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.Autotools.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.CMake.__init__", "_.content.... | The function (__init__) defined within the public class called Dummy_smtplib.The function start at line 1539 and ends at 1558. It contains 20 lines of code and it has a cyclomatic complexity of 4. It takes 9 parameters, represented as [1539.0] and does not return any value. It declare 1.0 function, It has 1.0 function ... |
pasteorg_paste | ProcResult | public | 0 | 0 | assert_no_error | def assert_no_error(self):__tracebackhide__ = Trueassert self.returncode == 0, ("Script returned code: %s" % self.returncode) | 1 | 4 | 1 | 22 | 0 | 1,560 | 1,563 | 1,560 | self | [] | None | {"Assign": 1} | 0 | 4 | 0 | [] | 0 | [] | The function (assert_no_error) defined within the public class called ProcResult.The function start at line 1560 and ends at 1563. 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.. |
pasteorg_paste | ProcResult | public | 0 | 0 | assert_no_stderr | def assert_no_stderr(self):__tracebackhide__ = Trueif self.stderr:print('Error output:')print(self.stderr)raise AssertionError("stderr output not expected") | 2 | 6 | 1 | 28 | 0 | 1,565 | 1,570 | 1,565 | self | [] | None | {"Assign": 1, "Expr": 2, "If": 1} | 3 | 6 | 3 | ["print", "print", "AssertionError"] | 0 | [] | The function (assert_no_stderr) defined within the public class called ProcResult.The function start at line 1565 and ends at 1570. 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. It declares 3.0 functions, and It has 3.0 fun... |
pasteorg_paste | TestResponse | public | 0 | 0 | __str__ | def __str__(self):s = ['Script result: %s' % ' '.join(self.args)]if self.returncode:s.append('return code: %s' % self.returncode)if self.stderr:s.append('-- stderr: --------------------')s.append(self.stderr)if self.stdout:s.append('-- stdout: --------------------')s.append(self.stdout)for name, files, show_size in [('... | 9 | 27 | 1 | 194 | 0 | 1,572 | 1,598 | 1,572 | self | [] | Returns | {"Assign": 2, "Return": 1} | 5 | 8 | 5 | ["join", "self.body.splitlines", "l.strip", "simple_body.decode", "join"] | 64 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.models.ipam_py.Vlans.__str__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3609375_dyninc_dyn_python.dyn.tm.session_py.DynectSession.__str__", "_.content.gdrive.MyDrive.... | The function (__str__) defined within the public class called TestResponse.The function start at line 1572 and ends at 1598. It contains 27 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 5.0 functions, It has 5.0 functions ... |
pasteorg_paste | Dummy_smtplib | public | 0 | 0 | __init__ | def __init__(self, base_path, path):self.base_path = base_pathself.path = pathself.full = os.path.join(base_path, path)self.stat = os.stat(self.full)self.mtime = self.stat.st_mtimeself.size = self.stat.st_sizeself._bytes = None | 1 | 8 | 3 | 68 | 0 | 1,627 | 1,634 | 1,627 | self,server | [] | None | {"Assign": 3, "Expr": 1} | 1 | 11 | 1 | ["warnings.warn"] | 6,814 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.Autotools.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.CMake.__init__", "_.content.... | The function (__init__) defined within the public class called Dummy_smtplib.The function start at line 1627 and ends at 1634. It contains 8 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [1627.0] and does not return any value. It declare 1.0 function, It has 1.0 function c... |
pasteorg_paste | FoundFile | public | 0 | 0 | bytes__get | def bytes__get(self):if self._bytes is None:f = open(self.full, 'rb')self._bytes = f.read()f.close()return self._bytes | 2 | 6 | 1 | 40 | 0 | 1,636 | 1,641 | 1,636 | self | [] | Returns | {"Assign": 2, "Expr": 1, "If": 1, "Return": 1} | 3 | 6 | 3 | ["open", "f.read", "f.close"] | 0 | [] | The function (bytes__get) defined within the public class called FoundFile.The function start at line 1636 and ends at 1641. 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 3.0 functions, and It has 3.0 functi... |
pasteorg_paste | TestResponse | public | 0 | 0 | __contains__ | def __contains__(self, s):return s in self.bytes | 1 | 2 | 2 | 13 | 0 | 1,644 | 1,645 | 1,644 | self,s | [] | Returns | {"Assign": 2, "Expr": 1, "If": 2, "Return": 1} | 6 | 13 | 6 | ["isinstance", "str", "isinstance", "s.encode", "self.body.find", "self.normal_body.find"] | 10 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3627162_cinpla_exdir.exdir.core.exdir_file_py.File.__contains__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3692721_yelp_bravado_core.bravado_core.util_py.AliasKeyDict.__contains__", "_.content.gdrive.MyDrive.Ph... | The function (__contains__) defined within the public class called TestResponse.The function start at line 1644 and ends at 1645. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [1644.0], and this function return a value. It declares 6.0 functions, It has 6.0 f... |
pasteorg_paste | TestResponse | public | 0 | 0 | mustcontain | def mustcontain(self, s):__tracebackhide__ = Truebytes_ = self.bytesif s not in bytes_:print('Could not find %r in:' % s)print(bytes_)assert s in bytes_ | 2 | 7 | 2 | 35 | 0 | 1,647 | 1,653 | 1,647 | self,*strings,**kw | [] | None | {"Assign": 3, "Expr": 5, "For": 2, "If": 5} | 8 | 31 | 8 | ["isinstance", "TypeError", "print", "print", "IndexError", "print", "print", "IndexError"] | 0 | [] | The function (mustcontain) defined within the public class called TestResponse.The function start at line 1647 and ends at 1653. It contains 7 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [1647.0] and does not return any value. It declares 8.0 functions, and It has 8.0 f... |
pasteorg_paste | TestResponse | public | 0 | 0 | __repr__ | def __repr__(self):return '<%s %s:%s>' % (self.__class__.__name__,self.base_path, self.path) | 1 | 4 | 1 | 23 | 0 | 1,655 | 1,658 | 1,655 | self | [] | Returns | {"Assign": 3, "Return": 1} | 1 | 5 | 1 | ["body.decode"] | 29 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3659669_pyopenapi_pyswagger.pyswagger.tests.v1_2.test_app_py.AppTestCase.test_ref", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3696868_turbogears_ming.ming.schema_py.Array.__repr__", "_.content.gdrive.MyDrive.Phd... | The function (__repr__) defined within the public class called TestResponse.The function start at line 1655 and ends at 1658. It contains 4 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 declare 1.0 function, It has 1.0 function cal... |
pasteorg_paste | Dummy_smtplib | public | 0 | 0 | __init__ | def __init__(self, base_path, path):self.base_path = base_pathself.path = pathself.full = os.path.join(base_path, path)self.size = 'N/A'self.mtime = 'N/A' | 1 | 6 | 3 | 43 | 0 | 1,669 | 1,674 | 1,669 | self,server | [] | None | {"Assign": 3, "Expr": 1} | 1 | 11 | 1 | ["warnings.warn"] | 6,814 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.Autotools.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.CMake.__init__", "_.content.... | The function (__init__) defined within the public class called Dummy_smtplib.The function start at line 1669 and ends at 1674. It contains 6 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [1669.0] and does not return any value. It declare 1.0 function, It has 1.0 function c... |
pasteorg_paste | TestResponse | public | 0 | 0 | __repr__ | def __repr__(self):return '<%s %s:%s>' % (self.__class__.__name__,self.base_path, self.path) | 1 | 4 | 1 | 23 | 0 | 1,676 | 1,679 | 1,655 | self | [] | Returns | {"Assign": 3, "Return": 1} | 1 | 5 | 1 | ["body.decode"] | 29 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3659669_pyopenapi_pyswagger.pyswagger.tests.v1_2.test_app_py.AppTestCase.test_ref", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3696868_turbogears_ming.ming.schema_py.Array.__repr__", "_.content.gdrive.MyDrive.Phd... | The function (__repr__) defined within the public class called TestResponse.The function start at line 1676 and ends at 1679. It contains 4 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 declare 1.0 function, It has 1.0 function cal... |
pasteorg_paste | public | public | 0 | 0 | _popget | def _popget(d, key, default=None):"""Pop the key if found (else return default)"""if key in d:return d.pop(key)return default | 2 | 4 | 3 | 26 | 0 | 1,681 | 1,687 | 1,681 | d,key,default | [] | Returns | {"Expr": 1, "If": 1, "Return": 2} | 1 | 7 | 1 | ["d.pop"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.paste.fixture_py.TestFileEnvironment.run"] | The function (_popget) defined within the public class called public.The function start at line 1681 and ends at 1687. It contains 4 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [1681.0], and this function return a value. It declare 1.0 function, It has 1.0 function calle... |
pasteorg_paste | public | public | 0 | 0 | _space_prefix | def _space_prefix(pref, full, sep=None, indent=None, include_sep=True):"""Anything shared by pref and full will be replaced with spacesin full, and full returned."""if sep is None:sep = os.path.seppref = pref.split(sep)full = full.split(sep)padding = []while pref and full and pref[0] == full[0]:if indent is None:paddin... | 8 | 20 | 5 | 162 | 4 | 1,689 | 1,712 | 1,689 | pref,full,sep,indent,include_sep | ['padding', 'full', 'sep', 'pref'] | Returns | {"Assign": 4, "Expr": 5, "If": 4, "Return": 3, "While": 1} | 13 | 24 | 13 | ["pref.split", "full.split", "padding.append", "len", "len", "padding.append", "full.pop", "pref.pop", "join", "sep.join", "join", "sep.join", "sep.join"] | 3 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.paste.debug.fsdiff_py.Diff.report", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.paste.debug.fsdiff_py.report_expected_diffs", "_.content.gdrive.MyDrive.Phd_Thesis.Da... | The function (_space_prefix) defined within the public class called public.The function start at line 1689 and ends at 1712. It contains 20 lines of code and it has a cyclomatic complexity of 8. It takes 5 parameters, represented as [1689.0], and this function return a value. It declares 13.0 functions, It has 13.0 fun... |
pasteorg_paste | public | public | 0 | 0 | _make_pattern | def _make_pattern(pat):if pat is None:return Noneif isinstance(pat, (bytes, str)):pat = re.compile(pat)if hasattr(pat, 'search'):return pat.searchif callable(pat):return patassert 0, ("Cannot make callable pattern object out of %r" % pat) | 5 | 11 | 1 | 60 | 1 | 1,714 | 1,724 | 1,714 | pat | ['pat'] | Returns | {"Assign": 1, "If": 4, "Return": 3} | 4 | 11 | 4 | ["isinstance", "re.compile", "hasattr", "callable"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.paste.fixture_py.TestResponse._find_element"] | The function (_make_pattern) defined within the public class called public.The function start at line 1714 and ends at 1724. It contains 11 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 4.0 functions, It has 4.0 functions ... |
pasteorg_paste | public | public | 0 | 0 | setup_module | def setup_module(module=None):"""This is used by pytest if it is in the module, so you canimport this directly.Use like::from paste.fixture import setup_module"""# Deprecated June 2008import warningswarnings.warn('setup_module is deprecated',DeprecationWarning, 2)if module is None:# The module we were called from must ... | 4 | 11 | 1 | 72 | 1 | 1,727 | 1,747 | 1,727 | module | ['module'] | None | {"Assign": 2, "Expr": 3, "If": 3} | 5 | 21 | 5 | ["warnings.warn", "sys._getframe", "isinstance", "hasattr", "module.reset_state"] | 0 | [] | The function (setup_module) defined within the public class called public.The function start at line 1727 and ends at 1747. It contains 11 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 5.0 functions, and It has 5.0 functions ... |
pasteorg_paste | public | public | 0 | 0 | html_unquote | def html_unquote(v):"""Unquote (some) entities in HTML.(incomplete)"""for ent, repl in [(' ', ' '), ('>', '>'),('<', '<'), ('"', '"'),('&', '&')]:v = v.replace(ent, repl)return v | 2 | 6 | 1 | 55 | 1 | 1,749 | 1,757 | 1,749 | v | ['v'] | Returns | {"Assign": 1, "Expr": 1, "For": 1, "Return": 1} | 1 | 9 | 1 | ["v.replace"] | 3 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.paste.fixture_py.Form._parse_fields", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.paste.fixture_py._parse_attrs", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creati... | The function (html_unquote) defined within the public class called public.The function start at line 1749 and ends at 1757. 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 declare 1.0 function, It has 1.0 function calle... |
pasteorg_paste | SessionMiddleware | public | 0 | 0 | __init__ | def __init__(self, app, global_conf=None, session_type=NO_DEFAULT, cookie_name=NO_DEFAULT, **store_config ):self.application = appif session_type is NO_DEFAULT:session_type = global_conf.get('session_type', 'disk')self.session_type = session_typetry:self.store_class, self.store_args = self.session_classes[self.session_... | 5 | 25 | 6 | 159 | 0 | 45 | 69 | 45 | self,app,global_conf,session_type,cookie_name,**store_config | [] | None | {"Assign": 10, "For": 1, "If": 2, "Try": 1} | 8 | 25 | 8 | ["global_conf.get", "KeyError", "join", "self.session_classes.keys", "coercer", "store_config.get", "self.store_class", "global_conf.get"] | 6,814 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.Autotools.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.CMake.__init__", "_.content.... | The function (__init__) defined within the public class called SessionMiddleware.The function start at line 45 and ends at 69. It contains 25 lines of code and it has a cyclomatic complexity of 5. It takes 6 parameters, represented as [45.0] and does not return any value. It declares 8.0 functions, It has 8.0 functions... |
pasteorg_paste | public | public | 0 | 0 | __call__.cookie_start_response | def cookie_start_response(status, headers, exc_info=None):service.addCookie(headers)return start_response(status, headers, exc_info) | 1 | 3 | 3 | 26 | 0 | 77 | 79 | 77 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (__call__.cookie_start_response) defined within the public class called public.The function start at line 77 and ends at 79. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [77.0] and does not return any value.. |
pasteorg_paste | SessionMiddleware | public | 0 | 0 | __call__ | def __call__(self, environ, start_response):service = flup_session.SessionService(self.store, environ, cookieName=self.cookie_name,fieldName=self.cookie_name)environ['paste.flup_session_service'] = servicedef cookie_start_response(status, headers, exc_info=None):service.addCookie(headers)return start_response(status, h... | 4 | 18 | 3 | 114 | 0 | 71 | 93 | 71 | self,environ,start_response | [] | Returns | {"Assign": 5, "Expr": 4, "Return": 2, "Try": 1} | 10 | 23 | 10 | ["flup_session.SessionService", "service.addCookie", "start_response", "self.application", "items", "service.addCookie", "dict", "service.close", "service.close", "wsgilib.add_close"] | 43 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3508200_spiral_project_daybed.daybed.renderers_py.GeoJSON.__call__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3508200_spiral_project_daybed.daybed.schemas.validators_py.PermissionValidator.__call__", "_.content... | The function (__call__) defined within the public class called SessionMiddleware.The function start at line 71 and ends at 93. It contains 18 lines of code and it has a cyclomatic complexity of 4. It takes 3 parameters, represented as [71.0], and this function return a value. It declares 10.0 functions, It has 10.0 fun... |
pasteorg_paste | public | public | 0 | 0 | make_session_middleware | def make_session_middleware(app, global_conf,session_type=NO_DEFAULT,cookie_name=NO_DEFAULT,**store_config):"""Wraps the application in a session-managing middleware.The session service can then be found in``environ['paste.flup_session_service']``"""return SessionMiddleware(app, global_conf=global_conf,session_type=ses... | 1 | 8 | 5 | 39 | 0 | 95 | 107 | 95 | app,global_conf,session_type,cookie_name,**store_config | [] | Returns | {"Expr": 1, "Return": 1} | 1 | 13 | 1 | ["SessionMiddleware"] | 0 | [] | The function (make_session_middleware) defined within the public class called public.The function start at line 95 and ends at 107. It contains 8 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [95.0], and this function return a value. It declare 1.0 function, and It has 1.... |
pasteorg_paste | middleware | public | 0 | 0 | __init__ | def __init__(self, application, compress_level=6):self.application = applicationself.compress_level = int(compress_level) | 1 | 3 | 3 | 24 | 0 | 24 | 26 | 24 | self,application,compress_level | [] | None | {"Assign": 2} | 1 | 3 | 1 | ["int"] | 6,814 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.Autotools.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.CMake.__init__", "_.content.... | The function (__init__) defined within the public class called middleware.The function start at line 24 and ends at 26. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [24.0] and does not return any value. It declare 1.0 function, It has 1.0 function called ins... |
pasteorg_paste | middleware | public | 0 | 0 | __call__ | def __call__(self, environ, start_response):if 'gzip' not in environ.get('HTTP_ACCEPT_ENCODING', '') \ or environ['REQUEST_METHOD'] == 'HEAD':# nothing for us to do, so this middleware will# be a no-op (there's no body expected in the HEAD case,# and if we open a GzipFile we would produce an erroneous# 20-byte header a... | 4 | 10 | 3 | 79 | 0 | 28 | 42 | 28 | self,environ,start_response | [] | Returns | {"Assign": 2, "Expr": 1, "If": 2, "Return": 2} | 6 | 15 | 6 | ["environ.get", "self.application", "GzipResponse", "self.application", "response.finish_response", "response.write"] | 43 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3508200_spiral_project_daybed.daybed.renderers_py.GeoJSON.__call__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3508200_spiral_project_daybed.daybed.schemas.validators_py.PermissionValidator.__call__", "_.content... | The function (__call__) defined within the public class called middleware.The function start at line 28 and ends at 42. It contains 10 lines of code and it has a cyclomatic complexity of 4. It takes 3 parameters, represented as [28.0], and this function return a value. It declares 6.0 functions, It has 6.0 functions ca... |
pasteorg_paste | middleware | public | 0 | 0 | __init__ | def __init__(self, start_response, compress_level):self.start_response = start_responseself.compress_level = compress_levelself.buffer = io.BytesIO()self.compressible = Falseself.content_length = None | 1 | 6 | 3 | 38 | 0 | 46 | 51 | 46 | self,application,compress_level | [] | None | {"Assign": 2} | 1 | 3 | 1 | ["int"] | 6,814 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.Autotools.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.CMake.__init__", "_.content.... | The function (__init__) defined within the public class called middleware.The function start at line 46 and ends at 51. It contains 6 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [46.0] and does not return any value. It declare 1.0 function, It has 1.0 function called ins... |
pasteorg_paste | GzipResponse | public | 0 | 0 | gzip_start_response | def gzip_start_response(self, status, headers, exc_info=None):self.headers = headersct = header_value(headers,'content-type')ce = header_value(headers,'content-encoding')self.compressible = Falseif ct and (ct.startswith('text/') or ct.startswith('application/')) \and 'zip' not in ct:self.compressible = Trueif ce:self.c... | 7 | 16 | 4 | 114 | 0 | 53 | 68 | 53 | self,status,headers,exc_info | [] | Returns | {"Assign": 8, "Expr": 2, "If": 3, "Return": 1} | 6 | 16 | 6 | ["header_value", "header_value", "ct.startswith", "ct.startswith", "headers.append", "remove_header"] | 0 | [] | The function (gzip_start_response) defined within the public class called GzipResponse.The function start at line 53 and ends at 68. It contains 16 lines of code and it has a cyclomatic complexity of 7. It takes 4 parameters, represented as [53.0], and this function return a value. It declares 6.0 functions, and It ha... |
pasteorg_paste | GzipResponse | public | 0 | 0 | write | def write(self):out = self.bufferout.seek(0)s = out.getvalue()out.close()return [s] | 1 | 6 | 1 | 32 | 0 | 70 | 75 | 70 | self | [] | Returns | {"Assign": 2, "Expr": 2, "Return": 1} | 3 | 6 | 3 | ["out.seek", "out.getvalue", "out.close"] | 501 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3495544_aio_libs_multidict.tests.gen_pickles_py.generate", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3510604_dieseldev_diesel.examples.crawler_py.write_file", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creatio... | The function (write) defined within the public class called GzipResponse.The function start at line 70 and ends at 75. It contains 6 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 3.0 functions, It has 3.0 functions called ... |
pasteorg_paste | GzipResponse | public | 0 | 0 | finish_response | def finish_response(self, app_iter):if self.compressible:output = gzip.GzipFile(mode='wb', compresslevel=self.compress_level,fileobj=self.buffer)else:output = self.buffertry:for s in app_iter:output.write(s)if self.compressible:output.close()finally:if hasattr(app_iter, 'close'):app_iter.close()content_length = self.bu... | 6 | 17 | 2 | 110 | 0 | 77 | 93 | 77 | self,app_iter | [] | None | {"Assign": 3, "Expr": 5, "For": 1, "If": 3, "Try": 1} | 8 | 17 | 8 | ["gzip.GzipFile", "output.write", "output.close", "hasattr", "app_iter.close", "self.buffer.tell", "CONTENT_LENGTH.update", "self.start_response"] | 0 | [] | The function (finish_response) defined within the public class called GzipResponse.The function start at line 77 and ends at 93. It contains 17 lines of code and it has a cyclomatic complexity of 6. It takes 2 parameters, represented as [77.0] and does not return any value. It declares 8.0 functions, and It has 8.0 fu... |
pasteorg_paste | public | public | 0 | 0 | filter_factory.filter | def filter(application):return middleware(application) | 1 | 2 | 1 | 10 | 0 | 100 | 101 | 100 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (filter_factory.filter) defined within the public class called public.The function start at line 100 and ends at 101. 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.. |
pasteorg_paste | public | public | 0 | 0 | filter_factory | def filter_factory(application, **conf):import warningswarnings.warn('This function is deprecated; use make_gzip_middleware instead',DeprecationWarning, 2)def filter(application):return middleware(application)return filter | 1 | 7 | 2 | 24 | 0 | 95 | 102 | 95 | application,**conf | [] | Returns | {"Expr": 1, "Return": 2} | 2 | 8 | 2 | ["warnings.warn", "middleware"] | 0 | [] | The function (filter_factory) defined within the public class called public.The function start at line 95 and ends at 102. It contains 7 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [95.0], and this function return a value. It declares 2.0 functions, and It has 2.0 funct... |
pasteorg_paste | public | public | 0 | 0 | make_gzip_middleware | def make_gzip_middleware(app, global_conf, compress_level=6):"""Wrap the middleware, so that it applies gzipping to a responsewhen it is supported by the browser and the content is oftype ``text/*`` or ``application/*``"""compress_level = int(compress_level)return middleware(app, compress_level=compress_level) | 1 | 3 | 3 | 27 | 1 | 104 | 111 | 104 | app,global_conf,compress_level | ['compress_level'] | Returns | {"Assign": 1, "Expr": 1, "Return": 1} | 2 | 8 | 2 | ["int", "middleware"] | 0 | [] | The function (make_gzip_middleware) defined within the public class called public.The function start at line 104 and ends at 111. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [104.0], and this function return a value. It declares 2.0 functions, and It has 2... |
pasteorg_paste | HTTPException | public | 0 | 1 | __init__ | def __init__(self, detail=None, headers=None, comment=None):assert self.code, "Do not directly instantiate abstract exceptions."assert isinstance(headers, (type(None), list)), ("headers must be None or a list: %r"% headers)assert isinstance(detail, (type(None), bytes, str)), ("detail must be None or a string: %r" % det... | 6 | 21 | 4 | 177 | 0 | 175 | 195 | 175 | self,detail,headers,comment | [] | None | {"Assign": 3, "Expr": 1, "For": 1, "If": 2} | 9 | 21 | 9 | ["isinstance", "type", "isinstance", "type", "isinstance", "type", "tuple", "has_header", "Exception.__init__"] | 6,814 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.Autotools.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.CMake.__init__", "_.content.... | The function (__init__) defined within the public class called HTTPException, that inherit another class.The function start at line 175 and ends at 195. It contains 21 lines of code and it has a cyclomatic complexity of 6. It takes 4 parameters, represented as [175.0] and does not return any value. It declares 9.0 func... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.