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 | HTTPException | public | 0 | 1 | make_body | def make_body(self, environ, template, escfunc, comment_escfunc=None):comment_escfunc = comment_escfunc or escfuncargs = {'explanation': escfunc(self.explanation),'detail': escfunc(self.detail),'comment': comment_escfunc(self.comment)}if HTTPException.template != self.template:for (k, v) in environ.items():args[k] = es... | 6 | 12 | 5 | 114 | 0 | 197 | 208 | 197 | self,environ,template,escfunc,comment_escfunc | [] | Returns | {"Assign": 4, "For": 2, "If": 2, "Return": 1} | 7 | 12 | 7 | ["escfunc", "escfunc", "comment_escfunc", "environ.items", "escfunc", "k.lower", "escfunc"] | 0 | [] | The function (make_body) defined within the public class called HTTPException, that inherit another class.The function start at line 197 and ends at 208. It contains 12 lines of code and it has a cyclomatic complexity of 6. It takes 5 parameters, represented as [197.0], and this function return a value. It declares 7.0... |
pasteorg_paste | HTTPException | public | 0 | 1 | plain | def plain(self, environ):""" text/plain representation of the exception """body = self.make_body(environ, strip_html(self.template), no_quote, comment_quote)return ('%s %s\r\n%s\r\n' % (self.code, self.title, body)) | 1 | 3 | 2 | 43 | 0 | 210 | 213 | 210 | self,environ | [] | Returns | {"Assign": 1, "Expr": 1, "Return": 1} | 2 | 4 | 2 | ["self.make_body", "strip_html"] | 0 | [] | The function (plain) defined within the public class called HTTPException, that inherit another class.The function start at line 210 and ends at 213. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [210.0], and this function return a value. It declares 2.0 func... |
pasteorg_paste | HTTPException | public | 0 | 1 | html | def html(self, environ):""" text/html representation of the exception """body = self.make_body(environ, self.template, html_quote, comment_quote)return TEMPLATE % { 'title': self.title, 'code': self.code, 'server': SERVER_NAME, 'body': body } | 1 | 7 | 2 | 48 | 0 | 215 | 222 | 215 | self,environ | [] | Returns | {"Assign": 1, "Expr": 1, "Return": 1} | 1 | 8 | 1 | ["self.make_body"] | 9 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3718286_gawel_pyquery.pyquery.pyquery_py.PyQuery.text", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3718286_gawel_pyquery.pyquery.pyquery_py.PyQuery.val", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Outp... | The function (html) defined within the public class called HTTPException, that inherit another class.The function start at line 215 and ends at 222. It contains 7 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [215.0], and this function return a value. It declare 1.0 functi... |
pasteorg_paste | HTTPException | public | 0 | 1 | prepare_content | def prepare_content(self, environ):if self.headers:headers = list(self.headers)else:headers = []if 'html' in environ.get('HTTP_ACCEPT','') or \'*/*' in environ.get('HTTP_ACCEPT',''):replace_header(headers, 'content-type', 'text/html')content = self.html(environ)else:replace_header(headers, 'content-type', 'text/plain')... | 6 | 21 | 2 | 126 | 0 | 224 | 244 | 224 | self,environ | [] | Returns | {"Assign": 6, "Expr": 3, "If": 3, "Return": 1} | 11 | 21 | 11 | ["list", "environ.get", "environ.get", "replace_header", "self.html", "replace_header", "self.plain", "isinstance", "content.encode", "header_value", "replace_header"] | 0 | [] | The function (prepare_content) defined within the public class called HTTPException, that inherit another class.The function start at line 224 and ends at 244. It contains 21 lines of code and it has a cyclomatic complexity of 6. It takes 2 parameters, represented as [224.0], and this function return a value. It declar... |
pasteorg_paste | HTTPException | public | 0 | 1 | response | def response(self, environ):from paste.wsgiwrappers import WSGIResponseheaders, content = self.prepare_content(environ)resp = WSGIResponse(code=self.code, content=content)resp.headers = resp.headers.fromlist(headers)return resp | 1 | 6 | 2 | 51 | 0 | 246 | 251 | 246 | self,environ | [] | Returns | {"Assign": 3, "Return": 1} | 3 | 6 | 3 | ["self.prepare_content", "WSGIResponse", "resp.headers.fromlist"] | 20 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3513788_docker_archive_docker_registry.docker_registry.toolkit_py.api_error", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3718286_gawel_pyquery.tests.apps_py.application", "_.content.gdrive.MyDrive.Phd_Thesis.Data... | The function (response) defined within the public class called HTTPException, that inherit another class.The function start at line 246 and ends at 251. It contains 6 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [246.0], and this function return a value. It declares 3.0 f... |
pasteorg_paste | HTTPException | public | 0 | 1 | wsgi_application | def wsgi_application(self, environ, start_response, exc_info=None):"""This exception as a WSGI application"""headers, content = self.prepare_content(environ)start_response('%s %s' % (self.code, self.title), headers, exc_info)return [content] | 1 | 6 | 4 | 46 | 0 | 253 | 261 | 253 | self,environ,start_response,exc_info | [] | Returns | {"Assign": 1, "Expr": 2, "Return": 1} | 2 | 9 | 2 | ["self.prepare_content", "start_response"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.paste.fileapp_py.DataApp.get"] | The function (wsgi_application) defined within the public class called HTTPException, that inherit another class.The function start at line 253 and ends at 261. It contains 6 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [253.0], and this function return a value. It declar... |
pasteorg_paste | HTTPException | public | 0 | 1 | __repr__ | def __repr__(self):return '<%s %s; code=%s>' % (self.__class__.__name__, self.title, self.code) | 1 | 3 | 1 | 23 | 0 | 265 | 267 | 265 | self | [] | Returns | {"Return": 1} | 0 | 3 | 0 | [] | 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 HTTPException, that inherit another class.The function start at line 265 and ends at 267. It contains 3 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 has 29.0 functions... |
pasteorg_paste | HTTPException | public | 0 | 1 | __init__ | def __init__(self, detail=None, headers=None, comment=None):assert isinstance(headers, (type(None), list))headers = headers or []location = header_value(headers,'location')if not location:location = detaildetail = ''headers.append(('location', location))assert location, ("HTTPRedirection specified neither a ""location ... | 4 | 14 | 4 | 96 | 0 | 317 | 330 | 317 | 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 317 and ends at 330. It contains 14 lines of code and it has a cyclomatic complexity of 4. It takes 4 parameters, represented as [317.0] and does not return any value. It declares 9.0 func... |
pasteorg_paste | _HTTPMove | protected | 0 | 1 | relative_redirect | def relative_redirect(cls, dest_uri, environ, detail=None, headers=None, comment=None):"""Create a redirect object with the dest_uri, which may be relative,considering it relative to the uri implied by the given environ."""location = resolve_relative_url(dest_uri, environ)headers = headers or []headers.append(('Locatio... | 2 | 5 | 6 | 61 | 0 | 332 | 340 | 332 | cls,dest_uri,environ,detail,headers,comment | [] | Returns | {"Assign": 2, "Expr": 2, "Return": 1} | 3 | 9 | 3 | ["resolve_relative_url", "headers.append", "cls"] | 0 | [] | The function (relative_redirect) defined within the protected class called _HTTPMove, that inherit another class.The function start at line 332 and ends at 340. It contains 5 lines of code and it has a cyclomatic complexity of 2. It takes 6 parameters, represented as [332.0], and this function return a value. It declar... |
pasteorg_paste | _HTTPMove | protected | 0 | 1 | location | def location(self):for name, value in self.headers:if name.lower() == 'location':return valueelse:raise KeyError("No location set for %s" % self) | 3 | 6 | 1 | 34 | 0 | 344 | 349 | 344 | self | [] | Returns | {"For": 1, "If": 1, "Return": 1} | 2 | 6 | 2 | ["name.lower", "KeyError"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3593274_stevenproctor_planet_erlang.planet.reconstitute_py.reconstitute", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.77599168_scrapy_plugins_scrapy_zyte_api.tests.test_sessions_py.test_session_config_location"] | The function (location) defined within the protected class called _HTTPMove, that inherit another class.The function start at line 344 and ends at 349. It contains 6 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 functi... |
pasteorg_paste | HTTPException | public | 0 | 1 | plain | def plain(self, environ):return '' | 1 | 2 | 2 | 9 | 0 | 379 | 380 | 379 | self,environ | [] | Returns | {"Assign": 1, "Expr": 1, "Return": 1} | 2 | 4 | 2 | ["self.make_body", "strip_html"] | 0 | [] | The function (plain) defined within the public class called HTTPException, that inherit another class.The function start at line 379 and ends at 380. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [379.0], and this function return a value. It declares 2.0 func... |
pasteorg_paste | HTTPException | public | 0 | 1 | html | def html(self, environ):""" text/html representation of the exception """return '' | 1 | 2 | 2 | 10 | 0 | 381 | 383 | 381 | self,environ | [] | Returns | {"Assign": 1, "Expr": 1, "Return": 1} | 1 | 8 | 1 | ["self.make_body"] | 9 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3718286_gawel_pyquery.pyquery.pyquery_py.PyQuery.text", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3718286_gawel_pyquery.pyquery.pyquery_py.PyQuery.val", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Outp... | The function (html) defined within the public class called HTTPException, that inherit another class.The function start at line 381 and ends at 383. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [381.0], and this function return a value. It declare 1.0 functi... |
pasteorg_paste | public | public | 0 | 0 | get_exception | def get_exception(code):return _exceptions[code] | 1 | 2 | 1 | 10 | 0 | 599 | 600 | 599 | code | [] | Returns | {"Return": 1} | 0 | 2 | 0 | [] | 19 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3704605_paloaltonetworks_ansible_pan.library.panos_cert_gen_ssh_py.main", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3704605_paloaltonetworks_ansible_pan.library.panos_dag_py.delete_address_group", "_.content.gdr... | The function (get_exception) defined within the public class called public.The function start at line 599 and ends at 600. 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 has 19.0 functions calling this function which a... |
pasteorg_paste | HTTPException | public | 0 | 1 | __init__ | def __init__(self, application, warning_level=None):assert not warning_level or ( warning_level > 99 andwarning_level < 600)if warning_level is not None:import warningswarnings.warn('The warning_level parameter is not used or supported',DeprecationWarning, 2)self.warning_level = warning_level or 500self.application = a... | 5 | 9 | 3 | 54 | 0 | 620 | 628 | 620 | 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 620 and ends at 628. It contains 9 lines of code and it has a cyclomatic complexity of 5. It takes 3 parameters, represented as [620.0] and does not return any value. It declares 9.0 funct... |
pasteorg_paste | HTTPExceptionHandler | public | 0 | 0 | __call__ | def __call__(self, environ, start_response):environ['paste.httpexceptions'] = selfenviron.setdefault('paste.expected_exceptions', []).append(HTTPException)try:return self.application(environ, start_response)except HTTPException as exc:return exc(environ, start_response) | 2 | 8 | 3 | 52 | 0 | 630 | 637 | 630 | self,environ,start_response | [] | Returns | {"Assign": 1, "Expr": 1, "Return": 2, "Try": 1} | 4 | 8 | 4 | ["append", "environ.setdefault", "self.application", "exc"] | 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 HTTPExceptionHandler.The function start at line 630 and ends at 637. It contains 8 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [630.0], and this function return a value. It declares 4.0 functions, It has 4.0 ... |
pasteorg_paste | public | public | 0 | 0 | middleware | def middleware(*args, **kw):import warnings# deprecated 13 dec 2005warnings.warn('httpexceptions.middleware is deprecated; use ''make_middleware or HTTPExceptionHandler instead',DeprecationWarning, 2)return make_middleware(*args, **kw) | 1 | 6 | 2 | 31 | 0 | 639 | 645 | 639 | *args,**kw | [] | Returns | {"Expr": 1, "Return": 1} | 2 | 7 | 2 | ["warnings.warn", "make_middleware"] | 15 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3712479_corvia_django_tenant_users.tests.test_tenants.test_middleware_py.TestTenantAccessMiddleware.test_authenticated_user_no_access", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3712479_corvia_django_tenant_user... | The function (middleware) defined within the public class called public.The function start at line 639 and ends at 645. It contains 6 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [639.0], and this function return a value. It declares 2.0 functions, It has 2.0 functions ca... |
pasteorg_paste | public | public | 0 | 0 | make_middleware | def make_middleware(app, global_conf=None, warning_level=None):"""``httpexceptions`` middleware; this catches any``paste.httpexceptions.HTTPException`` exceptions (exceptions like``HTTPNotFound``, ``HTTPMovedPermanently``, etc) and turns theminto proper HTTP responses.``warning_level`` can be an integer corresponding t... | 2 | 4 | 3 | 32 | 1 | 647 | 660 | 647 | app,global_conf,warning_level | ['warning_level'] | Returns | {"Assign": 1, "Expr": 1, "If": 1, "Return": 1} | 2 | 14 | 2 | ["int", "HTTPExceptionHandler"] | 4 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3687462_toscawidgets_tw2_core.tests.test_middleware_py.TestMiddleware.testMakeMiddelware", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3687462_toscawidgets_tw2_core.tests.test_validation_py.TestValidationError.set... | The function (make_middleware) defined within the public class called public.The function start at line 647 and ends at 660. It contains 4 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [647.0], and this function return a value. It declares 2.0 functions, It has 2.0 functio... |
pasteorg_paste | EnvironVariable | public | 0 | 1 | __call__ | def __call__(self, environ):return environ.get(self,'') | 1 | 2 | 2 | 16 | 0 | 154 | 155 | 154 | self,environ | [] | Returns | {"Return": 1} | 1 | 2 | 1 | ["environ.get"] | 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 EnvironVariable, that inherit another class.The function start at line 154 and ends at 155. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [154.0], and this function return a value. It declare 1.0 ... |
pasteorg_paste | EnvironVariable | public | 0 | 1 | __repr__ | def __repr__(self):return '<EnvironVariable %s>' % self | 1 | 2 | 1 | 9 | 0 | 156 | 157 | 156 | self | [] | Returns | {"Return": 1} | 0 | 2 | 0 | [] | 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 EnvironVariable, that inherit another class.The function start at line 156 and ends at 157. 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 has 29.0 functio... |
pasteorg_paste | EnvironVariable | public | 0 | 1 | update | def update(self, environ, value):environ[self] = value | 1 | 2 | 3 | 15 | 0 | 158 | 159 | 158 | self,environ,value | [] | None | {"Assign": 1} | 0 | 2 | 0 | [] | 403 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16851155_pbui_bobbit.src.bobbit.modules.duckhunt_py.ducks", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3508200_spiral_project_daybed.daybed.backends.memory.__init___py.MemoryBackend.put_record", "_.content.gdrive... | The function (update) defined within the public class called EnvironVariable, that inherit another class.The function start at line 158 and ends at 159. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [158.0] and does not return any value. It has 403.0 function... |
pasteorg_paste | HTTPHeader | public | 0 | 0 | compose | def compose(self, **kwargs):"""build header value from keyword argumentsThis method is used to build the corresponding header value whenkeyword arguments (or no arguments) were provided.The resultshould be a sequence of values.For example, the ``Expires``header takes a keyword argument ``time`` (e.g. time.time()) fromw... | 1 | 2 | 2 | 13 | 0 | 273 | 283 | 273 | self,**kwargs | [] | None | {"Expr": 1} | 1 | 11 | 1 | ["NotImplementedError"] | 4 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3963858_jaraco_path.path.masks_py.compound", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.77529374_cjdrake_pyeda.pyeda.boolalg.test.test_expr_py.test_comp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Out... | The function (compose) defined within the public class called HTTPHeader.The function start at line 273 and ends at 283. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [273.0] and does not return any value. It declare 1.0 function, It has 1.0 function called i... |
pasteorg_paste | HTTPHeader | public | 0 | 0 | parse | def parse(self, *args, **kwargs):"""convert raw header value into more usable formThis method invokes ``values()`` with the arguments provided,parses the header results, and then returns a header-specificdata structure corresponding to the header.For example, the``Expires`` header returns seconds (as returned by time.t... | 1 | 2 | 3 | 16 | 0 | 285 | 294 | 285 | self,*args,**kwargs | [] | None | {"Expr": 1} | 1 | 10 | 1 | ["NotImplementedError"] | 177 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3554290_abakan_zz_ablog.ablog.post_py.process_postlist", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3567358_coursera_dataduct.dataduct.pipeline.schedule_py.Schedule.__init__", "_.content.gdrive.MyDrive.Phd_Thesis... | The function (parse) defined within the public class called HTTPHeader.The function start at line 285 and ends at 294. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [285.0] and does not return any value. It declare 1.0 function, It has 1.0 function called ins... |
pasteorg_paste | HTTPHeader | public | 0 | 0 | apply | def apply(self, collection, **kwargs):"""update the collection /w header value (may have side effects)This method is similar to ``update`` only that usage may resultin other headers being changed as recommended by the correspondingspecification.The return value is defined by the particularsub-class. For example, the ``... | 1 | 2 | 3 | 20 | 0 | 296 | 306 | 296 | self,collection,**kwargs | [] | None | {"Expr": 2} | 1 | 11 | 1 | ["self.update"] | 122 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3568546_onnxbot_onnx_fb_universe.test.test_verify_py.TestVerify.test_result_different", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3636841_databio_pypiper.pypiper.manager_py.PipelineManager.get_elapsed_time", "_.... | The function (apply) defined within the public class called HTTPHeader.The function start at line 296 and ends at 306. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [296.0] and does not return any value. It declare 1.0 function, It has 1.0 function called ins... |
pasteorg_paste | HTTPHeader | public | 0 | 0 | __new__ | def __new__(cls, name, category=None, reference=None, version=None):"""construct a new ``HTTPHeader`` instanceWe use the ``__new__`` operator to ensure that only one``HTTPHeader`` instance exists for each field-name, and toregister the header so that it can be found/enumerated."""self = get_header(name, raiseError=Fals... | 5 | 25 | 5 | 208 | 0 | 311 | 345 | 311 | cls,name,category,reference,version | [] | Returns | {"Assign": 10, "Expr": 1, "If": 1, "Return": 2} | 9 | 35 | 9 | ["get_header", "object.__new__", "isinstance", "self.name.lower", "getattr", "replace", "self.name.upper", "getattr", "self.name.lower"] | 113 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15217004_shayypy_guilded_py.guilded.enums_py.EnumMeta.__new__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3537219_anthraxx_diffoscope.diffoscope.comparators.elf_py.ReadelfDebugDump.__new__", "_.content.gdrive.My... | The function (__new__) defined within the public class called HTTPHeader.The function start at line 311 and ends at 345. It contains 25 lines of code and it has a cyclomatic complexity of 5. It takes 5 parameters, represented as [311.0], and this function return a value. It declares 9.0 functions, It has 9.0 functions ... |
pasteorg_paste | HTTPHeader | public | 0 | 0 | __str__ | def __str__(self):return self.name | 1 | 2 | 1 | 9 | 0 | 347 | 348 | 347 | self | [] | Returns | {"Return": 1} | 0 | 2 | 0 | [] | 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 HTTPHeader.The function start at line 347 and ends at 348. 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 has 64.0 functions calling this function which are... |
pasteorg_paste | HTTPHeader | public | 0 | 0 | __lt__ | def __lt__(self, other):"""sort header instances as specified by RFC 2616Re-define sorting so that general headers are first, followedby request/response headers, and then entity headers.Thelist.sort() methods use the less-than operator for this purpose."""if isinstance(other, HTTPHeader):if self.sort_order != other.so... | 3 | 6 | 2 | 43 | 0 | 350 | 362 | 350 | self,other | [] | Returns | {"Expr": 1, "If": 2, "Return": 3} | 1 | 13 | 1 | ["isinstance"] | 3 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.55413314_dbbs_lab_bsb.libs.nrn_patch.patch.version_py.NeuronVersion.__lt__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69695072_nexb_univers.src.univers.version_constraint_py.VersionConstraint.__lt__", "_.conten... | The function (__lt__) defined within the public class called HTTPHeader.The function start at line 350 and ends at 362. It contains 6 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [350.0], and this function return a value. It declare 1.0 function, It has 1.0 function calle... |
pasteorg_paste | EnvironVariable | public | 0 | 1 | __repr__ | def __repr__(self):ref = self.reference and (' (%s)' % self.reference) or ''return '<%s %s%s>' % (self.__class__.__name__, self.name, ref) | 3 | 3 | 1 | 36 | 0 | 364 | 366 | 364 | self | [] | Returns | {"Return": 1} | 0 | 2 | 0 | [] | 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 EnvironVariable, that inherit another class.The function start at line 364 and ends at 366. It contains 3 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 has 29.0 functio... |
pasteorg_paste | HTTPHeader | public | 0 | 0 | values | def values(self, *args, **kwargs):"""find/construct field-value(s) for the given headerResolution is done according to the following arguments:- If only keyword arguments are given, then this is equivalentto ``compose(**kwargs)``.- If the first (and only) argument is a dict, it is assumedto be a WSGI ``environ`` and th... | 10 | 20 | 3 | 156 | 0 | 368 | 413 | 368 | self,*args,**kwargs | [] | Returns | {"Assign": 3, "Expr": 2, "For": 2, "If": 4, "Return": 5} | 10 | 46 | 10 | ["self.compose", "type", "len", "self.name.lower", "header.lower", "result.append", "type", "len", "get", "type"] | 338 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3508200_spiral_project_daybed.daybed.backends.memory.__init___py.MemoryBackend.__get_raw_records", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3519472_california_civic_data_coalition_django_calaccess_campaign_brow... | The function (values) defined within the public class called HTTPHeader.The function start at line 368 and ends at 413. It contains 20 lines of code and it has a cyclomatic complexity of 10. It takes 3 parameters, represented as [368.0], and this function return a value. It declares 10.0 functions, It has 10.0 function... |
pasteorg_paste | EnvironVariable | public | 0 | 1 | __call__ | def __call__(self, *args, **kwargs):"""converts ``values()`` into a string valueThis method converts the results of ``values()`` into a stringvalue for common usage.By default, it is asserted that onlyone value exists; if you need to access all values then eithercall ``values()`` directly, or inherit ``_MultiValueHeade... | 2 | 7 | 3 | 67 | 0 | 415 | 431 | 415 | self,environ | [] | Returns | {"Return": 1} | 1 | 2 | 1 | ["environ.get"] | 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 EnvironVariable, that inherit another class.The function start at line 415 and ends at 431. It contains 7 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [415.0], and this function return a value. It declare 1.0 ... |
pasteorg_paste | HTTPHeader | public | 0 | 0 | delete | def delete(self, collection):"""removes all occurances of the header from the collection provided"""if type(collection) == dict:if self._environ_name in collection:del collection[self._environ_name]return selfassert list == type(collection)i = 0while i < len(collection):if collection[i][0].lower() == self._headers_name... | 5 | 12 | 2 | 76 | 0 | 433 | 447 | 433 | self,collection | [] | Returns | {"Assign": 1, "AugAssign": 1, "Expr": 1, "If": 3, "Return": 1, "While": 1} | 4 | 15 | 4 | ["type", "type", "len", "lower"] | 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 HTTPHeader.The function start at line 433 and ends at 447. It contains 12 lines of code and it has a cyclomatic complexity of 5. It takes 2 parameters, represented as [433.0], and this function return a value. It declares 4.0 functions, It has 4.0 functions c... |
pasteorg_paste | EnvironVariable | public | 0 | 1 | update | def update(self, collection, *args, **kwargs):"""updates the collection with the provided header valueThis method replaces (in-place when possible) all occurrences ofthe given header with the provided value.If no value isprovided, this is the same as ``remove`` (note that this casecan only occur if the target is a coll... | 7 | 21 | 4 | 135 | 0 | 449 | 479 | 449 | self,environ,value | [] | None | {"Assign": 1} | 0 | 2 | 0 | [] | 403 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16851155_pbui_bobbit.src.bobbit.modules.duckhunt_py.ducks", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3508200_spiral_project_daybed.daybed.backends.memory.__init___py.MemoryBackend.put_record", "_.content.gdrive... | The function (update) defined within the public class called EnvironVariable, that inherit another class.The function start at line 449 and ends at 479. It contains 21 lines of code and it has a cyclomatic complexity of 7. It takes 4 parameters, represented as [449.0] and does not return any value. It has 403.0 functio... |
pasteorg_paste | HTTPHeader | public | 0 | 0 | tuples | def tuples(self, *args, **kwargs):value = self.__call__(*args, **kwargs)if not value:return ()return [(self.name, value)] | 2 | 5 | 3 | 40 | 0 | 481 | 485 | 481 | self,*args,**kwargs | [] | Returns | {"Assign": 1, "If": 1, "Return": 2} | 1 | 5 | 1 | ["self.__call__"] | 12 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95201518_brightway_lca_brightway2_data.bw2data.backends.base_py.SQLiteBackend.delete", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95201518_brightway_lca_brightway2_data.bw2data.backends.base_py.SQLiteBackend.proc... | The function (tuples) defined within the public class called HTTPHeader.The function start at line 481 and ends at 485. It contains 5 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [481.0], and this function return a value. It declare 1.0 function, It has 1.0 function calle... |
pasteorg_paste | EnvironVariable | public | 0 | 1 | __call__ | def __call__(self, *args, **kwargs):results = self.values(*args, **kwargs)if not results:return ''return ", ".join([str(v).strip() for v in results]) | 3 | 5 | 3 | 49 | 0 | 506 | 510 | 506 | self,environ | [] | Returns | {"Return": 1} | 1 | 2 | 1 | ["environ.get"] | 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 EnvironVariable, that inherit another class.The function start at line 506 and ends at 510. It contains 5 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [506.0], and this function return a value. It declare 1.0 ... |
pasteorg_paste | HTTPHeader | public | 0 | 0 | parse | def parse(self, *args, **kwargs):value = self.__call__(*args, **kwargs)values = value.split(',')return [v.strip() for v in valuesif v.strip()] | 3 | 6 | 3 | 49 | 0 | 512 | 517 | 512 | self,*args,**kwargs | [] | None | {"Expr": 1} | 1 | 10 | 1 | ["NotImplementedError"] | 177 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3554290_abakan_zz_ablog.ablog.post_py.process_postlist", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3567358_coursera_dataduct.dataduct.pipeline.schedule_py.Schedule.__init__", "_.content.gdrive.MyDrive.Phd_Thesis... | The function (parse) defined within the public class called HTTPHeader.The function start at line 512 and ends at 517. It contains 6 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [512.0] and does not return any value. It declare 1.0 function, It has 1.0 function called ins... |
pasteorg_paste | EnvironVariable | public | 0 | 1 | update | def update(self, collection, *args, **kwargs):assert list == type(collection), "``environ`` may not be updated"self.delete(collection)collection.extend(self.tuples(*args, **kwargs)) | 1 | 4 | 4 | 43 | 0 | 529 | 532 | 529 | self,environ,value | [] | None | {"Assign": 1} | 0 | 2 | 0 | [] | 403 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16851155_pbui_bobbit.src.bobbit.modules.duckhunt_py.ducks", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3508200_spiral_project_daybed.daybed.backends.memory.__init___py.MemoryBackend.put_record", "_.content.gdrive... | The function (update) defined within the public class called EnvironVariable, that inherit another class.The function start at line 529 and ends at 532. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [529.0] and does not return any value. It has 403.0 function... |
pasteorg_paste | HTTPHeader | public | 0 | 0 | tuples | def tuples(self, *args, **kwargs):values = self.values(*args, **kwargs)if not values:return ()return [(self.name, value.strip()) for value in values] | 3 | 5 | 3 | 48 | 0 | 534 | 538 | 534 | self,*args,**kwargs | [] | Returns | {"Assign": 1, "If": 1, "Return": 2} | 1 | 5 | 1 | ["self.__call__"] | 12 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95201518_brightway_lca_brightway2_data.bw2data.backends.base_py.SQLiteBackend.delete", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95201518_brightway_lca_brightway2_data.bw2data.backends.base_py.SQLiteBackend.proc... | The function (tuples) defined within the public class called HTTPHeader.The function start at line 534 and ends at 538. It contains 5 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [534.0], and this function return a value. It declare 1.0 function, It has 1.0 function calle... |
pasteorg_paste | public | public | 0 | 0 | get_header | def get_header(name, raiseError=True):"""find the given ``HTTPHeader`` instanceThis function finds the corresponding ``HTTPHeader`` for the``name`` provided.So that python-style names can be used,underscores are converted to dashes before the lookup."""retval = _headers.get(str(name).strip().lower().replace("_","-"))if... | 3 | 5 | 2 | 51 | 1 | 540 | 551 | 540 | name,raiseError | ['retval'] | Returns | {"Assign": 1, "Expr": 1, "If": 1, "Return": 1} | 6 | 12 | 6 | ["_headers.get", "replace", "lower", "strip", "str", "AssertionError"] | 3 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.paste.fileapp_py.DataApp.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.paste.httpheaders_py.HTTPHeader.__new__", "_.content.gdrive.MyDrive.Phd_Thesis.Datase... | The function (get_header) defined within the public class called public.The function start at line 540 and ends at 551. It contains 5 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [540.0], and this function return a value. It declares 6.0 functions, It has 6.0 functions ca... |
pasteorg_paste | public | public | 0 | 0 | list_headers | def list_headers(general=None, request=None, response=None, entity=None):" list all headers for a given category "if not (general or request or response or entity):general = request = response = entity = Truesearch = []for (bool, strval) in ((general, 'general'), (request, 'request'), (response, 'response'), (entity, '... | 9 | 10 | 4 | 105 | 5 | 553 | 562 | 553 | general,request,response,entity | ['general', 'entity', 'request', 'search', 'response'] | Returns | {"Assign": 2, "Expr": 2, "For": 1, "If": 2, "Return": 1} | 2 | 10 | 2 | ["search.append", "_headers.values"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.paste.fileapp_py.DataApp.get"] | The function (list_headers) defined within the public class called public.The function start at line 553 and ends at 562. It contains 10 lines of code and it has a cyclomatic complexity of 9. It takes 4 parameters, represented as [553.0], and this function return a value. It declares 2.0 functions, It has 2.0 functions... |
pasteorg_paste | public | public | 0 | 0 | normalize_headers.key_func | def key_func(item):value = item[0]return (category[value], value) | 1 | 3 | 1 | 20 | 0 | 585 | 587 | 585 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (normalize_headers.key_func) defined within the public class called public.The function start at line 585 and ends at 587. It contains 3 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 | normalize_headers | def normalize_headers(response_headers, strict=True):"""sort headers as suggested byRFC 2616This alters the underlying response_headers to use the commonname for each header; as well as sorting them with generalheaders first, followed by request/response headers, thenentity headers, and unknown headers last."""category... | 4 | 15 | 2 | 128 | 4 | 564 | 588 | 564 | response_headers,strict | ['head', 'value', 'newhead', 'category'] | Returns | {"Assign": 9, "Expr": 2, "For": 1, "If": 1, "Return": 1} | 10 | 25 | 10 | ["range", "len", "get_header", "join", "x.capitalize", "split", "key.replace", "str", "str", "response_headers.sort"] | 8 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69847433_requests_cache_requests_cache.requests_cache.cache_keys_py.normalize_request", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69847433_requests_cache_requests_cache.requests_cache.policy.actions_py._log_vary... | The function (normalize_headers) defined within the public class called public.The function start at line 564 and ends at 588. It contains 15 lines of code and it has a cyclomatic complexity of 4. It takes 2 parameters, represented as [564.0], and this function return a value. It declares 10.0 functions, It has 10.0 fu... |
pasteorg_paste | HTTPHeader | public | 0 | 0 | compose | def compose(self, time=None, delta=None):time = time or now()if delta:assert type(delta) == inttime += deltareturn (formatdate(time),) | 3 | 6 | 3 | 41 | 0 | 604 | 609 | 604 | self,**kwargs | [] | None | {"Expr": 1} | 1 | 11 | 1 | ["NotImplementedError"] | 4 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3963858_jaraco_path.path.masks_py.compound", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.77529374_cjdrake_pyeda.pyeda.boolalg.test.test_expr_py.test_comp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Out... | The function (compose) defined within the public class called HTTPHeader.The function start at line 604 and ends at 609. It contains 6 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [604.0] and does not return any value. It declare 1.0 function, It has 1.0 function called i... |
pasteorg_paste | HTTPHeader | public | 0 | 0 | parse | def parse(self, *args, **kwargs):""" return the time value (in seconds since 1970) """value = self.__call__(*args, **kwargs)if value:try:return mktime_tz(parsedate_tz(value))except (TypeError, OverflowError):raise HTTPBadRequest(("Received an ill-formed timestamp for %s: %s\r\n") %(self.name, value)) | 3 | 9 | 3 | 59 | 0 | 611 | 620 | 611 | self,*args,**kwargs | [] | None | {"Expr": 1} | 1 | 10 | 1 | ["NotImplementedError"] | 177 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3554290_abakan_zz_ablog.ablog.post_py.process_postlist", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3567358_coursera_dataduct.dataduct.pipeline.schedule_py.Schedule.__init__", "_.content.gdrive.MyDrive.Phd_Thesis... | The function (parse) defined within the public class called HTTPHeader.The function start at line 611 and ends at 620. It contains 9 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [611.0] and does not return any value. It declare 1.0 function, It has 1.0 function called ins... |
pasteorg_paste | _CacheControl | protected | 0 | 1 | _compose | def _compose(self, public=None, private=None, no_cache=None, no_store=False, max_age=None, s_maxage=None, no_transform=False, **extensions):assert isinstance(max_age, (type(None), int))assert isinstance(s_maxage, (type(None), int))expires = 0result = []if private is True:assert not public and not no_cache and not s_max... | 15 | 31 | 9 | 235 | 0 | 707 | 737 | 707 | self,public,private,no_cache,no_store,max_age,s_maxage,no_transform,**extensions | [] | Returns | {"Assign": 3, "Expr": 8, "For": 1, "If": 7, "Return": 1} | 15 | 31 | 15 | ["isinstance", "type", "isinstance", "type", "result.append", "result.append", "result.append", "result.append", "result.append", "result.append", "result.append", "extensions.items", "AssertionError", "result.append", "k.replace"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3659669_pyopenapi_pyswagger.pyswagger.scanner.v2_0.aggt_py.Aggregate._schema", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3659669_pyopenapi_pyswagger.pyswagger.scanner.v2_0.aggt_py._compose"] | The function (_compose) defined within the protected class called _CacheControl, that inherit another class.The function start at line 707 and ends at 737. It contains 31 lines of code and it has a cyclomatic complexity of 15. It takes 9 parameters, represented as [707.0], and this function return a value. It declares ... |
pasteorg_paste | HTTPHeader | public | 0 | 0 | compose | def compose(self, **kwargs):(result, expires) = self._compose(**kwargs)return result | 1 | 3 | 2 | 23 | 0 | 739 | 741 | 739 | self,**kwargs | [] | None | {"Expr": 1} | 1 | 11 | 1 | ["NotImplementedError"] | 4 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3963858_jaraco_path.path.masks_py.compound", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.77529374_cjdrake_pyeda.pyeda.boolalg.test.test_expr_py.test_comp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Out... | The function (compose) defined within the public class called HTTPHeader.The function start at line 739 and ends at 741. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [739.0] and does not return any value. It declare 1.0 function, It has 1.0 function called i... |
pasteorg_paste | HTTPHeader | public | 0 | 0 | apply | def apply(self, collection, **kwargs):""" returns the offset expiration in seconds """(result, expires) = self._compose(**kwargs)if expires is not None:EXPIRES.update(collection, delta=expires)self.update(collection, *result)return expires | 2 | 6 | 3 | 51 | 0 | 743 | 749 | 743 | self,collection,**kwargs | [] | None | {"Expr": 2} | 1 | 11 | 1 | ["self.update"] | 122 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3568546_onnxbot_onnx_fb_universe.test.test_verify_py.TestVerify.test_result_different", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3636841_databio_pypiper.pypiper.manager_py.PipelineManager.get_elapsed_time", "_.... | The function (apply) defined within the public class called HTTPHeader.The function start at line 743 and ends at 749. It contains 6 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [743.0] and does not return any value. It declare 1.0 function, It has 1.0 function called ins... |
pasteorg_paste | HTTPHeader | public | 0 | 0 | compose | def compose(self, major=None, minor=None, charset=None):if not major:if minor in ('plain', 'html', 'xml'):major = 'text'else:assert not minor and not charsetreturn (self.UNKNOWN,)if not minor:minor = "*"result = "%s/%s" % (major, minor)if charset:result += "; charset=%s" % charsetreturn (result,) | 6 | 13 | 4 | 79 | 0 | 768 | 780 | 768 | self,**kwargs | [] | None | {"Expr": 1} | 1 | 11 | 1 | ["NotImplementedError"] | 4 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3963858_jaraco_path.path.masks_py.compound", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.77529374_cjdrake_pyeda.pyeda.boolalg.test.test_expr_py.test_comp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Out... | The function (compose) defined within the public class called HTTPHeader.The function start at line 768 and ends at 780. It contains 13 lines of code and it has a cyclomatic complexity of 6. It takes 4 parameters, represented as [768.0] and does not return any value. It declare 1.0 function, It has 1.0 function called ... |
pasteorg_paste | _CacheControl | protected | 0 | 1 | _compose | def _compose(self, attachment=None, inline=None, filename=None):result = []if inline is True:assert not attachmentresult.append('inline')else:assert not inlineresult.append('attachment')if filename:assert '"' not in filenamefilename = filename.split("/")[-1]filename = filename.split("\\")[-1]result.append('filename="%s... | 3 | 14 | 4 | 100 | 0 | 831 | 844 | 831 | self,public,private,no_cache,no_store,max_age,s_maxage,no_transform,**extensions | [] | Returns | {"Assign": 3, "Expr": 8, "For": 1, "If": 7, "Return": 1} | 15 | 31 | 15 | ["isinstance", "type", "isinstance", "type", "result.append", "result.append", "result.append", "result.append", "result.append", "result.append", "result.append", "extensions.items", "AssertionError", "result.append", "k.replace"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3659669_pyopenapi_pyswagger.pyswagger.scanner.v2_0.aggt_py.Aggregate._schema", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3659669_pyopenapi_pyswagger.pyswagger.scanner.v2_0.aggt_py._compose"] | The function (_compose) defined within the protected class called _CacheControl, that inherit another class.The function start at line 831 and ends at 844. It contains 14 lines of code and it has a cyclomatic complexity of 3. It takes 4 parameters, represented as [831.0], and this function return a value. It declares 1... |
pasteorg_paste | HTTPHeader | public | 0 | 0 | compose | def compose(self, **kwargs):(result, expires) = self._compose(**kwargs)return result | 1 | 3 | 2 | 23 | 0 | 846 | 848 | 739 | self,**kwargs | [] | None | {"Expr": 1} | 1 | 11 | 1 | ["NotImplementedError"] | 4 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3963858_jaraco_path.path.masks_py.compound", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.77529374_cjdrake_pyeda.pyeda.boolalg.test.test_expr_py.test_comp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Out... | The function (compose) defined within the public class called HTTPHeader.The function start at line 846 and ends at 848. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [739.0] and does not return any value. It declare 1.0 function, It has 1.0 function called i... |
pasteorg_paste | HTTPHeader | public | 0 | 0 | apply | def apply(self, collection, **kwargs):""" return the new Content-Type side-effect value """(result, filename) = self._compose(**kwargs)mimetype = CONTENT_TYPE(collection)if filename and (not mimetype or CONTENT_TYPE.UNKNOWN == mimetype):mimetype, _ = mimetypes.guess_type(filename)if mimetype and CONTENT_TYPE.UNKNOWN !=... | 6 | 9 | 3 | 82 | 0 | 850 | 859 | 850 | self,collection,**kwargs | [] | None | {"Expr": 2} | 1 | 11 | 1 | ["self.update"] | 122 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3568546_onnxbot_onnx_fb_universe.test.test_verify_py.TestVerify.test_result_different", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3636841_databio_pypiper.pypiper.manager_py.PipelineManager.get_elapsed_time", "_.... | The function (apply) defined within the public class called HTTPHeader.The function start at line 850 and ends at 859. It contains 9 lines of code and it has a cyclomatic complexity of 6. It takes 3 parameters, represented as [850.0] and does not return any value. It declare 1.0 function, It has 1.0 function called ins... |
pasteorg_paste | EnvironVariable | public | 0 | 1 | __call__ | def __call__(self, *args, **kwargs):"""Split the value on ';' incase the header includes extra attributes. E.g.IE 6 is known to send:If-Modified-Since: Sun, 25 Jun 2006 20:36:35 GMT; length=1506"""return _DateHeader.__call__(self, *args, **kwargs).split(';', 1)[0] | 1 | 2 | 3 | 35 | 0 | 869 | 875 | 869 | self,environ | [] | Returns | {"Return": 1} | 1 | 2 | 1 | ["environ.get"] | 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 EnvironVariable, that inherit another class.The function start at line 869 and ends at 875. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [869.0], and this function return a value. It declare 1.0 ... |
pasteorg_paste | HTTPHeader | public | 0 | 0 | parse | def parse(self, *args, **kwargs):value = self.__call__(*args, **kwargs)values = value.split(',')return [v.strip() for v in valuesif v.strip()] | 3 | 8 | 3 | 49 | 0 | 877 | 884 | 512 | self,*args,**kwargs | [] | None | {"Expr": 1} | 1 | 10 | 1 | ["NotImplementedError"] | 177 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3554290_abakan_zz_ablog.ablog.post_py.process_postlist", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3567358_coursera_dataduct.dataduct.pipeline.schedule_py.Schedule.__init__", "_.content.gdrive.MyDrive.Phd_Thesis... | The function (parse) defined within the public class called HTTPHeader.The function start at line 877 and ends at 884. It contains 8 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [512.0] and does not return any value. It declare 1.0 function, It has 1.0 function called ins... |
pasteorg_paste | HTTPHeader | public | 0 | 0 | parse | def parse(self, *args, **kwargs):"""Returns a tuple (units, list), where list is a sequence of(begin, end) tuples; and end is None if it was not provided."""value = self.__call__(*args, **kwargs)if not value:return Noneranges = []last_end = -1try:(units, range) = value.split("=", 1)units = units.strip().lower()for item... | 7 | 26 | 3 | 158 | 0 | 902 | 934 | 902 | self,*args,**kwargs | [] | None | {"Expr": 1} | 1 | 10 | 1 | ["NotImplementedError"] | 177 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3554290_abakan_zz_ablog.ablog.post_py.process_postlist", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3567358_coursera_dataduct.dataduct.pipeline.schedule_py.Schedule.__init__", "_.content.gdrive.MyDrive.Phd_Thesis... | The function (parse) defined within the public class called HTTPHeader.The function start at line 902 and ends at 934. It contains 26 lines of code and it has a cyclomatic complexity of 7. It takes 3 parameters, represented as [902.0] and does not return any value. It declare 1.0 function, It has 1.0 function called in... |
pasteorg_paste | HTTPHeader | public | 0 | 0 | parse | def parse(self, *args, **kwargs):"""Return a list of language tags sorted by their "q" values.For example,"en-us,en;q=0.5" should return ``["en-us", "en"]``.If there is no``Accept-Language`` header present, default to ``[]``."""header = self.__call__(*args, **kwargs)if header is None:return []langs = [v for v in header... | 9 | 21 | 3 | 181 | 0 | 942 | 968 | 942 | self,*args,**kwargs | [] | None | {"Expr": 1} | 1 | 10 | 1 | ["NotImplementedError"] | 177 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3554290_abakan_zz_ablog.ablog.post_py.process_postlist", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3567358_coursera_dataduct.dataduct.pipeline.schedule_py.Schedule.__init__", "_.content.gdrive.MyDrive.Phd_Thesis... | The function (parse) defined within the public class called HTTPHeader.The function start at line 942 and ends at 968. It contains 21 lines of code and it has a cyclomatic complexity of 9. It takes 3 parameters, represented as [942.0] and does not return any value. It declare 1.0 function, It has 1.0 function called in... |
pasteorg_paste | HTTPHeader | public | 0 | 0 | compose | def compose(self, none=None, bytes=None):if bytes:return ('bytes',)return ('none',) | 2 | 4 | 3 | 26 | 0 | 975 | 978 | 975 | self,**kwargs | [] | None | {"Expr": 1} | 1 | 11 | 1 | ["NotImplementedError"] | 4 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3963858_jaraco_path.path.masks_py.compound", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.77529374_cjdrake_pyeda.pyeda.boolalg.test.test_expr_py.test_comp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Out... | The function (compose) defined within the public class called HTTPHeader.The function start at line 975 and ends at 978. It contains 4 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [975.0] and does not return any value. It declare 1.0 function, It has 1.0 function called i... |
pasteorg_paste | HTTPHeader | public | 0 | 0 | compose | def compose(self, first_byte=None, last_byte=None, total_length=None):retval = "bytes %d-%d/%d" % (first_byte, last_byte, total_length)assert last_byte == -1 or first_byte <= last_byteassert last_byte< total_lengthreturn (retval,) | 2 | 5 | 4 | 46 | 0 | 985 | 989 | 985 | self,**kwargs | [] | None | {"Expr": 1} | 1 | 11 | 1 | ["NotImplementedError"] | 4 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3963858_jaraco_path.path.masks_py.compound", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.77529374_cjdrake_pyeda.pyeda.boolalg.test.test_expr_py.test_comp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Out... | The function (compose) defined within the public class called HTTPHeader.The function start at line 985 and ends at 989. It contains 5 lines of code and it has a cyclomatic complexity of 2. It takes 4 parameters, represented as [985.0] and does not return any value. It declare 1.0 function, It has 1.0 function called i... |
pasteorg_paste | public | public | 0 | 0 | compose.full_url | def full_url(self):return path | 1 | 2 | 1 | 7 | 0 | 1,013 | 1,014 | 1,013 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (compose.full_url) defined within the public class called public.The function start at line 1013 and ends at 1014. 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 | compose.data | def data(self):return None | 1 | 2 | 1 | 7 | 0 | 1,019 | 1,020 | 1,019 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (compose.data) defined within the public class called public.The function start at line 1019 and ends at 1020. 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 | compose.get_method | def get_method(self):return method or "GET" | 2 | 2 | 1 | 9 | 0 | 1,022 | 1,023 | 1,022 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (compose.get_method) defined within the public class called public.The function start at line 1022 and ends at 1023. It contains 2 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 | HTTPHeader | public | 0 | 0 | compose | def compose(self, digest=None, basic=None, username=None, password=None,challenge=None, path=None, method=None):assert username and passwordif basic or not challenge:assert not digestuserpass = "%s:%s" % (username.strip(), password.strip())return "Basic %s" % userpass.encode('base64').strip()assert challenge and not ba... | 6 | 24 | 8 | 187 | 0 | 996 | 1,026 | 996 | self,**kwargs | [] | None | {"Expr": 1} | 1 | 11 | 1 | ["NotImplementedError"] | 4 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3963858_jaraco_path.path.masks_py.compound", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.77529374_cjdrake_pyeda.pyeda.boolalg.test.test_expr_py.test_comp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Out... | The function (compose) defined within the public class called HTTPHeader.The function start at line 996 and ends at 1026. It contains 24 lines of code and it has a cyclomatic complexity of 6. It takes 8 parameters, represented as [996.0] and does not return any value. It declare 1.0 function, It has 1.0 function called... |
pasteorg_paste | public | public | 0 | 0 | _get_headers | def _get_headers(headers, k):"""Private function for abstracting differences in getting HTTP requestheaders on Python 2 vs. Python 3"""if hasattr(headers, 'get_all'):return headers.get_all(k) # Python 3 - email.message.Messageelse:return headers.getheaders(k)# Python 2 - mimetools.Message | 2 | 5 | 2 | 32 | 0 | 45 | 54 | 45 | headers,k | [] | Returns | {"Expr": 1, "If": 1, "Return": 2} | 3 | 10 | 3 | ["hasattr", "headers.get_all", "headers.getheaders"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.paste.httpserver_py.WSGIHandlerMixin.wsgi_setup"] | The function (_get_headers) defined within the public class called public.The function start at line 45 and ends at 54. It contains 5 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [45.0], and this function return a value. It declares 3.0 functions, It has 3.0 functions cal... |
pasteorg_paste | ContinueHook | public | 0 | 0 | __init__ | def __init__(self, rfile, write):self._ContinueFile_rfile = rfileself._ContinueFile_write = writefor attr in ('close', 'closed', 'fileno', 'flush', 'mode', 'bufsize', 'softspace'):if hasattr(rfile, attr):setattr(self, attr, getattr(rfile, attr))for attr in ('read', 'readline', 'readlines'):if hasattr(rfile, attr):setat... | 5 | 10 | 3 | 93 | 0 | 71 | 80 | 71 | self,rfile,write | [] | None | {"Assign": 2, "Expr": 2, "For": 2, "If": 2} | 6 | 10 | 6 | ["hasattr", "setattr", "getattr", "hasattr", "setattr", "getattr"] | 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 ContinueHook.The function start at line 71 and ends at 80. It contains 10 lines of code and it has a cyclomatic complexity of 5. It takes 3 parameters, represented as [71.0] and does not return any value. It declares 6.0 functions, It has 6.0 functions call... |
pasteorg_paste | ContinueHook | public | 0 | 0 | _ContinueFile_send | def _ContinueFile_send(self):self._ContinueFile_write("HTTP/1.1 100 Continue\r\n\r\n".encode('utf-8'))rfile = self._ContinueFile_rfilefor attr in ('read', 'readline', 'readlines'):if hasattr(rfile, attr):setattr(self, attr, getattr(rfile, attr)) | 3 | 6 | 1 | 53 | 0 | 82 | 87 | 82 | self | [] | None | {"Assign": 1, "Expr": 2, "For": 1, "If": 1} | 5 | 6 | 5 | ["self._ContinueFile_write", "encode", "hasattr", "setattr", "getattr"] | 0 | [] | The function (_ContinueFile_send) defined within the public class called ContinueHook.The function start at line 82 and ends at 87. It contains 6 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value. It declares 5.0 functions, and It has 5.0 fun... |
pasteorg_paste | ContinueHook | public | 0 | 0 | _ContinueFile_read | def _ContinueFile_read(self, size=-1):self._ContinueFile_send()return self._ContinueFile_rfile.read(size) | 1 | 3 | 2 | 24 | 0 | 89 | 91 | 89 | self,size | [] | Returns | {"Expr": 1, "Return": 1} | 2 | 3 | 2 | ["self._ContinueFile_send", "self._ContinueFile_rfile.read"] | 0 | [] | The function (_ContinueFile_read) defined within the public class called ContinueHook.The function start at line 89 and ends at 91. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [89.0], and this function return a value. It declares 2.0 functions, and It has ... |
pasteorg_paste | ContinueHook | public | 0 | 0 | _ContinueFile_readline | def _ContinueFile_readline(self, size=-1):self._ContinueFile_send()return self._ContinueFile_rfile.readline(size) | 1 | 3 | 2 | 24 | 0 | 93 | 95 | 93 | self,size | [] | Returns | {"Expr": 1, "Return": 1} | 2 | 3 | 2 | ["self._ContinueFile_send", "self._ContinueFile_rfile.readline"] | 0 | [] | The function (_ContinueFile_readline) defined within the public class called ContinueHook.The function start at line 93 and ends at 95. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [93.0], and this function return a value. It declares 2.0 functions, and It ... |
pasteorg_paste | ContinueHook | public | 0 | 0 | _ContinueFile_readlines | def _ContinueFile_readlines(self, sizehint=0):self._ContinueFile_send()return self._ContinueFile_rfile.readlines(sizehint) | 1 | 3 | 2 | 23 | 0 | 97 | 99 | 97 | self,sizehint | [] | Returns | {"Expr": 1, "Return": 1} | 2 | 3 | 2 | ["self._ContinueFile_send", "self._ContinueFile_rfile.readlines"] | 0 | [] | The function (_ContinueFile_readlines) defined within the public class called ContinueHook.The function start at line 97 and ends at 99. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [97.0], and this function return a value. It declares 2.0 functions, and It... |
pasteorg_paste | WSGIHandlerMixin | public | 0 | 0 | log_request | def log_request(self, *args, **kwargs):""" disable success request loggingLogging transactions should not be part of a WSGI server,if you want logging; look at paste.translogger"""pass | 1 | 2 | 3 | 13 | 0 | 111 | 117 | 111 | self,*args,**kwargs | [] | None | {"Expr": 1} | 0 | 7 | 0 | [] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69749999_dondebonair_slack_machine.tests.handlers.test_logging_py.test_request_logger_handler"] | The function (log_request) defined within the public class called WSGIHandlerMixin.The function start at line 111 and ends at 117. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [111.0] and does not return any value. It has 1.0 function calling this function w... |
pasteorg_paste | WSGIHandlerMixin | public | 0 | 0 | log_message | def log_message(self, *args, **kwargs):""" disable error message loggingLogging transactions should not be part of a WSGI server,if you want logging; look at paste.translogger"""pass | 1 | 2 | 3 | 13 | 0 | 119 | 125 | 119 | self,*args,**kwargs | [] | None | {"Expr": 1} | 0 | 7 | 0 | [] | 0 | [] | The function (log_message) defined within the public class called WSGIHandlerMixin.The function start at line 119 and ends at 125. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [119.0] and does not return any value.. |
pasteorg_paste | WSGIHandlerMixin | public | 0 | 0 | version_string | def version_string(self):""" behavior that BaseHTTPServer should have had """if not self.sys_version:return self.server_versionelse:return self.server_version + ' ' + self.sys_version | 2 | 5 | 1 | 28 | 0 | 127 | 132 | 127 | self | [] | Returns | {"Expr": 1, "If": 1, "Return": 2} | 0 | 6 | 0 | [] | 0 | [] | The function (version_string) defined within the public class called WSGIHandlerMixin.The function start at line 127 and ends at 132. 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.. |
pasteorg_paste | WSGIHandlerMixin | public | 0 | 0 | wsgi_write_chunk | def wsgi_write_chunk(self, chunk):"""Write a chunk of the output stream; send headers if theyhave not already been sent."""if not self.wsgi_headers_sent and not self.wsgi_curr_headers:raise RuntimeError("Content returned before start_response called")if not self.wsgi_headers_sent:self.wsgi_headers_sent = True(status, h... | 9 | 24 | 2 | 153 | 0 | 134 | 166 | 134 | self,chunk | [] | None | {"Assign": 9, "Expr": 6, "For": 1, "If": 6} | 10 | 33 | 10 | ["RuntimeError", "status.split", "self.send_response", "int", "k.lower", "v.lower", "self.send_header", "self.send_header", "self.end_headers", "self.wfile.write"] | 0 | [] | The function (wsgi_write_chunk) defined within the public class called WSGIHandlerMixin.The function start at line 134 and ends at 166. It contains 24 lines of code and it has a cyclomatic complexity of 9. It takes 2 parameters, represented as [134.0] and does not return any value. It declares 10.0 functions, and It h... |
pasteorg_paste | WSGIHandlerMixin | public | 0 | 0 | wsgi_start_response | def wsgi_start_response(self, status, response_headers, exc_info=None):if exc_info:try:if self.wsgi_headers_sent:raise exc_infoelse:# In this case, we're going to assume that the# higher-level code is currently handling the# issue and returning a resonable response.# self.log_error(repr(exc_info))passfinally:exc_info =... | 5 | 13 | 4 | 55 | 0 | 168 | 184 | 168 | self,status,response_headers,exc_info | [] | Returns | {"Assign": 2, "If": 3, "Return": 1, "Try": 1} | 0 | 17 | 0 | [] | 0 | [] | The function (wsgi_start_response) defined within the public class called WSGIHandlerMixin.The function start at line 168 and ends at 184. It contains 13 lines of code and it has a cyclomatic complexity of 5. It takes 4 parameters, represented as [168.0], and this function return a value.. |
pasteorg_paste | WSGIHandlerMixin | public | 0 | 0 | wsgi_setup | def wsgi_setup(self, environ=None):"""Setup the member variables used by this WSGI mixin, includingthe ``environ`` and status member variables.After the basic environment is created; the optional ``environ``argument can be used to override any settings."""dummy_url = 'http://dummy%s' % (self.path,)(scheme, netloc, path... | 19 | 69 | 2 | 513 | 0 | 186 | 285 | 186 | self,environ | [] | None | {"Assign": 25, "AugAssign": 1, "Expr": 2, "For": 1, "If": 13, "Try": 1} | 29 | 100 | 29 | ["urlsplit", "unquote", "path.endswith", "posixpath.normpath", "int", "self.headers.get", "lower", "self.headers.get", "LimitedLengthFile", "ContinueHook", "hasattr", "LimitedLengthFile", "self.headers.get", "self.headers.get", "str", "remote_address.startswith", "remote_address.startswith", "remote_address.startswith"... | 0 | [] | The function (wsgi_setup) defined within the public class called WSGIHandlerMixin.The function start at line 186 and ends at 285. It contains 69 lines of code and it has a cyclomatic complexity of 19. It takes 2 parameters, represented as [186.0] and does not return any value. It declares 29.0 functions, and It has 29... |
pasteorg_paste | WSGIHandlerMixin | public | 0 | 0 | wsgi_connection_drop | def wsgi_connection_drop(self, exce, environ=None):"""Override this if you're interested in socket exceptions, suchas when the user clicks 'Cancel' during a file download."""pass | 1 | 2 | 3 | 13 | 0 | 287 | 292 | 287 | self,exce,environ | [] | None | {"Expr": 1} | 0 | 6 | 0 | [] | 0 | [] | The function (wsgi_connection_drop) defined within the public class called WSGIHandlerMixin.The function start at line 287 and ends at 292. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [287.0] and does not return any value.. |
pasteorg_paste | WSGIHandlerMixin | public | 0 | 0 | wsgi_execute | def wsgi_execute(self, environ=None):"""Invoke the server's ``wsgi_application``."""self.wsgi_setup(environ)try:result = self.server.wsgi_application(self.wsgi_environ,self.wsgi_start_response)try:for chunk in result:self.wsgi_write_chunk(chunk)if not self.wsgi_headers_sent:self.wsgi_write_chunk(b'')finally:if hasattr(... | 8 | 26 | 2 | 141 | 0 | 294 | 324 | 294 | self,environ | [] | None | {"Assign": 4, "Expr": 7, "For": 1, "If": 3, "Return": 1, "Try": 2} | 10 | 31 | 10 | ["self.wsgi_setup", "self.server.wsgi_application", "self.wsgi_write_chunk", "self.wsgi_write_chunk", "hasattr", "result.close", "self.wsgi_connection_drop", "str", "len", "self.wsgi_write_chunk"] | 0 | [] | The function (wsgi_execute) defined within the public class called WSGIHandlerMixin.The function start at line 294 and ends at 324. It contains 26 lines of code and it has a cyclomatic complexity of 8. It takes 2 parameters, represented as [294.0] and does not return any value. It declares 10.0 functions, and It has 1... |
pasteorg_paste | ContinueHook | public | 0 | 0 | __init__ | def __init__(self, server_address, RequestHandlerClass, ssl_context=None, request_queue_size=None):assert not ssl_context, "pyOpenSSL not installed"HTTPServer.__init__(self, server_address, RequestHandlerClass)if request_queue_size:self.socket.listen(request_queue_size) | 2 | 6 | 5 | 43 | 0 | 341 | 346 | 341 | self,rfile,write | [] | None | {"Assign": 2, "Expr": 2, "For": 2, "If": 2} | 6 | 10 | 6 | ["hasattr", "setattr", "getattr", "hasattr", "setattr", "getattr"] | 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 ContinueHook.The function start at line 341 and ends at 346. It contains 6 lines of code and it has a cyclomatic complexity of 2. It takes 5 parameters, represented as [341.0] and does not return any value. It declares 6.0 functions, It has 6.0 functions ca... |
pasteorg_paste | ContinueHook | public | 0 | 0 | __init__ | def __init__(self, conn):self.__conn = conn | 1 | 2 | 2 | 12 | 0 | 351 | 352 | 351 | self,rfile,write | [] | None | {"Assign": 2, "Expr": 2, "For": 2, "If": 2} | 6 | 10 | 6 | ["hasattr", "setattr", "getattr", "hasattr", "setattr", "getattr"] | 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 ContinueHook.The function start at line 351 and ends at 352. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [351.0] and does not return any value. It declares 6.0 functions, It has 6.0 functions ca... |
pasteorg_paste | public | public | 0 | 0 | makefile | def makefile(self, mode, bufsize):return socket.SocketIO(self.__conn, mode) | 1 | 2 | 3 | 20 | 0 | 353 | 354 | 353 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (makefile) defined within the public class called public.The function start at line 353 and ends at 354. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [353.0] and does not return any value.. |
pasteorg_paste | public | public | 0 | 0 | __getattr__ | def __getattr__(self, attrib):return getattr(self.__conn, attrib) | 1 | 2 | 2 | 16 | 0 | 355 | 356 | 355 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (__getattr__) defined within the public class called public.The function start at line 355 and ends at 356. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [355.0] and does not return any value.. |
pasteorg_paste | public | public | 0 | 0 | __init__.settimeout | def settimeout(self, *args):self._lock.acquire()try:return self._ssl_conn.settimeout(*args)finally:self._lock.release() | 2 | 6 | 2 | 36 | 0 | 382 | 387 | 382 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (__init__.settimeout) defined within the public class called public.The function start at line 382 and ends at 387. It contains 6 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [382.0] and does not return any value.. |
pasteorg_paste | public | public | 0 | 0 | __init__.gettimeout | def gettimeout(self):self._lock.acquire()try:return self._ssl_conn.gettimeout()finally:self._lock.release() | 2 | 6 | 1 | 31 | 0 | 388 | 393 | 388 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (__init__.gettimeout) defined within the public class called public.The function start at line 388 and ends at 393. It contains 6 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value.. |
pasteorg_paste | ContinueHook | public | 0 | 0 | __init__ | def __init__(self, server_address, RequestHandlerClass, ssl_context=None, request_queue_size=None):# This overrides the implementation of __init__ in python's# SocketServer.TCPServer (which BaseHTTPServer.HTTPServer# does not override, thankfully).HTTPServer.__init__(self, server_address, RequestHandlerClass)self.socke... | 3 | 15 | 5 | 96 | 0 | 371 | 398 | 371 | self,rfile,write | [] | None | {"Assign": 2, "Expr": 2, "For": 2, "If": 2} | 6 | 10 | 6 | ["hasattr", "setattr", "getattr", "hasattr", "setattr", "getattr"] | 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 ContinueHook.The function start at line 371 and ends at 398. It contains 15 lines of code and it has a cyclomatic complexity of 3. It takes 5 parameters, represented as [371.0] and does not return any value. It declares 6.0 functions, It has 6.0 functions c... |
pasteorg_paste | WSGIServerBase | public | 0 | 1 | get_request | def get_request(self):# The default SSL request object does not seem to have a# ``makefile(mode, bufsize)`` method as expected by# Socketserver.StreamRequestHandler.(conn, info) = self.socket.accept()if self.ssl_context:conn = _ConnFixer(conn)return (conn, info) | 2 | 5 | 1 | 35 | 0 | 400 | 407 | 400 | self | [] | Returns | {"Assign": 1, "Expr": 1, "If": 1, "Return": 1} | 2 | 6 | 2 | ["SecureHTTPServer.get_request", "conn.settimeout"] | 204 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69847433_requests_cache_requests_cache.tests.unit.test_session_py.test_normalize_params__url", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.80560341_prozorroukr_openprocurement_api.src.openprocurement.api.database_... | The function (get_request) defined within the public class called WSGIServerBase, that inherit another class.The function start at line 400 and ends at 407. 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 declares 2.0 f... |
pasteorg_paste | public | public | 0 | 0 | _auto_ssl_context | def _auto_ssl_context():import OpenSSL, randompkey = OpenSSL.crypto.PKey()pkey.generate_key(OpenSSL.crypto.TYPE_RSA, 768)cert = OpenSSL.crypto.X509()cert.set_serial_number(random.randint(0, sys.maxint))cert.gmtime_adj_notBefore(0)cert.gmtime_adj_notAfter(60 * 60 * 24 * 365)cert.get_subject().CN = '*'cert.get_subject().... | 1 | 18 | 0 | 145 | 0 | 409 | 430 | 409 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (_auto_ssl_context) defined within the public class called public.The function start at line 409 and ends at 430. It contains 18 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
pasteorg_paste | WSGIHandler | public | 0 | 1 | handle_one_request | def handle_one_request(self):"""Handle a single HTTP request.You normally don't need to override this method; see the class__doc__ string for information on how to handle specific HTTPcommands such as GET and POST."""self.raw_requestline = self.rfile.readline()if not self.raw_requestline:self.close_connection = 1return... | 3 | 8 | 1 | 43 | 0 | 439 | 453 | 439 | self | [] | None | {"Assign": 2, "Expr": 2, "If": 2, "Return": 2} | 3 | 15 | 3 | ["self.rfile.readline", "self.parse_request", "self.wsgi_execute"] | 0 | [] | The function (handle_one_request) defined within the public class called WSGIHandler, that inherit another class.The function start at line 439 and ends at 453. It contains 8 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value. It declares 3.0 f... |
pasteorg_paste | WSGIHandler | public | 0 | 1 | handle | def handle(self):# don't bother logging disconnects while handling a requesttry:BaseHTTPRequestHandler.handle(self)except SocketErrors as exce:self.wsgi_connection_drop(exce) | 2 | 5 | 1 | 24 | 0 | 455 | 460 | 455 | self | [] | None | {"Expr": 2, "Try": 1} | 2 | 6 | 2 | ["BaseHTTPRequestHandler.handle", "self.wsgi_connection_drop"] | 22 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3636841_databio_pypiper.pypiper.utils_py.check_all_commands", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3670790_opencivicdata_pupa.pupa.cli.__main___py.main", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creatio... | The function (handle) defined within the public class called WSGIHandler, that inherit another class.The function start at line 455 and ends at 460. It contains 5 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 2.0 functions, It... |
pasteorg_paste | WSGIHandler | public | 0 | 1 | address_string | def address_string(self):"""Return the client address formatted for logging.This is overridden so that no hostname lookup is done."""return '' | 1 | 2 | 1 | 8 | 0 | 462 | 467 | 462 | self | [] | Returns | {"Expr": 1, "Return": 1} | 0 | 6 | 0 | [] | 0 | [] | The function (address_string) defined within the public class called WSGIHandler, that inherit another class.The function start at line 462 and ends at 467. 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 | ContinueHook | public | 0 | 0 | __init__ | def __init__(self, file, length):self.file = fileself.length = lengthself._consumed = 0if hasattr(self.file, 'seek'):self.seek = self._seek | 2 | 6 | 3 | 41 | 0 | 470 | 475 | 470 | self,rfile,write | [] | None | {"Assign": 2, "Expr": 2, "For": 2, "If": 2} | 6 | 10 | 6 | ["hasattr", "setattr", "getattr", "hasattr", "setattr", "getattr"] | 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 ContinueHook.The function start at line 470 and ends at 475. It contains 6 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [470.0] and does not return any value. It declares 6.0 functions, It has 6.0 functions ca... |
pasteorg_paste | LimitedLengthFile | public | 0 | 0 | __repr__ | def __repr__(self):base_repr = repr(self.file)return base_repr[:-1] + ' length=%s>' % self.length | 1 | 3 | 1 | 26 | 0 | 477 | 479 | 477 | self | [] | Returns | {"Assign": 1, "Return": 1} | 1 | 3 | 1 | ["repr"] | 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 LimitedLengthFile.The function start at line 477 and ends at 479. It contains 3 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 ... |
pasteorg_paste | LimitedLengthFile | public | 0 | 0 | read | def read(self, length=None):left = self.length - self._consumedif length is None:length = leftelse:length = min(length, left)# next two lines are hnecessary only if read(0) blocksif not left:return b''data = self.file.read(length)self._consumed += len(data)return data | 3 | 11 | 2 | 63 | 0 | 481 | 492 | 481 | self,length | [] | Returns | {"Assign": 4, "AugAssign": 1, "If": 2, "Return": 2} | 3 | 12 | 3 | ["min", "self.file.read", "len"] | 423 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.dbus_unit_test_py.dbus_cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3474748_nzjrs_gnome_tweak_tool.gtweak.utils_py.AutostartFile.is_start_at_login_enabled", ... | The function (read) defined within the public class called LimitedLengthFile.The function start at line 481 and ends at 492. It contains 11 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [481.0], and this function return a value. It declares 3.0 functions, It has 3.0 functi... |
pasteorg_paste | LimitedLengthFile | public | 0 | 0 | readline | def readline(self, *args):max_read = self.length - self._consumedif len(args):max_read = min(args[0], max_read)data = self.file.readline(max_read)self._consumed += len(data)return data | 2 | 7 | 2 | 54 | 0 | 494 | 500 | 494 | self,*args | [] | Returns | {"Assign": 3, "AugAssign": 1, "If": 1, "Return": 1} | 4 | 7 | 4 | ["len", "min", "self.file.readline", "len"] | 5 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3928915_donnemartin_gitsome.xonsh.tokenize_py._tokenize", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3928915_donnemartin_gitsome.xonsh.tokenize_py.detect_encoding", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Cr... | The function (readline) defined within the public class called LimitedLengthFile.The function start at line 494 and ends at 500. It contains 7 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [494.0], and this function return a value. It declares 4.0 functions, It has 4.0 fun... |
pasteorg_paste | LimitedLengthFile | public | 0 | 0 | readlines | def readlines(self, hint=None):data = self.file.readlines(hint)for chunk in data:self._consumed += len(chunk)return data | 2 | 5 | 2 | 34 | 0 | 502 | 506 | 502 | self,hint | [] | Returns | {"Assign": 1, "AugAssign": 1, "For": 1, "Return": 1} | 2 | 5 | 2 | ["self.file.readlines", "len"] | 18 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3567358_coursera_dataduct.examples.resources.scripts.s3_profiler_py.run_command", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3675202_galaxyproject_galaxy_lib.galaxy.jobs.metrics.instrumenters.env_py.EnvPlugin.job... | The function (readlines) defined within the public class called LimitedLengthFile.The function start at line 502 and ends at 506. It contains 5 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [502.0], and this function return a value. It declares 2.0 functions, It has 2.0 fu... |
pasteorg_paste | LimitedLengthFile | public | 0 | 0 | __iter__ | def __iter__(self):return self | 1 | 2 | 1 | 7 | 0 | 508 | 509 | 508 | self | [] | Returns | {"Return": 1} | 0 | 2 | 0 | [] | 17 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3593274_stevenproctor_planet_erlang.planet.vendor.html5lib.treebuilders.soup_py.AttrList.__iter__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3621460_cos_archives_modular_odm.modularodm.fields.lists_py.BaseForei... | The function (__iter__) defined within the public class called LimitedLengthFile.The function start at line 508 and ends at 509. 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 has 17.0 functions calling this function w... |
pasteorg_paste | LimitedLengthFile | public | 0 | 0 | next | def next(self):if self.length - self._consumed <= 0:raise StopIterationreturn self.readline() | 2 | 4 | 1 | 24 | 0 | 511 | 514 | 511 | self | [] | Returns | {"If": 1, "Return": 1} | 1 | 4 | 1 | ["self.readline"] | 984 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.Package.build_system", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.endpoint_py.Endpoint.get", "_.content... | The function (next) defined within the public class called LimitedLengthFile.The function start at line 511 and ends at 514. 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, It has 1.0 function call... |
pasteorg_paste | LimitedLengthFile | public | 0 | 0 | _seek | def _seek(self, place):self.file.seek(place)self._consumed = place | 1 | 3 | 2 | 20 | 0 | 519 | 521 | 519 | self,place | [] | None | {"Assign": 1, "Expr": 1} | 1 | 3 | 1 | ["self.file.seek"] | 0 | [] | The function (_seek) defined within the public class called LimitedLengthFile.The function start at line 519 and ends at 521. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [519.0] and does not return any value. It declare 1.0 function, and It has 1.0 functio... |
pasteorg_paste | LimitedLengthFile | public | 0 | 0 | tell | def tell(self):if hasattr(self.file, 'tell'):try:return self.file.tell()except io.UnsupportedOperation:passreturn self._consumed | 3 | 7 | 1 | 35 | 0 | 523 | 529 | 523 | self | [] | Returns | {"If": 1, "Return": 2, "Try": 1} | 2 | 7 | 2 | ["hasattr", "self.file.tell"] | 3 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3595150_twisted_txaws.txaws.client._producers_py.FileBodyProducer._determineLength", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.87138903_intel_bmap_tools.bmaptools.TransRead_py.TransRead.tell", "_.content.gdrive.... | The function (tell) defined within the public class called LimitedLengthFile.The function start at line 523 and ends at 529. 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 2.0 functions, It has 2.0 functions c... |
pasteorg_paste | ContinueHook | public | 0 | 0 | __init__ | def __init__(self, nworkers, name="ThreadPool", daemon=False,max_requests=100, # threads are killed after this many requestshung_thread_limit=30, # when a thread is marked "hung"kill_thread_limit=1800, # when you kill that hung threaddying_limit=300, # seconds that a kill should take to go into effect (longer than this... | 7 | 51 | 13 | 270 | 0 | 580 | 640 | 580 | self,rfile,write | [] | None | {"Assign": 2, "Expr": 2, "For": 2, "If": 2} | 6 | 10 | 6 | ["hasattr", "setattr", "getattr", "hasattr", "setattr", "getattr"] | 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 ContinueHook.The function start at line 580 and ends at 640. It contains 51 lines of code and it has a cyclomatic complexity of 7. It takes 13 parameters, represented as [580.0] and does not return any value. It declares 6.0 functions, It has 6.0 functions ... |
pasteorg_paste | ThreadPool | public | 0 | 0 | add_task | def add_task(self, task):"""Add a task to the queue"""self.logger.debug('Added task (%i tasks queued)', self.queue.qsize())if self.hung_check_period:self.requests_since_last_hung_check += 1if self.requests_since_last_hung_check > self.hung_check_period:self.requests_since_last_hung_check = 0self.kill_hung_threads()if n... | 15 | 41 | 2 | 311 | 0 | 642 | 689 | 642 | self,task | [] | None | {"Assign": 5, "AugAssign": 2, "Expr": 11, "For": 3, "If": 8} | 23 | 48 | 23 | ["self.logger.debug", "self.queue.qsize", "self.kill_hung_threads", "time.time", "self.logger.debug", "hasattr", "self.worker_tracker.get", "self.logger.info", "time.time", "range", "self.add_worker_thread", "self.logger.debug", "len", "len", "time.time", "self.logger.info", "len", "len", "self.logger.debug", "range", ... | 11 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3954392_modorganizer2_modorganizer_umbrella.unibuild.manager_py.register_project", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69376580_substra_substra_tests.substratest.client_py.Client.add_task", "_.content.gdri... | The function (add_task) defined within the public class called ThreadPool.The function start at line 642 and ends at 689. It contains 41 lines of code and it has a cyclomatic complexity of 15. It takes 2 parameters, represented as [642.0] and does not return any value. It declares 23.0 functions, It has 23.0 functions ... |
pasteorg_paste | ThreadPool | public | 0 | 0 | track_threads | def track_threads(self):"""Return a dict summarizing the threads in the pool (asdescribed in the ThreadPool docstring)."""result = dict(idle=[], busy=[], hung=[], dying=[], zombie=[])now = time.time()for worker in self.workers:if not hasattr(worker, 'thread_id'):# The worker hasn't fully started up, we should just# ign... | 9 | 29 | 1 | 206 | 0 | 691 | 726 | 691 | self | [] | Returns | {"Assign": 3, "Expr": 7, "For": 2, "If": 5, "Return": 1, "Try": 1} | 12 | 36 | 12 | ["dict", "time.time", "hasattr", "self.worker_tracker.get", "append", "append", "append", "self.dying_threads.items", "self.thread_exists", "self.logger.info", "append", "append"] | 0 | [] | The function (track_threads) defined within the public class called ThreadPool.The function start at line 691 and ends at 726. It contains 29 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 12.0 functions, and It has 12.0 f... |
pasteorg_paste | ThreadPool | public | 0 | 0 | kill_worker | def kill_worker(self, thread_id):"""Removes the worker with the given thread_id from the pool, andreplaces it with a new worker thread.This should only be done for mis-behaving workers."""if killthread is None:raise RuntimeError("Cannot kill worker; killthread/ctypes not available")thread_obj = threading._active.get(th... | 5 | 18 | 2 | 106 | 0 | 728 | 752 | 728 | self,thread_id | [] | None | {"Assign": 2, "Expr": 5, "If": 2, "Try": 2} | 7 | 25 | 7 | ["RuntimeError", "threading._active.get", "killthread.async_raise", "self.logger.info", "self.workers.remove", "time.time", "self.add_worker_thread"] | 0 | [] | The function (kill_worker) defined within the public class called ThreadPool.The function start at line 728 and ends at 752. It contains 18 lines of code and it has a cyclomatic complexity of 5. It takes 2 parameters, represented as [728.0] and does not return any value. It declares 7.0 functions, and It has 7.0 funct... |
pasteorg_paste | ThreadPool | public | 0 | 0 | thread_exists | def thread_exists(self, thread_id):"""Returns true if a thread with this id is still running"""return thread_id in threading._active | 1 | 2 | 2 | 14 | 0 | 754 | 758 | 754 | self,thread_id | [] | Returns | {"Expr": 1, "Return": 1} | 0 | 5 | 0 | [] | 0 | [] | The function (thread_exists) defined within the public class called ThreadPool.The function start at line 754 and ends at 758. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [754.0], and this function return a value.. |
pasteorg_paste | ThreadPool | public | 0 | 0 | add_worker_thread | def add_worker_thread(self, *args, **kwargs):index = next(self._worker_count)worker = threading.Thread(target=self.worker_thread_callback,args=args, kwargs=kwargs,name=("worker %d" % index))worker.daemon = self.daemonworker.start() | 1 | 7 | 3 | 59 | 0 | 760 | 766 | 760 | self,*args,**kwargs | [] | None | {"Assign": 3, "Expr": 1} | 3 | 7 | 3 | ["next", "threading.Thread", "worker.start"] | 0 | [] | The function (add_worker_thread) defined within the public class called ThreadPool.The function start at line 760 and ends at 766. It contains 7 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [760.0] and does not return any value. It declares 3.0 functions, and It has 3.0 ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.