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_pastescript | CreateDistroCommandTest | public | 0 | 1 | setUp | def setUp(self):self.cmd = create_distro.CreateDistroCommand('create_distro') | 1 | 2 | 1 | 15 | 0 | 175 | 176 | 89 | self | [] | None | {"Assign": 1} | 1 | 2 | 1 | ["create_distro.CreateDistroCommand"] | 452 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3508200_spiral_project_daybed.daybed.tests.test_backend_py.TestCouchDBBackend.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3508200_spiral_project_daybed.daybed.tests.test_backend_py.TestMemoryBackend.setUp"... | The function (setUp) defined within the public class called CreateDistroCommandTest, that inherit another class.The function start at line 175 and ends at 176. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 fun... |
pasteorg_pastescript | EntryPointsTest | public | 0 | 1 | test_paster_command | def test_paster_command(self):# Issue #20: Check that SuperGeneric works on Python 3paster = textwrap.dedent('''create = paste.script.create_distro:CreateDistroCommand(self, name)exe = paste.script.exe:ExeCommand(self, name)help = paste.script.help:HelpCommand(self, name)make-config = paste.script.appinstall:MakeConfig... | 1 | 26 | 1 | 59 | 0 | 178 | 205 | 178 | self | [] | None | {"Assign": 3, "Expr": 2, "With": 1} | 7 | 28 | 7 | ["strip", "textwrap.dedent", "capture_stdout", "self.cmd.run", "self.assertEqual", "stdout.getvalue", "self.assertIn"] | 0 | [] | The function (test_paster_command) defined within the public class called EntryPointsTest, that inherit another class.The function start at line 178 and ends at 205. It contains 26 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares... |
pasteorg_pastescript | PostTest | public | 0 | 1 | test_post | def test_post(self):config = os.path.join('docs', 'example_app.ini')url = '/'with capture_stdout() as stdout:stdout.buffer = io.BytesIO()try:command.run(['post', config, url])except SystemExit as exc:self.assertEqual(exc.code, 0)else:self.fail("SystemExit not raised")out = stdout.buffer.getvalue()out = out.decode('utf-... | 2 | 26 | 1 | 127 | 0 | 211 | 236 | 211 | self | [] | None | {"Assign": 8, "Expr": 4, "Try": 1, "With": 1} | 12 | 26 | 12 | ["os.path.join", "capture_stdout", "io.BytesIO", "command.run", "self.assertEqual", "self.fail", "stdout.buffer.getvalue", "out.decode", "strip", "textwrap.dedent", "re.compile", "self.assertRegex"] | 0 | [] | The function (test_post) defined within the public class called PostTest, that inherit another class.The function start at line 211 and ends at 236. It contains 26 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 12.0 functions, ... |
pasteorg_pastescript | public | public | 0 | 0 | test_egg_info | def test_egg_info():egg_dir = os.path.join(os.path.dirname(__file__), 'fake_packages', 'FakePlugin.egg')found = pluginlib.find_egg_info_dir(os.path.join(egg_dir, 'fakeplugin'))assert found == os.path.join(egg_dir, 'FakePlugin.egg-info')found = pluginlib.find_egg_info_dir(os.path.dirname(__file__))assert found == os.pat... | 1 | 9 | 0 | 97 | 2 | 4 | 12 | 4 | ['egg_dir', 'found'] | None | {"Assign": 3} | 10 | 9 | 10 | ["os.path.join", "os.path.dirname", "pluginlib.find_egg_info_dir", "os.path.join", "os.path.join", "pluginlib.find_egg_info_dir", "os.path.dirname", "os.path.join", "os.path.dirname", "os.path.dirname"] | 0 | [] | The function (test_egg_info) defined within the public class called public.The function start at line 4 and ends at 12. It contains 9 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 10.0 functions, and It has 10.0 functions cal... | |
pasteorg_pastescript | public | public | 0 | 0 | test_resolve_plugins | def test_resolve_plugins():plugins = ['FakePlugin']all = pluginlib.resolve_plugins(plugins)assert allassert len(all) == 2 | 1 | 5 | 0 | 26 | 2 | 14 | 18 | 14 | ['all', 'plugins'] | None | {"Assign": 2} | 2 | 5 | 2 | ["pluginlib.resolve_plugins", "len"] | 0 | [] | The function (test_resolve_plugins) defined within the public class called public.The function start at line 14 and ends at 18. It contains 5 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 functions, and It has 2.0 functio... | |
pasteorg_pastescript | public | public | 0 | 0 | test_find_commands | def test_find_commands():all = pluginlib.resolve_plugins(['PasteScript', 'FakePlugin'])commands = pluginlib.load_commands_from_plugins(all)print(commands)assert 'testcom' in commands | 1 | 5 | 0 | 32 | 2 | 20 | 24 | 20 | ['commands', 'all'] | None | {"Assign": 2, "Expr": 1} | 3 | 5 | 3 | ["pluginlib.resolve_plugins", "pluginlib.load_commands_from_plugins", "print"] | 0 | [] | The function (test_find_commands) defined within the public class called public.The function start at line 20 and ends at 24. It contains 5 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 3.0 functions, and It has 3.0 functions... | |
pasteorg_pastescript | public | public | 0 | 0 | message | def message(s):sys.stdout.write("%s\n" % s) | 1 | 2 | 1 | 15 | 0 | 34 | 35 | 34 | s | [] | None | {"Expr": 1} | 1 | 2 | 1 | ["sys.stdout.write"] | 4 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3701896_chainer_chainer_chemistry.tests.links_tests.update_tests.test_mpnn_update_py.check_message_forward", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3959997_grafeasgroup_tor.tor.test.core.test_admin_commands_p... | The function (message) defined within the public class called public.The function start at line 34 and ends at 35. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, It has 1.0 function called inside whic... |
pasteorg_pastescript | public | public | 0 | 0 | test4 | def test4():for i in range(5):conf = globals()['config%d' % i]sys.stdout.write('config%d: ' % i)loggerDict = logging.getLogger().manager.loggerDictwith logging._lock:saved_handlers = logging._handlers.copy()if hasattr(logging, '_handlerList'):saved_handler_list = logging._handlerList[:]saved_loggers = loggerDict.copy()... | 7 | 35 | 0 | 227 | 8 | 118 | 153 | 118 | ['fn', 'saved_handler_list', 'loggerDict', 't', 'saved_loggers', 'saved_handlers', 'f', 'conf'] | None | {"Assign": 10, "Expr": 12, "For": 1, "If": 3, "Try": 2, "With": 2} | 24 | 36 | 24 | ["range", "globals", "sys.stdout.write", "logging.getLogger", "logging._handlers.copy", "hasattr", "loggerDict.copy", "tempfile.mktemp", "open", "f.write", "f.close", "logging_config.fileConfig", "logging_config.fileConfig", "sys.exc_info", "message", "str", "message", "os.remove", "logging._handlers.clear", "logging._... | 0 | [] | The function (test4) defined within the public class called public.The function start at line 118 and ends at 153. It contains 35 lines of code and it has a cyclomatic complexity of 7. The function does not take any parameters and does not return any value. It declares 24.0 functions, and It has 24.0 functions called ... | |
pasteorg_pastescript | FriendlyFormatter | public | 0 | 1 | formatException | def formatException(self, ei):return "%s... Don't panic!" % str(ei[0]) | 1 | 2 | 2 | 17 | 0 | 187 | 188 | 187 | self,ei | [] | Returns | {"Return": 1} | 1 | 2 | 1 | ["str"] | 0 | [] | The function (formatException) defined within the public class called FriendlyFormatter, that inherit another class.The function start at line 187 and ends at 188. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [187.0], and this function return a value. It dec... |
pasteorg_pastescript | public | public | 0 | 0 | test5 | def test5():loggerDict = logging.getLogger().manager.loggerDictwith logging._lock:saved_handlers = logging._handlers.copy()if hasattr(logging, '_handlerList'):saved_handler_list = logging._handlerList[:]saved_loggers = loggerDict.copy()try:fn = tempfile.mktemp(".ini")f = open(fn, "w")f.write(test5_config)f.close()loggi... | 5 | 29 | 0 | 190 | 7 | 191 | 219 | 191 | ['fn', 'saved_handler_list', 'loggerDict', 'saved_loggers', 'saved_handlers', 'f', 'hdlr'] | None | {"Assign": 9, "Expr": 10, "If": 2, "Try": 2, "With": 2} | 20 | 29 | 20 | ["logging.getLogger", "logging._handlers.copy", "hasattr", "loggerDict.copy", "tempfile.mktemp", "open", "f.write", "f.close", "logging_config.fileConfig", "logging.exception", "os.remove", "logging.getLogger", "handlers.remove", "logging.getLogger", "logging._handlers.clear", "logging._handlers.update", "hasattr", "lo... | 0 | [] | The function (test5) defined within the public class called public.The function start at line 191 and ends at 219. It contains 29 lines of code and it has a cyclomatic complexity of 5. The function does not take any parameters and does not return any value. It declares 20.0 functions, and It has 20.0 functions called ... | |
pasteorg_pastescript | public | public | 0 | 0 | plugin_lines | def plugin_lines():if not os.path.exists(plugin_file):return []f = open(plugin_file)lines = f.readlines()f.close()return [l.strip() for l in lines if l.strip()] | 4 | 7 | 0 | 54 | 2 | 9 | 15 | 9 | ['lines', 'f'] | Returns | {"Assign": 2, "Expr": 1, "If": 1, "Return": 2} | 6 | 7 | 6 | ["os.path.exists", "open", "f.readlines", "f.close", "l.strip", "l.strip"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051046_pasteorg_pastescript.tests.test_plugin_adder_py.test_add_remove"] | The function (plugin_lines) defined within the public class called public.The function start at line 9 and ends at 15. It contains 7 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters, and this function return a value. It declares 6.0 functions, It has 6.0 functions called ... | |
pasteorg_pastescript | public | public | 0 | 0 | test_add_remove | def test_add_remove():prev = plugin_lines()pluginlib.add_plugin(egg_dir, 'Test')assert 'Test' in plugin_lines()pluginlib.remove_plugin(egg_dir, 'Test')assert 'Test' not in plugin_lines()assert prev == plugin_lines()if not prev and os.path.exists(plugin_file):os.unlink(plugin_file) | 3 | 9 | 0 | 63 | 1 | 17 | 25 | 17 | ['prev'] | None | {"Assign": 1, "Expr": 3, "If": 1} | 8 | 9 | 8 | ["plugin_lines", "pluginlib.add_plugin", "plugin_lines", "pluginlib.remove_plugin", "plugin_lines", "plugin_lines", "os.path.exists", "os.unlink"] | 0 | [] | The function (test_add_remove) defined within the public class called public.The function start at line 17 and ends at 25. It contains 9 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value. It declares 8.0 functions, and It has 8.0 functions ca... | |
pasteorg_pastescript | public | public | 0 | 0 | test_find | def test_find():try:import Cheetah.Templateexcept ImportError:raise SkipTest("need Cheetah.Template")vars = templates.find_args_in_dir(tmpl_dir, True)assert 'a' in varsassert vars['a'].default is templates.NoDefaultassert 'b' in varsassert vars['b'].default == 1assert len(vars) == 2 | 2 | 11 | 0 | 63 | 1 | 7 | 18 | 7 | ['vars'] | None | {"Assign": 1, "Try": 1} | 3 | 12 | 3 | ["SkipTest", "templates.find_args_in_dir", "len"] | 0 | [] | The function (test_find) defined within the public class called public.The function start at line 7 and ends at 18. It contains 11 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 3.0 functions, and It has 3.0 functions called i... | |
pasteorg_pastescript | public | public | 0 | 0 | test_random | def test_random():for length in (1, 10, 100):data = secret.random_bytes(length)assert isinstance(data, bytes)assert len(data) == length | 2 | 5 | 0 | 37 | 1 | 3 | 7 | 3 | ['data'] | None | {"Assign": 1, "For": 1} | 3 | 5 | 3 | ["secret.random_bytes", "isinstance", "len"] | 0 | [] | The function (test_random) defined within the public class called public.The function start at line 3 and ends at 7. 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 3.0 functions, and It has 3.0 functions called i... | |
pasteorg_pastescript | public | public | 0 | 0 | test_secret_string | def test_secret_string():data = secret.secret_string()assert isinstance(data, str)data = secret.secret_string(20)assert isinstance(data, str)assert len(data) == 20 | 1 | 6 | 0 | 40 | 1 | 9 | 15 | 9 | ['data'] | None | {"Assign": 2} | 5 | 7 | 5 | ["secret.secret_string", "isinstance", "secret.secret_string", "isinstance", "len"] | 0 | [] | The function (test_secret_string) defined within the public class called public.The function start at line 9 and ends at 15. It contains 6 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 5.0 functions, and It has 5.0 functions ... | |
pasteorg_pastescript | public | public | 0 | 0 | svn_repos_setup | def svn_repos_setup():res = testenv.run('svnadmin', 'create', 'REPOS',printresult=False)testenv.svn_url = 'file://' + testenv.base_path + '/REPOS'assert 'REPOS' in res.files_createdtestenv.ignore_paths.append('REPOS') | 1 | 6 | 0 | 45 | 1 | 24 | 29 | 24 | ['res'] | None | {"Assign": 2, "Expr": 1} | 2 | 6 | 2 | ["testenv.run", "testenv.ignore_paths.append"] | 0 | [] | The function (svn_repos_setup) defined within the public class called public.The function start at line 24 and ends at 29. It contains 6 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 functions, and It has 2.0 functions ca... | |
pasteorg_pastescript | public | public | 0 | 0 | paster_create | def paster_create():global projenvres = testenv.run('paster', 'create', '--verbose','--svn-repository=' + testenv.svn_url,'--template=paste_deploy','--template=webkit','--template=zpt','--no-interactive','ProjectName','version=0.1','author=Test Author','author_email=test@example.com')expect_fn = ['tests', 'docs', 'proj... | 2 | 43 | 0 | 246 | 7 | 31 | 75 | 31 | ['fn', 'res', 'sitepage', 'setup', 'proj_dir', 'projenv', 'expect_fn'] | None | {"Assign": 9, "Expr": 8, "For": 1} | 14 | 45 | 14 | ["testenv.run", "os.path.join", "setup.mustcontain", "setup.mustcontain", "setup.mustcontain", "setup.mustcontain", "setup.mustcontain", "os.path.join", "testenv.run", "testenv.run", "testenv.run", "TestFileEnvironment", "os.path.join", "projenv.environ.get"] | 0 | [] | The function (paster_create) defined within the public class called public.The function start at line 31 and ends at 75. It contains 43 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 14.0 functions, and It has 14.0 functions c... | |
pasteorg_pastescript | public | public | 0 | 0 | make_servlet | def make_servlet():res = projenv.run('paster servlet --verbose --simulate test1',cwd=projenv.proj_dir)assert not res.files_created and not res.files_updatedres = projenv.run('paster servlet -vvv test1')assert 'projectname/web/test1.py' in res.files_createdassert 'projectname/templates/test1.pt' in res.files_createdres ... | 2 | 16 | 0 | 104 | 1 | 77 | 93 | 77 | ['res'] | None | {"Assign": 5} | 5 | 17 | 5 | ["projenv.run", "projenv.run", "projenv.run", "projenv.run", "projenv.run"] | 0 | [] | The function (make_servlet) defined within the public class called public.The function start at line 77 and ends at 93. It contains 16 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 5.0 functions, and It has 5.0 functions call... | |
pasteorg_pastescript | public | public | 0 | 0 | do_pytest | def do_pytest():res = projenv.run('py.test tests/',cwd=os.path.join(testenv.cwd, 'ProjectName'),expect_stderr=True)assert len(res.stderr.splitlines()) <= 1, ("Too much info on stderr: %s" % res.stderr) | 1 | 6 | 0 | 52 | 1 | 95 | 100 | 95 | ['res'] | None | {"Assign": 1} | 4 | 6 | 4 | ["projenv.run", "os.path.join", "len", "res.stderr.splitlines"] | 0 | [] | The function (do_pytest) defined within the public class called public.The function start at line 95 and ends at 100. It contains 6 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 4.0 functions, and It has 4.0 functions called ... | |
pasteorg_pastescript | public | public | 0 | 0 | config_permissions | def config_permissions():projenv.writefile('ProjectName.egg-info/iscape.txt',frompath='iscape.txt')projenv.writefile('projectname/web/admin/index.py',frompath='admin_index.py')projenv.writefile('tests/test_forbidden.py',frompath='test_forbidden.py')res = projenv.run('py.test tests/test_forbidden.py',expect_stderr=True)... | 1 | 11 | 0 | 67 | 1 | 102 | 112 | 102 | ['res'] | None | {"Assign": 1, "Expr": 3} | 6 | 11 | 6 | ["projenv.writefile", "projenv.writefile", "projenv.writefile", "projenv.run", "len", "res.stderr.splitlines"] | 0 | [] | The function (config_permissions) defined within the public class called public.The function start at line 102 and ends at 112. It contains 11 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 6.0 functions, and It has 6.0 functi... | |
pasteorg_pastescript | public | public | 0 | 0 | make_tag | def make_tag():global tagenvres = projenv.run('svn commit -m "updates"')res = projenv.run('python setup.py svntag --version=0.5')assert 'Tagging 0.5 version' in res.stdoutassert 'Auto-update of version strings' in res.stdoutres = testenv.run('svn co %s/ProjectName/tags/0.5 Proj-05'% testenv.svn_url)setup = res.files_cr... | 1 | 15 | 0 | 92 | 3 | 114 | 128 | 114 | ['res', 'tagenv', 'setup'] | None | {"Assign": 5, "Expr": 1} | 6 | 15 | 6 | ["projenv.run", "projenv.run", "testenv.run", "setup.mustcontain", "TestFileEnvironment", "os.path.join"] | 0 | [] | The function (make_tag) defined within the public class called public.The function start at line 114 and ends at 128. It contains 15 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 6.0 functions, and It has 6.0 functions called... | |
pasteorg_pastescript | public | public | 0 | 0 | test_project | def test_project():global projenvprojenv = Noneyield svn_repos_setupyield paster_createyield make_servletyield do_pytestyield config_permissionsyield make_tag | 1 | 9 | 0 | 21 | 1 | 130 | 138 | 130 | ['projenv'] | None | {"Assign": 1, "Expr": 6} | 0 | 9 | 0 | [] | 0 | [] | The function (test_project) defined within the public class called public.The function start at line 130 and ends at 138. It contains 9 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. | |
pasteorg_pastescript | DisableDirectory | public | 0 | 1 | buildname2items | def buildname2items(self):return {} | 1 | 2 | 1 | 8 | 0 | 6 | 7 | 6 | self | [] | Returns | {"Return": 1} | 0 | 2 | 0 | [] | 0 | [] | The function (buildname2items) defined within the public class called DisableDirectory, that inherit another class.The function start at line 6 and ends at 7. 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_pastescript | public | public | 0 | 0 | test_forbidden | def test_forbidden():# Unfortunately, auth isn't enabled in the standard app# yet, so we ignore thatreturnapp = TestApp() # Of what?app.get('/') | 1 | 4 | 0 | 16 | 1 | 3 | 8 | 3 | ['app'] | None | {"Assign": 1, "Expr": 1, "Return": 1} | 2 | 6 | 2 | ["TestApp", "app.get"] | 0 | [] | The function (test_forbidden) defined within the public class called public.The function start at line 3 and ends at 8. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 functions, and It has 2.0 functions calle... | |
pasteorg_paste | public | public | 0 | 0 | make_cascade | def make_cascade(loader, global_conf, catch='404', **local_conf):"""Entry point for Paste Deploy configurationExpects configuration like::[composit:cascade]use = egg:Paste#cascade# all start with 'app' and are sorted alphabeticallyapp1 = fooapp2 = bar...catch = 404 500 ..."""catch = map(int, converters.aslist(catch))ap... | 4 | 14 | 4 | 111 | 3 | 15 | 41 | 15 | loader,global_conf,catch,**local_conf | ['apps', 'app', 'catch'] | Returns | {"Assign": 4, "Expr": 3, "For": 1, "If": 1, "Return": 1} | 9 | 27 | 9 | ["map", "converters.aslist", "local_conf.items", "name.startswith", "ValueError", "loader.get_app", "apps.append", "apps.sort", "Cascade"] | 0 | [] | The function (make_cascade) defined within the public class called public.The function start at line 15 and ends at 41. It contains 14 lines of code and it has a cyclomatic complexity of 4. It takes 4 parameters, represented as [15.0], and this function return a value. It declares 9.0 functions, and It has 9.0 functio... |
pasteorg_paste | Cascade | public | 0 | 0 | __init__ | def __init__(self, applications, catch=(404,)):self.apps = applicationsself.catch_codes = {}self.catch_exceptions = []for error in catch:if isinstance(error, str):error = int(error.split(None, 1)[0])if isinstance(error, httpexceptions.HTTPException):exc = errorcode = error.codeelse:exc = httpexceptions.get_exception(er... | 4 | 16 | 3 | 117 | 0 | 57 | 72 | 57 | self,applications,catch | [] | None | {"Assign": 10, "Expr": 1, "For": 1, "If": 2} | 7 | 16 | 7 | ["isinstance", "int", "error.split", "isinstance", "httpexceptions.get_exception", "self.catch_exceptions.append", "tuple"] | 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 Cascade.The function start at line 57 and ends at 72. It contains 16 lines of code and it has a cyclomatic complexity of 4. It takes 3 parameters, represented as [57.0] and does not return any value. It declares 7.0 functions, It has 7.0 functions called in... |
pasteorg_paste | public | public | 0 | 0 | __call__.repl_start_response | def repl_start_response(status, headers, exc_info=None):code = int(status.split(None, 1)[0])if code in self.catch_codes:failed.append(None)return _consuming_writerreturn start_response(status, headers, exc_info) | 2 | 6 | 3 | 51 | 0 | 79 | 84 | 79 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (__call__.repl_start_response) defined within the public class called public.The function start at line 79 and ends at 84. It contains 6 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [79.0] and does not return any value.. |
pasteorg_paste | Cascade | public | 0 | 0 | __call__ | def __call__(self, environ, start_response):"""WSGI application interface"""failed = []def repl_start_response(status, headers, exc_info=None):code = int(status.split(None, 1)[0])if code in self.catch_codes:failed.append(None)return _consuming_writerreturn start_response(status, headers, exc_info)try:length = int(envir... | 15 | 45 | 3 | 262 | 0 | 74 | 132 | 74 | self,environ,start_response | [] | Returns | {"Assign": 14, "AugAssign": 1, "Expr": 9, "For": 1, "If": 9, "Return": 4, "Try": 2, "While": 1} | 24 | 59 | 24 | ["int", "status.split", "failed.append", "start_response", "int", "environ.get", "tempfile.TemporaryFile", "f.write", "read", "read", "min", "IOError", "f.write", "len", "f.seek", "BytesIO", "read", "environ.copy", "seek", "app", "hasattr", "list", "v.close", "seek"] | 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 Cascade.The function start at line 74 and ends at 132. It contains 45 lines of code and it has a cyclomatic complexity of 15. It takes 3 parameters, represented as [74.0], and this function return a value. It declares 24.0 functions, It has 24.0 functions c... |
pasteorg_paste | public | public | 0 | 0 | _consuming_writer | def _consuming_writer(s):pass | 1 | 2 | 1 | 6 | 0 | 134 | 135 | 134 | s | [] | None | {} | 0 | 2 | 0 | [] | 0 | [] | The function (_consuming_writer) defined within the public class called public.The function start at line 134 and ends at 135. 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 | ensure_text | def ensure_text(s, encoding='utf-8', errors='strict'):if type(s) is str:return selse:return s.decode(encoding, errors) | 2 | 5 | 3 | 34 | 0 | 20 | 24 | 20 | s,encoding,errors | [] | Returns | {"If": 1, "Return": 2} | 2 | 5 | 2 | ["type", "s.decode"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.paste.cgiapp_py.proc_communicate"] | The function (ensure_text) defined within the public class called public.The function start at line 20 and ends at 24. It contains 5 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [20.0], and this function return a value. It declares 2.0 functions, It has 2.0 functions call... |
pasteorg_paste | CGIApplication | public | 0 | 0 | __init__ | def __init__(self, global_conf, script, path=None, include_os_environ=True, query_string=None):if global_conf:raise NotImplementedError("global_conf is no longer supported for CGIApplication ""(use make_cgi_application); please pass None instead")self.script_filename = scriptif path is None:path = os.environ.get('PATH'... | 7 | 32 | 6 | 179 | 0 | 41 | 73 | 41 | self,global_conf,script,path,include_os_environ,query_string | [] | None | {"Assign": 8, "For": 1, "If": 5} | 9 | 33 | 9 | ["NotImplementedError", "split", "os.environ.get", "script.split", "os.path.abspath", "os.path.exists", "os.path.join", "os.path.join", "CGIError"] | 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 CGIApplication.The function start at line 41 and ends at 73. It contains 32 lines of code and it has a cyclomatic complexity of 7. It takes 6 parameters, represented as [41.0] and does not return any value. It declares 9.0 functions, It has 9.0 functions ca... |
pasteorg_paste | CGIApplication | public | 0 | 0 | __call__ | def __call__(self, environ, start_response):if 'REQUEST_URI' not in environ:environ['REQUEST_URI'] = (quote(environ.get('SCRIPT_NAME', ''))+ quote(environ.get('PATH_INFO', '')))if self.include_os_environ:cgi_environ = os.environ.copy()else:cgi_environ = {}for name in environ:# Should unicode values be encoded?if (name.... | 12 | 42 | 3 | 289 | 0 | 75 | 117 | 75 | self,environ,start_response | [] | Returns | {"Assign": 10, "AugAssign": 1, "Expr": 4, "For": 1, "If": 8, "Return": 1} | 19 | 43 | 19 | ["quote", "environ.get", "quote", "environ.get", "os.environ.copy", "name.upper", "isinstance", "cgi_environ.get", "subprocess.Popen", "os.path.dirname", "CGIWriter", "proc_communicate", "StdinReader.from_environ", "proc.communicate", "read", "StdinReader.from_environ", "write", "writer.write", "start_response"] | 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 CGIApplication.The function start at line 75 and ends at 117. It contains 42 lines of code and it has a cyclomatic complexity of 12. It takes 3 parameters, represented as [75.0], and this function return a value. It declares 19.0 functions, It has 19.0 func... |
pasteorg_paste | CGIApplication | public | 0 | 0 | __init__ | def __init__(self, environ, start_response):self.environ = environself.start_response = start_responseself.status = '200 OK'self.headers = []self.headers_finished = Falseself.writer = Noneself.buffer = b'' | 1 | 8 | 3 | 46 | 0 | 121 | 128 | 121 | self,global_conf,script,path,include_os_environ,query_string | [] | None | {"Assign": 8, "For": 1, "If": 5} | 9 | 33 | 9 | ["NotImplementedError", "split", "os.environ.get", "script.split", "os.path.abspath", "os.path.exists", "os.path.join", "os.path.join", "CGIError"] | 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 CGIApplication.The function start at line 121 and ends at 128. It contains 8 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [121.0] and does not return any value. It declares 9.0 functions, It has 9.0 functions ... |
pasteorg_paste | CGIWriter | public | 0 | 0 | write | def write(self, data):if self.headers_finished:self.writer(data)returnself.buffer += datawhile b'\n' in self.buffer:if b'\r\n' in self.buffer and self.buffer.find(b'\r\n') < self.buffer.find(b'\n'):line1, self.buffer = self.buffer.split(b'\r\n', 1)else:line1, self.buffer = self.buffer.split(b'\n', 1)if not line1:self.h... | 9 | 34 | 2 | 240 | 0 | 130 | 164 | 130 | self,data | [] | None | {"Assign": 11, "AugAssign": 1, "Expr": 3, "If": 6, "Return": 1, "While": 1} | 15 | 35 | 15 | ["self.writer", "self.buffer.find", "self.buffer.find", "self.buffer.split", "self.buffer.split", "self.start_response", "self.writer", "CGIError", "line1.split", "value.lstrip", "name.strip", "name.decode", "value.decode", "name.lower", "self.headers.append"] | 501 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3495544_aio_libs_multidict.tests.gen_pickles_py.generate", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3510604_dieseldev_diesel.examples.crawler_py.write_file", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creatio... | The function (write) defined within the public class called CGIWriter.The function start at line 130 and ends at 164. It contains 34 lines of code and it has a cyclomatic complexity of 9. It takes 2 parameters, represented as [130.0] and does not return any value. It declares 15.0 functions, It has 15.0 functions calle... |
pasteorg_paste | CGIApplication | public | 0 | 0 | __init__ | def __init__(self, stdin, content_length):self.stdin = stdinself.content_length = content_length | 1 | 3 | 3 | 19 | 0 | 168 | 170 | 168 | self,global_conf,script,path,include_os_environ,query_string | [] | None | {"Assign": 8, "For": 1, "If": 5} | 9 | 33 | 9 | ["NotImplementedError", "split", "os.environ.get", "script.split", "os.path.abspath", "os.path.exists", "os.path.join", "os.path.join", "CGIError"] | 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 CGIApplication.The function start at line 168 and ends at 170. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [168.0] and does not return any value. It declares 9.0 functions, It has 9.0 functions ... |
pasteorg_paste | StdinReader | public | 0 | 0 | from_environ | def from_environ(cls, environ):length = environ.get('CONTENT_LENGTH')if length:length = int(length)else:length = 0return cls(environ['wsgi.input'], length) | 2 | 7 | 2 | 39 | 0 | 173 | 179 | 173 | cls,environ | [] | Returns | {"Assign": 3, "If": 1, "Return": 1} | 3 | 7 | 3 | ["environ.get", "int", "cls"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.paste.cgiapp_py.CGIApplication.__call__"] | The function (from_environ) defined within the public class called StdinReader.The function start at line 173 and ends at 179. It contains 7 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [173.0], and this function return a value. It declares 3.0 functions, It has 3.0 funct... |
pasteorg_paste | StdinReader | public | 0 | 0 | read | def read(self, size=None):if not self.content_length:return b''if size is None:text = self.stdin.read(self.content_length)else:text = self.stdin.read(min(self.content_length, size))self.content_length -= len(text)return text | 3 | 9 | 2 | 64 | 0 | 181 | 189 | 181 | self,size | [] | Returns | {"Assign": 2, "AugAssign": 1, "If": 2, "Return": 2} | 4 | 9 | 4 | ["self.stdin.read", "self.stdin.read", "min", "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 StdinReader.The function start at line 181 and ends at 189. It contains 9 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [181.0], and this function return a value. It declares 4.0 functions, It has 4.0 functions cal... |
pasteorg_paste | public | public | 0 | 0 | proc_communicate | def proc_communicate(proc, stdin=None, stdout=None, stderr=None):"""Run the given process, piping input/output/errors to the givenfile-like objects (which need not be actual file objects, unlikethe arguments passed to Popen).Wait for process to terminate.Note: this is taken from the posix version ofsubprocess.Popen.com... | 20 | 56 | 4 | 371 | 7 | 191 | 266 | 191 | proc,stdin,stdout,stderr | ['bytes_written', 'input_buffer', 'write_set', 'trans_nl', 'read_set', 'next_len', 'data'] | None | {"Assign": 13, "AugAssign": 1, "Expr": 15, "If": 15, "Try": 1, "While": 1} | 28 | 76 | 28 | ["hasattr", "proc.stdin.flush", "write_set.append", "proc.stdin.close", "read_set.append", "read_set.append", "select.select", "len", "stdin.read", "proc.stdin.close", "write_set.remove", "os.write", "proc.stdin.fileno", "len", "os.read", "proc.stdout.fileno", "proc.stdout.close", "read_set.remove", "proc._translate_ne... | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.paste.cgiapp_py.CGIApplication.__call__"] | The function (proc_communicate) defined within the public class called public.The function start at line 191 and ends at 266. It contains 56 lines of code and it has a cyclomatic complexity of 20. It takes 4 parameters, represented as [191.0] and does not return any value. It declares 28.0 functions, It has 28.0 functi... |
pasteorg_paste | public | public | 0 | 0 | make_cgi_application | def make_cgi_application(global_conf, script, path=None, include_os_environ=None, query_string=None):"""Paste Deploy interface for :class:`CGIApplication`This object acts as a proxy to a CGI application.You pass in thescript path (``script``), an optional path to search for thescript (if the name isn't absolute) (``pat... | 3 | 9 | 5 | 67 | 2 | 268 | 284 | 268 | global_conf,script,path,include_os_environ,query_string | ['include_os_environ', 'path'] | Returns | {"Assign": 2, "Expr": 1, "If": 1, "Return": 1} | 4 | 17 | 4 | ["global_conf.get", "global_conf.get", "converters.asbool", "CGIApplication"] | 0 | [] | The function (make_cgi_application) defined within the public class called public.The function start at line 268 and ends at 284. It contains 9 lines of code and it has a cyclomatic complexity of 3. It takes 5 parameters, represented as [268.0], and this function return a value. It declares 4.0 functions, and It has 4... |
pasteorg_paste | CgitbMiddleware | public | 0 | 0 | __init__ | def __init__(self, app, global_conf=None, display=NO_DEFAULT, logdir=None, context=5, format="html"):self.app = appif global_conf is None:global_conf = {}if display is NO_DEFAULT:display = global_conf.get('debug')if isinstance(display, str):display = converters.asbool(display)self.display = displayself.logdir = logdirs... | 4 | 17 | 7 | 93 | 0 | 19 | 35 | 19 | self,app,global_conf,display,logdir,context,format | [] | None | {"Assign": 8, "If": 3} | 4 | 17 | 4 | ["global_conf.get", "isinstance", "converters.asbool", "int"] | 6,814 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.Autotools.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.CMake.__init__", "_.content.... | The function (__init__) defined within the public class called CgitbMiddleware.The function start at line 19 and ends at 35. It contains 17 lines of code and it has a cyclomatic complexity of 4. It takes 7 parameters, represented as [19.0] and does not return any value. It declares 4.0 functions, It has 4.0 functions c... |
pasteorg_paste | CgitbMiddleware | public | 0 | 0 | __call__ | def __call__(self, environ, start_response):try:app_iter = self.app(environ, start_response)return self.catching_iter(app_iter, environ)except Exception:exc_info = sys.exc_info()start_response('500 Internal Server Error', [('content-type', 'text/html')], exc_info)response = self.exception_handler(exc_info, environ)resp... | 2 | 12 | 3 | 76 | 0 | 37 | 48 | 37 | self,environ,start_response | [] | Returns | {"Assign": 4, "Expr": 1, "Return": 2, "Try": 1} | 6 | 12 | 6 | ["self.app", "self.catching_iter", "sys.exc_info", "start_response", "self.exception_handler", "response.encode"] | 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 CgitbMiddleware.The function start at line 37 and ends at 48. It contains 12 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [37.0], and this function return a value. It declares 6.0 functions, It has 6.0 functio... |
pasteorg_paste | CgitbMiddleware | public | 0 | 0 | catching_iter | def catching_iter(self, app_iter, environ):if not app_iter:returnerror_on_close = Falsetry:for v in app_iter:yield vif hasattr(app_iter, 'close'):error_on_close = Trueapp_iter.close()except Exception:response = self.exception_handler(sys.exc_info(), environ)if not error_on_close and hasattr(app_iter, 'close'):try:app_i... | 8 | 23 | 3 | 111 | 0 | 50 | 72 | 50 | self,app_iter,environ | [] | None | {"Assign": 5, "AugAssign": 1, "Expr": 4, "For": 1, "If": 3, "Return": 1, "Try": 2} | 9 | 23 | 9 | ["hasattr", "app_iter.close", "self.exception_handler", "sys.exc_info", "hasattr", "app_iter.close", "self.exception_handler", "sys.exc_info", "response.encode"] | 0 | [] | The function (catching_iter) defined within the public class called CgitbMiddleware.The function start at line 50 and ends at 72. It contains 23 lines of code and it has a cyclomatic complexity of 8. It takes 3 parameters, represented as [50.0] and does not return any value. It declares 9.0 functions, and It has 9.0 f... |
pasteorg_paste | CgitbMiddleware | public | 0 | 0 | exception_handler | def exception_handler(self, exc_info, environ):dummy_file = StringIO()hook = Hook(file=dummy_file,display=self.display,logdir=self.logdir,context=self.context,format=self.format)hook(*exc_info)return dummy_file.getvalue() | 1 | 10 | 3 | 57 | 0 | 74 | 83 | 74 | self,exc_info,environ | [] | Returns | {"Assign": 2, "Expr": 1, "Return": 1} | 4 | 10 | 4 | ["StringIO", "Hook", "hook", "dummy_file.getvalue"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3957766_benchopt_benchopt.benchopt.runner_py.run_one_to_cvg", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94719596_openfoodfacts_open_prices.open_prices.common.middleware_py.custom_exception_handler"] | The function (exception_handler) defined within the public class called CgitbMiddleware.The function start at line 74 and ends at 83. It contains 10 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [74.0], and this function return a value. It declares 4.0 functions, It has 4.... |
pasteorg_paste | public | public | 0 | 0 | make_cgitb_middleware | def make_cgitb_middleware(app, global_conf,display=NO_DEFAULT,logdir=None,context=5,format='html'):"""Wraps the application in an error catcher based on theformer ``cgitb`` module in the standard library.display:If true (or debug is set in the global configuration)then the traceback will be displayed in the browserlogd... | 3 | 16 | 6 | 86 | 1 | 86 | 116 | 86 | app,global_conf,display,logdir,context,format | ['display'] | Returns | {"Assign": 2, "Expr": 1, "If": 2, "Return": 1} | 3 | 31 | 3 | ["asbool", "asbool", "CgitbMiddleware"] | 0 | [] | The function (make_cgitb_middleware) defined within the public class called public.The function start at line 86 and ends at 116. It contains 16 lines of code and it has a cyclomatic complexity of 3. It takes 6 parameters, represented as [86.0], and this function return a value. It declares 3.0 functions, and It has 3... |
pasteorg_paste | DispatchingConfig | public | 0 | 1 | __init__ | def __init__(self, name='DispatchingConfig'):super(DispatchingConfig, self).__init__(name=name)self.__dict__['_process_configs'] = [] | 1 | 3 | 2 | 31 | 0 | 25 | 27 | 25 | self,name | [] | None | {"Assign": 1, "Expr": 1} | 2 | 3 | 2 | ["__init__", "super"] | 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 DispatchingConfig, that inherit another class.The function start at line 25 and ends at 27. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [25.0] and does not return any value. It declares 2.0 func... |
pasteorg_paste | DispatchingConfig | public | 0 | 1 | push_thread_config | def push_thread_config(self, conf):"""Make ``conf`` the active configuration for this thread.Thread-local configuration always overrides process-wideconfiguration.This should be used like::conf = make_conf()dispatching_config.push_thread_config(conf)try:... do stuff ...finally:dispatching_config.pop_thread_config(conf)... | 1 | 2 | 2 | 14 | 0 | 29 | 44 | 29 | self,conf | [] | None | {"Expr": 2} | 1 | 16 | 1 | ["self._push_object"] | 0 | [] | The function (push_thread_config) defined within the public class called DispatchingConfig, that inherit another class.The function start at line 29 and ends at 44. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [29.0] and does not return any value. It declare... |
pasteorg_paste | DispatchingConfig | public | 0 | 1 | pop_thread_config | def pop_thread_config(self, conf=None):"""Remove a thread-local configuration.If ``conf`` is given,it is checked against the popped configuration and an erroris emitted if they don't match."""self._pop_object(conf) | 1 | 2 | 2 | 16 | 0 | 46 | 52 | 46 | self,conf | [] | None | {"Expr": 2} | 1 | 7 | 1 | ["self._pop_object"] | 0 | [] | The function (pop_thread_config) defined within the public class called DispatchingConfig, that inherit another class.The function start at line 46 and ends at 52. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [46.0] and does not return any value. It declare ... |
pasteorg_paste | DispatchingConfig | public | 0 | 1 | push_process_config | def push_process_config(self, conf):"""Like push_thread_config, but applies the configuration tothe entire process."""self._process_configs.append(conf) | 1 | 2 | 2 | 16 | 0 | 54 | 59 | 54 | self,conf | [] | None | {"Expr": 2} | 1 | 6 | 1 | ["self._process_configs.append"] | 0 | [] | The function (push_process_config) defined within the public class called DispatchingConfig, that inherit another class.The function start at line 54 and ends at 59. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [54.0] and does not return any value. It declar... |
pasteorg_paste | DispatchingConfig | public | 0 | 1 | pop_process_config | def pop_process_config(self, conf=None):self._pop_from(self._process_configs, conf) | 1 | 2 | 2 | 19 | 0 | 61 | 62 | 61 | self,conf | [] | None | {"Expr": 1} | 1 | 2 | 1 | ["self._pop_from"] | 0 | [] | The function (pop_process_config) defined within the public class called DispatchingConfig, that inherit another class.The function start at line 61 and ends at 62. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [61.0] and does not return any value. It declare... |
pasteorg_paste | DispatchingConfig | public | 0 | 1 | _pop_from | def _pop_from(self, lst, conf):popped = lst.pop()if conf is not None and popped is not conf:raise AssertionError("The config popped (%s) is not the same as the config ""expected (%s)"% (popped, conf)) | 3 | 7 | 3 | 39 | 0 | 64 | 70 | 64 | self,lst,conf | [] | None | {"Assign": 1, "If": 1} | 2 | 7 | 2 | ["lst.pop", "AssertionError"] | 0 | [] | The function (_pop_from) defined within the public class called DispatchingConfig, that inherit another class.The function start at line 64 and ends at 70. It contains 7 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [64.0] and does not return any value. It declares 2.0 fun... |
pasteorg_paste | DispatchingConfig | public | 0 | 1 | _current_obj | def _current_obj(self):try:return super(DispatchingConfig, self)._current_obj()except TypeError:if self._process_configs:return self._process_configs[-1]raise AttributeError("No configuration has been registered for this process ""or thread") | 3 | 9 | 1 | 40 | 0 | 72 | 80 | 72 | self | [] | Returns | {"If": 1, "Return": 2, "Try": 1} | 3 | 9 | 3 | ["_current_obj", "super", "AttributeError"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.paste.config_py.DispatchingConfig._current_obj"] | The function (_current_obj) defined within the public class called DispatchingConfig, that inherit another class.The function start at line 72 and ends at 80. It contains 9 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters, and this function return a value. It declares 3.0... |
pasteorg_paste | public | public | 0 | 0 | __init__.register_config | def register_config(environ, start_response):popped_config = environ.get(environ_key, NO_DEFAULT)current_config = environ[environ_key] = config.copy()environ['paste.registry'].register(dispatching_config, current_config)try:app_iter = application(environ, start_response)finally:if popped_config is NO_DEFAULT:environ.po... | 3 | 13 | 2 | 75 | 0 | 101 | 114 | 101 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (__init__.register_config) defined within the public class called public.The function start at line 101 and ends at 114. It contains 13 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [101.0] and does not return any value.. |
pasteorg_paste | DispatchingConfig | public | 0 | 1 | __init__ | def __init__(self, application, config, dispatching_config=CONFIG, environ_key='paste.config'):"""This delegates all requests to `application`, adding a *copy*of the configuration `config`."""def register_config(environ, start_response):popped_config = environ.get(environ_key, NO_DEFAULT)current_config = environ[enviro... | 1 | 4 | 5 | 33 | 0 | 95 | 116 | 95 | self,name | [] | None | {"Assign": 1, "Expr": 1} | 2 | 3 | 2 | ["__init__", "super"] | 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 DispatchingConfig, that inherit another class.The function start at line 95 and ends at 116. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [95.0] and does not return any value. It declares 2.0 fun... |
pasteorg_paste | public | public | 0 | 0 | make_config_filter | def make_config_filter(app, global_conf, **local_conf):conf = global_conf.copy()conf.update(local_conf)return ConfigMiddleware(app, conf) | 1 | 4 | 3 | 30 | 1 | 118 | 121 | 118 | app,global_conf,**local_conf | ['conf'] | Returns | {"Assign": 1, "Expr": 1, "Return": 1} | 3 | 4 | 3 | ["global_conf.copy", "conf.update", "ConfigMiddleware"] | 0 | [] | The function (make_config_filter) defined within the public class called public.The function start at line 118 and ends at 121. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [118.0], and this function return a value. It declares 3.0 functions, and It has 3.0... |
pasteorg_paste | public | public | 0 | 0 | forward.error_codes_mapper | def error_codes_mapper(code, message, environ, global_conf, codes):if code in codes:return codes[code]else:return None | 2 | 5 | 5 | 27 | 0 | 48 | 52 | 48 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (forward.error_codes_mapper) defined within the public class called public.The function start at line 48 and ends at 52. It contains 5 lines of code and it has a cyclomatic complexity of 2. It takes 5 parameters, represented as [48.0] and does not return any value.. |
pasteorg_paste | public | public | 0 | 0 | forward | def forward(app, codes):"""Intercepts a response with a particular status code and returns thecontent from a specified URL instead.The arguments are:``app``The WSGI application or middleware chain.``codes``A dictionary of integer status codes and the URL to be displayedif the response uses that code.For example, you mi... | 3 | 13 | 2 | 50 | 0 | 19 | 61 | 19 | app,codes | [] | Returns | {"Expr": 1, "For": 1, "If": 2, "Return": 3} | 5 | 43 | 5 | ["isinstance", "TypeError", "repr", "RecursiveMiddleware", "StatusBasedForward"] | 24 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3568546_onnxbot_onnx_fb_universe.test.model_defs.densenet_py._DenseLayer.forward", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3646986_mapbox_mapbox_sdk_py.tests.test_geocoder_py.test_geocoder_forward", "_.content... | The function (forward) defined within the public class called public.The function start at line 19 and ends at 61. It contains 13 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [19.0], and this function return a value. It declares 5.0 functions, It has 5.0 functions called ... |
pasteorg_paste | StatusKeeper | public | 0 | 0 | __init__ | def __init__(self, app, status, url, headers):self.app = appself.status = statusself.url = urlself.headers = headers | 1 | 5 | 5 | 33 | 0 | 64 | 68 | 64 | self,app,status,url,headers | [] | None | {"Assign": 4} | 0 | 5 | 0 | [] | 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 StatusKeeper.The function start at line 64 and ends at 68. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [64.0] and does not return any value. It has 6814.0 functions calling this function which a... |
pasteorg_paste | public | public | 0 | 0 | __call__.keep_status_start_response | def keep_status_start_response(status, headers, exc_info=None):for header, value in headers:if header.lower() == 'set-cookie':self.headers.append((header, value))else:replace_header(self.headers, header, value)return start_response(self.status, self.headers, exc_info) | 3 | 7 | 3 | 64 | 0 | 71 | 77 | 71 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (__call__.keep_status_start_response) defined within the public class called public.The function start at line 71 and ends at 77. It contains 7 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [71.0] and does not return any value.. |
pasteorg_paste | StatusKeeper | public | 0 | 0 | __call__ | def __call__(self, environ, start_response):def keep_status_start_response(status, headers, exc_info=None):for header, value in headers:if header.lower() == 'set-cookie':self.headers.append((header, value))else:replace_header(self.headers, header, value)return start_response(self.status, self.headers, exc_info)parts = ... | 3 | 18 | 3 | 124 | 0 | 70 | 94 | 70 | self,environ,start_response | [] | Returns | {"Assign": 7, "Expr": 4, "For": 1, "If": 2, "Return": 3, "Try": 1} | 11 | 25 | 11 | ["header.lower", "self.headers.append", "replace_header", "start_response", "self.url.split", "len", "self.app", "write", "keep_status_start_response", "sys.exc_info", "body.encode"] | 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 StatusKeeper.The function start at line 70 and ends at 94. It contains 18 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [70.0], and this function return a value. It declares 11.0 functions, It has 11.0 function... |
pasteorg_paste | StatusKeeper | public | 0 | 0 | __init__ | def __init__(self, app, mapper, global_conf=None, **params):if global_conf is None:global_conf = {}# @@: global_conf shouldn't really come in here, only in a# separate make_status_based_forward functionif global_conf:self.debug = converters.asbool(global_conf.get('debug', False))else:self.debug = Falseself.application ... | 3 | 11 | 5 | 72 | 0 | 151 | 163 | 151 | self,app,status,url,headers | [] | None | {"Assign": 4} | 0 | 5 | 0 | [] | 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 StatusKeeper.The function start at line 151 and ends at 163. It contains 11 lines of code and it has a cyclomatic complexity of 3. It takes 5 parameters, represented as [151.0] and does not return any value. It has 6814.0 functions calling this function whi... |
pasteorg_paste | public | public | 0 | 0 | __call__.change_response | def change_response(status, headers, exc_info=None):status_code = status.split(' ')try:code = int(status_code[0])except (ValueError, TypeError):raise Exception('StatusBasedForward middleware ''received an invalid status code %s'%repr(status_code[0]))message = ' '.join(status_code[1:])new_url = self.mapper(code,message,... | 5 | 27 | 3 | 139 | 0 | 168 | 196 | 168 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (__call__.change_response) defined within the public class called public.The function start at line 168 and ends at 196. It contains 27 lines of code and it has a cyclomatic complexity of 5. It takes 3 parameters, represented as [168.0] and does not return any value.. |
pasteorg_paste | public | public | 0 | 0 | __call__.factory | def factory(app):return StatusKeeper(app, status=url[0][1], url=url[0][0],headers=url[0][2]) | 1 | 3 | 1 | 40 | 0 | 203 | 205 | 203 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (__call__.factory) defined within the public class called public.The function start at line 203 and ends at 205. 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 | StatusKeeper | public | 0 | 0 | __call__ | def __call__(self, environ, start_response):url = []def change_response(status, headers, exc_info=None):status_code = status.split(' ')try:code = int(status_code[0])except (ValueError, TypeError):raise Exception('StatusBasedForward middleware ''received an invalid status code %s'%repr(status_code[0]))message = ' '.join... | 3 | 11 | 3 | 54 | 0 | 165 | 208 | 165 | self,environ,start_response | [] | Returns | {"Assign": 7, "Expr": 4, "For": 1, "If": 2, "Return": 3, "Try": 1} | 11 | 25 | 11 | ["header.lower", "self.headers.append", "replace_header", "start_response", "self.url.split", "len", "self.app", "write", "keep_status_start_response", "sys.exc_info", "body.encode"] | 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 StatusKeeper.The function start at line 165 and ends at 208. It contains 11 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [165.0], and this function return a value. It declares 11.0 functions, It has 11.0 funct... |
pasteorg_paste | public | public | 0 | 0 | make_errordocument | def make_errordocument(app, global_conf, **kw):"""Paste Deploy entry point to create a error document wrapper.Use like::[filter-app:main]use = egg:Paste#errordocumentnext = real-app500 = /lib/msg/500.html404 = /lib/msg/404.html"""map = {}for status, redir_loc in kw.items():try:status = int(status)except ValueError:rais... | 3 | 10 | 3 | 60 | 3 | 210 | 230 | 210 | app,global_conf,**kw | ['forwarder', 'status', 'map'] | Returns | {"Assign": 4, "Expr": 1, "For": 1, "Return": 1, "Try": 1} | 4 | 21 | 4 | ["kw.items", "int", "ValueError", "forward"] | 0 | [] | The function (make_errordocument) defined within the public class called public.The function start at line 210 and ends at 230. It contains 10 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [210.0], and this function return a value. It declares 4.0 functions, and It has 4.... |
pasteorg_paste | public | public | 0 | 0 | custom_forward | def custom_forward(app, mapper, global_conf=None, **kw):"""Deprectated; use StatusBasedForward instead."""warnings.warn("errordocuments.custom_forward has been deprecated; please ""use errordocuments.StatusBasedForward",DeprecationWarning, 2)if global_conf is None:global_conf = {}return _StatusBasedRedirect(app, mapper... | 2 | 8 | 4 | 47 | 1 | 245 | 255 | 245 | app,mapper,global_conf,**kw | ['global_conf'] | Returns | {"Assign": 1, "Expr": 2, "If": 1, "Return": 1} | 2 | 11 | 2 | ["warnings.warn", "_StatusBasedRedirect"] | 0 | [] | The function (custom_forward) defined within the public class called public.The function start at line 245 and ends at 255. It contains 8 lines of code and it has a cyclomatic complexity of 2. It takes 4 parameters, represented as [245.0], and this function return a value. It declares 2.0 functions, and It has 2.0 fun... |
pasteorg_paste | StatusKeeper | public | 0 | 0 | __init__ | def __init__(self, app, mapper, global_conf=None, **kw):warnings.warn("errordocuments._StatusBasedRedirect has been deprecated; please ""use errordocuments.StatusBasedForward",DeprecationWarning, 2)if global_conf is None:global_conf = {}self.application = appself.mapper = mapperself.global_conf = global_confself.kw = k... | 2 | 28 | 5 | 61 | 0 | 261 | 290 | 261 | self,app,status,url,headers | [] | None | {"Assign": 4} | 0 | 5 | 0 | [] | 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 StatusKeeper.The function start at line 261 and ends at 290. It contains 28 lines of code and it has a cyclomatic complexity of 2. It takes 5 parameters, represented as [261.0] and does not return any value. It has 6814.0 functions calling this function whi... |
pasteorg_paste | public | public | 0 | 0 | __call__.change_response | def change_response(status, headers, exc_info=None):new_url = Noneparts = status.split(' ')try:code = int(parts[0])except (ValueError, TypeError):raise Exception('_StatusBasedRedirect middleware ''received an invalid status code %s'%repr(parts[0]))message = ' '.join(parts[1:])new_url = self.mapper(code,message,environ,... | 5 | 28 | 3 | 141 | 0 | 296 | 323 | 296 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (__call__.change_response) defined within the public class called public.The function start at line 296 and ends at 323. It contains 28 lines of code and it has a cyclomatic complexity of 5. It takes 3 parameters, represented as [296.0] and does not return any value.. |
pasteorg_paste | public | public | 0 | 0 | __call__.eat_start_response | def eat_start_response(status, headers, exc_info=None):"""We don't want start_response to do anything since ithas already been called"""if status[:3] != '200':raise InvalidForward("The URL %s to internally forward ""to in order to create an error document did not ""return a '200' status code." % url_) | 2 | 7 | 3 | 30 | 0 | 352 | 362 | 352 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (__call__.eat_start_response) defined within the public class called public.The function start at line 352 and ends at 362. It contains 7 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [352.0] and does not return any value.. |
pasteorg_paste | StatusKeeper | public | 0 | 0 | __call__ | def __call__(self, environ, start_response):url = []code_message = []try:def change_response(status, headers, exc_info=None):new_url = Noneparts = status.split(' ')try:code = int(parts[0])except (ValueError, TypeError):raise Exception('_StatusBasedRedirect middleware ''received an invalid status code %s'%repr(parts[0])... | 8 | 57 | 3 | 258 | 0 | 292 | 385 | 292 | self,environ,start_response | [] | Returns | {"Assign": 7, "Expr": 4, "For": 1, "If": 2, "Return": 3, "Try": 1} | 11 | 25 | 11 | ["header.lower", "self.headers.append", "replace_header", "start_response", "self.url.split", "len", "self.app", "write", "keep_status_start_response", "sys.exc_info", "body.encode"] | 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 StatusKeeper.The function start at line 292 and ends at 385. It contains 57 lines of code and it has a cyclomatic complexity of 8. It takes 3 parameters, represented as [292.0], and this function return a value. It declares 11.0 functions, It has 11.0 funct... |
pasteorg_paste | DataApp | public | 0 | 0 | __init__ | def __init__(self, content, headers=None, allowed_methods=None, **kwargs):assert isinstance(headers, (type(None), list))self.expires = Noneself.content = Noneself.content_length = Noneself.last_modified = 0if allowed_methods is not None:self.allowed_methods = allowed_methodsself.headers = headers or []for (k, v) in kwa... | 6 | 18 | 5 | 141 | 0 | 80 | 97 | 80 | self,content,headers,allowed_methods,**kwargs | [] | None | {"Assign": 7, "Expr": 4, "For": 1, "If": 3} | 9 | 18 | 9 | ["isinstance", "type", "kwargs.items", "get_header", "header.update", "ACCEPT_RANGES.update", "CONTENT_TYPE", "CONTENT_TYPE.update", "self.set_content"] | 6,815 | ["_.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 DataApp.The function start at line 80 and ends at 97. It contains 18 lines of code and it has a cyclomatic complexity of 6. It takes 5 parameters, represented as [80.0] and does not return any value. It declares 9.0 functions, It has 9.0 functions called in... |
pasteorg_paste | DataApp | public | 0 | 0 | cache_control | def cache_control(self, **kwargs):self.expires = CACHE_CONTROL.apply(self.headers, **kwargs) or Nonereturn self | 2 | 3 | 2 | 27 | 0 | 99 | 101 | 99 | self,**kwargs | [] | Returns | {"Assign": 1, "Return": 1} | 1 | 3 | 1 | ["CACHE_CONTROL.apply"] | 0 | [] | The function (cache_control) defined within the public class called DataApp.The function start at line 99 and ends at 101. It contains 3 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [99.0], and this function return a value. It declare 1.0 function, and It has 1.0 functio... |
pasteorg_paste | DataApp | public | 0 | 0 | set_content | def set_content(self, content, last_modified=None):assert content is not Noneif last_modified is None:self.last_modified = time.time()else:self.last_modified = last_modifiedself.content = contentself.content_length = len(content)LAST_MODIFIED.update(self.headers, time=self.last_modified)return self | 2 | 10 | 3 | 66 | 0 | 103 | 112 | 103 | self,content,last_modified | [] | Returns | {"Assign": 4, "Expr": 1, "If": 1, "Return": 1} | 3 | 10 | 3 | ["time.time", "len", "LAST_MODIFIED.update"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3915525_anxdpanic_twitch_on_kodi.resources.lib.twitch_addon.addon.common.kodi_py.set_view"] | The function (set_content) defined within the public class called DataApp.The function start at line 103 and ends at 112. It contains 10 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [103.0], and this function return a value. It declares 3.0 functions, It has 3.0 functions... |
pasteorg_paste | DataApp | public | 0 | 0 | content_disposition | def content_disposition(self, **kwargs):CONTENT_DISPOSITION.apply(self.headers, **kwargs)return self | 1 | 3 | 2 | 21 | 0 | 114 | 116 | 114 | self,**kwargs | [] | Returns | {"Expr": 1, "Return": 1} | 1 | 3 | 1 | ["CONTENT_DISPOSITION.apply"] | 0 | [] | The function (content_disposition) defined within the public class called DataApp.The function start at line 114 and ends at 116. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [114.0], and this function return a value. It declare 1.0 function, and It has 1.0... |
pasteorg_paste | DataApp | public | 0 | 0 | __call__ | def __call__(self, environ, start_response):method = environ['REQUEST_METHOD'].upper()if method not in self.allowed_methods:exc = HTTPMethodNotAllowed('You cannot %s a file' % method,headers=[('Allow', ','.join(self.allowed_methods))])return exc(environ, start_response)return self.get(environ, start_response) | 2 | 8 | 3 | 68 | 0 | 118 | 125 | 118 | self,environ,start_response | [] | Returns | {"Assign": 2, "If": 1, "Return": 2} | 5 | 8 | 5 | ["upper", "HTTPMethodNotAllowed", "join", "exc", "self.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 DataApp.The function start at line 118 and ends at 125. It contains 8 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [118.0], and this function return a value. It declares 5.0 functions, It has 5.0 functions cal... |
pasteorg_paste | DataApp | public | 0 | 0 | calculate_etag | def calculate_etag(self):return '"%s-%s"' % (self.last_modified, self.content_length) | 1 | 2 | 1 | 17 | 0 | 127 | 128 | 127 | self | [] | Returns | {"Return": 1} | 0 | 2 | 0 | [] | 0 | [] | The function (calculate_etag) defined within the public class called DataApp.The function start at line 127 and ends at 128. 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 | DataApp | public | 0 | 0 | get | def get(self, environ, start_response):headers = self.headers[:]current_etag = self.calculate_etag()ETAG.update(headers, current_etag)if self.expires is not None:EXPIRES.update(headers, delta=self.expires)try:client_etags = IF_NONE_MATCH.parse(environ)if client_etags:for etag in client_etags:if etag == current_etag or ... | 22 | 50 | 3 | 381 | 0 | 130 | 189 | 130 | self,environ,start_response | [] | Returns | {"Assign": 9, "Expr": 10, "For": 3, "If": 9, "Return": 7, "Try": 2} | 23 | 60 | 23 | ["self.calculate_etag", "ETAG.update", "EXPIRES.update", "IF_NONE_MATCH.parse", "list_headers", "head.delete", "start_response", "exce.wsgi_application", "IF_MODIFIED_SINCE.parse", "int", "list_headers", "head.delete", "start_response", "exce.wsgi_application", "RANGE.parse", "len", "wsgi_application", "HTTPRequestRang... | 2,986 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.Meson.dependencies", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15217004_shayypy_guilded_py.guilded.abc_py.User.__init__", "_.content.gdrive.MyDrive.Phd... | The function (get) defined within the public class called DataApp.The function start at line 130 and ends at 189. It contains 50 lines of code and it has a cyclomatic complexity of 22. It takes 3 parameters, represented as [130.0], and this function return a value. It declares 23.0 functions, It has 23.0 functions call... |
pasteorg_paste | DataApp | public | 0 | 0 | __init__ | def __init__(self, filename, headers=None, **kwargs):self.filename = filenamecontent_type, content_encoding = self.guess_type()if content_type and 'content_type' not in kwargs:kwargs['content_type'] = content_typeif content_encoding and 'content_encoding' not in kwargs:kwargs['content_encoding'] = content_encodingDataA... | 5 | 8 | 4 | 69 | 0 | 198 | 205 | 198 | self,content,headers,allowed_methods,**kwargs | [] | None | {"Assign": 7, "Expr": 4, "For": 1, "If": 3} | 9 | 18 | 9 | ["isinstance", "type", "kwargs.items", "get_header", "header.update", "ACCEPT_RANGES.update", "CONTENT_TYPE", "CONTENT_TYPE.update", "self.set_content"] | 6,815 | ["_.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 DataApp.The function start at line 198 and ends at 205. It contains 8 lines of code and it has a cyclomatic complexity of 5. It takes 4 parameters, represented as [198.0] and does not return any value. It declares 9.0 functions, It has 9.0 functions called ... |
pasteorg_paste | FileApp | public | 0 | 1 | guess_type | def guess_type(self):return mimetypes.guess_type(self.filename) | 1 | 2 | 1 | 14 | 0 | 207 | 208 | 207 | self | [] | Returns | {"Return": 1} | 1 | 2 | 1 | ["mimetypes.guess_type"] | 4 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3720273_jadolg_rocketchat_api.rocketchat_API.APISections.assets_py.RocketChatAssets.assets_set_asset", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.76380898_stevenlooman_async_upnp_client.async_upnp_client.profiles... | The function (guess_type) defined within the public class called FileApp, that inherit another class.The function start at line 207 and ends at 208. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declare 1.0 function, ... |
pasteorg_paste | FileApp | public | 0 | 1 | update | def update(self, force=False):stat = os.stat(self.filename)if not force and stat.st_mtime == self.last_modified:returnself.last_modified = stat.st_mtimeif stat.st_size < CACHE_SIZE:fh = open(self.filename,"rb")self.set_content(fh.read(), stat.st_mtime)fh.close()else:self.content = Noneself.content_length = stat.st_size... | 4 | 13 | 2 | 103 | 0 | 210 | 224 | 210 | self,force | [] | None | {"Assign": 5, "Expr": 3, "If": 2, "Return": 1} | 6 | 15 | 6 | ["os.stat", "open", "self.set_content", "fh.read", "fh.close", "LAST_MODIFIED.update"] | 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 FileApp, that inherit another class.The function start at line 210 and ends at 224. It contains 13 lines of code and it has a cyclomatic complexity of 4. It takes 2 parameters, represented as [210.0] and does not return any value. It declares 6.0 functions, I... |
pasteorg_paste | DataApp | public | 0 | 0 | get | def get(self, environ, start_response):is_head = environ['REQUEST_METHOD'].upper() == 'HEAD'if 'max-age=0' in CACHE_CONTROL(environ).lower():self.update(force=True) # RFC 2616 13.2.6else:self.update()if not self.content:if not os.path.exists(self.filename):exc = HTTPNotFound('The resource does not exist',comment="No fi... | 9 | 33 | 3 | 208 | 0 | 226 | 259 | 226 | self,environ,start_response | [] | Returns | {"Assign": 9, "Expr": 10, "For": 3, "If": 9, "Return": 7, "Try": 2} | 23 | 60 | 23 | ["self.calculate_etag", "ETAG.update", "EXPIRES.update", "IF_NONE_MATCH.parse", "list_headers", "head.delete", "start_response", "exce.wsgi_application", "IF_MODIFIED_SINCE.parse", "int", "list_headers", "head.delete", "start_response", "exce.wsgi_application", "RANGE.parse", "len", "wsgi_application", "HTTPRequestRang... | 2,986 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.Meson.dependencies", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15217004_shayypy_guilded_py.guilded.abc_py.User.__init__", "_.content.gdrive.MyDrive.Phd... | The function (get) defined within the public class called DataApp.The function start at line 226 and ends at 259. It contains 33 lines of code and it has a cyclomatic complexity of 9. It takes 3 parameters, represented as [226.0], and this function return a value. It declares 23.0 functions, It has 23.0 functions calle... |
pasteorg_paste | DataApp | public | 0 | 0 | __init__ | def __init__(self, file, block_size=None, size=None):self.file = fileself.size = sizeself.block_size = block_size or BLOCK_SIZE | 2 | 4 | 4 | 32 | 0 | 263 | 266 | 263 | self,content,headers,allowed_methods,**kwargs | [] | None | {"Assign": 7, "Expr": 4, "For": 1, "If": 3} | 9 | 18 | 9 | ["isinstance", "type", "kwargs.items", "get_header", "header.update", "ACCEPT_RANGES.update", "CONTENT_TYPE", "CONTENT_TYPE.update", "self.set_content"] | 6,815 | ["_.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 DataApp.The function start at line 263 and ends at 266. It contains 4 lines of code and it has a cyclomatic complexity of 2. It takes 4 parameters, represented as [263.0] and does not return any value. It declares 9.0 functions, It has 9.0 functions called ... |
pasteorg_paste | _FileIter | protected | 0 | 0 | __iter__ | def __iter__(self):return self | 1 | 2 | 1 | 7 | 0 | 268 | 269 | 268 | 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 protected class called _FileIter.The function start at line 268 and ends at 269. 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 which ... |
pasteorg_paste | _FileIter | protected | 0 | 0 | next | def next(self):chunk_size = self.block_sizeif self.size is not None:if chunk_size > self.size:chunk_size = self.sizeself.size -= chunk_sizedata = self.file.read(chunk_size)if not data:raise StopIterationreturn data | 4 | 10 | 1 | 53 | 0 | 271 | 280 | 271 | self | [] | Returns | {"Assign": 3, "AugAssign": 1, "If": 3, "Return": 1} | 1 | 10 | 1 | ["self.file.read"] | 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 protected class called _FileIter.The function start at line 271 and ends at 280. It contains 10 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters, and this function return a value. It declare 1.0 function, It has 1.0 function called i... |
pasteorg_paste | _FileIter | protected | 0 | 0 | close | def close(self):self.file.close() | 1 | 2 | 1 | 12 | 0 | 283 | 284 | 283 | self | [] | None | {"Expr": 1} | 1 | 2 | 1 | ["self.file.close"] | 158 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3470342_bitprophet_ssh.tests.test_client_py.SSHClientTest.tearDown", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3537219_anthraxx_diffoscope.diffoscope.presenters.formats_py.text", "_.content.gdrive.MyDrive.Phd_Th... | The function (close) defined within the protected class called _FileIter.The function start at line 283 and ends at 284. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, It has 1.0 function called insid... |
pasteorg_paste | DataApp | public | 0 | 0 | __init__ | def __init__(self, path):self.path = os.path.abspath(path)if not self.path.endswith(os.path.sep):self.path += os.path.sepassert os.path.isdir(self.path)self.cached_apps = {} | 2 | 6 | 2 | 60 | 0 | 294 | 299 | 294 | self,content,headers,allowed_methods,**kwargs | [] | None | {"Assign": 7, "Expr": 4, "For": 1, "If": 3} | 9 | 18 | 9 | ["isinstance", "type", "kwargs.items", "get_header", "header.update", "ACCEPT_RANGES.update", "CONTENT_TYPE", "CONTENT_TYPE.update", "self.set_content"] | 6,815 | ["_.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 DataApp.The function start at line 294 and ends at 299. It contains 6 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [294.0] and does not return any value. It declares 9.0 functions, It has 9.0 functions called ... |
pasteorg_paste | DataApp | public | 0 | 0 | __call__ | def __call__(self, environ, start_response):path_info = environ['PATH_INFO']app = self.cached_apps.get(path_info)if app is None:path = os.path.join(self.path, path_info.lstrip('/'))if not os.path.normpath(path).startswith(self.path):app = HTTPForbidden()elif os.path.isfile(path):app = self.make_fileapp(path)self.cached... | 4 | 13 | 3 | 115 | 0 | 303 | 315 | 303 | self,environ,start_response | [] | Returns | {"Assign": 2, "If": 1, "Return": 2} | 5 | 8 | 5 | ["upper", "HTTPMethodNotAllowed", "join", "exc", "self.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 DataApp.The function start at line 303 and ends at 315. It contains 13 lines of code and it has a cyclomatic complexity of 4. It takes 3 parameters, represented as [303.0], and this function return a value. It declares 5.0 functions, It has 5.0 functions ca... |
pasteorg_paste | DataApp | public | 0 | 0 | __init__ | def __init__(self, filepath):if zipfile.is_zipfile(filepath):self.archive = zipfile.ZipFile(filepath,"r")elif tarfile.is_tarfile(filepath):self.archive = tarfile.TarFileCompat(filepath,"r")else:raise AssertionError("filepath '%s' is not a zip or tar " % filepath)self.expires = Noneself.last_modified = time.time()self.c... | 3 | 10 | 2 | 76 | 0 | 334 | 343 | 334 | self,content,headers,allowed_methods,**kwargs | [] | None | {"Assign": 7, "Expr": 4, "For": 1, "If": 3} | 9 | 18 | 9 | ["isinstance", "type", "kwargs.items", "get_header", "header.update", "ACCEPT_RANGES.update", "CONTENT_TYPE", "CONTENT_TYPE.update", "self.set_content"] | 6,815 | ["_.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 DataApp.The function start at line 334 and ends at 343. It contains 10 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [334.0] and does not return any value. It declares 9.0 functions, It has 9.0 functions called... |
pasteorg_paste | DataApp | public | 0 | 0 | cache_control | def cache_control(self, **kwargs):self.expires = CACHE_CONTROL.apply(self.headers, **kwargs) or Nonereturn self | 2 | 3 | 2 | 27 | 0 | 345 | 347 | 99 | self,**kwargs | [] | Returns | {"Assign": 1, "Return": 1} | 1 | 3 | 1 | ["CACHE_CONTROL.apply"] | 0 | [] | The function (cache_control) defined within the public class called DataApp.The function start at line 345 and ends at 347. It contains 3 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [99.0], and this function return a value. It declare 1.0 function, and It has 1.0 functi... |
pasteorg_paste | DataApp | public | 0 | 0 | __call__ | def __call__(self, environ, start_response):path = environ.get("PATH_INFO","")if path.startswith("/"):path = path[1:]application = self.cache.get(path)if application:return application(environ, start_response)try:info = self.archive.getinfo(path)except KeyError:exc = HTTPNotFound("The file requested, '%s', was not foun... | 6 | 26 | 3 | 209 | 0 | 349 | 376 | 349 | self,environ,start_response | [] | Returns | {"Assign": 2, "If": 1, "Return": 2} | 5 | 8 | 5 | ["upper", "HTTPMethodNotAllowed", "join", "exc", "self.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 DataApp.The function start at line 349 and ends at 376. It contains 26 lines of code and it has a cyclomatic complexity of 6. It takes 3 parameters, represented as [349.0], and this function return a value. It declares 5.0 functions, It has 5.0 functions ca... |
pasteorg_paste | public | public | 0 | 0 | ensure_binary | def ensure_binary(s):if isinstance(s, bytes):return selse:return s.encode('utf-8') | 2 | 5 | 1 | 24 | 0 | 31 | 35 | 31 | s | [] | Returns | {"If": 1, "Return": 2} | 2 | 5 | 2 | ["isinstance", "s.encode"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.paste.fixture_py.TestApp.encode_multipart"] | The function (ensure_binary) defined within the public class called public.The function start at line 31 and ends at 35. 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 functions, It has 2.0 functions calle... |
pasteorg_paste | public | public | 0 | 0 | ensure_str | def ensure_str(s, encoding='utf-8', errors='strict'):if type(s) is str:return selse:return s.decode(encoding, errors) | 2 | 5 | 3 | 34 | 0 | 37 | 41 | 37 | s,encoding,errors | [] | Returns | {"If": 1, "Return": 2} | 2 | 5 | 2 | ["type", "s.decode"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.paste.fixture_py.TestApp.encode_multipart"] | The function (ensure_str) defined within the public class called public.The function start at line 37 and ends at 41. It contains 5 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [37.0], and this function return a value. It declares 2.0 functions, It has 2.0 functions calle... |
pasteorg_paste | public | public | 0 | 0 | tempnam_no_warning | def tempnam_no_warning(*args):"""An os.tempnam with the warning turned off, because sometimesyou just need to use this and don't care about the stupidsecurity warning."""return os.tempnam(*args) | 1 | 2 | 1 | 15 | 0 | 43 | 49 | 43 | *args | [] | Returns | {"Expr": 1, "Return": 1} | 1 | 7 | 1 | ["os.tempnam"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.paste.fixture_py.TestResponse.showbrowser"] | The function (tempnam_no_warning) defined within the public class called public.The function start at line 43 and ends at 49. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declare 1.0 function, It has 1.0 function cal... |
pasteorg_paste | public | public | 0 | 0 | sorted | def sorted(l):l = list(l)l.sort()return l | 1 | 4 | 1 | 18 | 1 | 51 | 54 | 51 | l | ['l'] | Returns | {"Assign": 1, "Expr": 1, "Return": 1} | 2 | 4 | 2 | ["list", "l.sort"] | 2,261 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.generate_html_index_py.create_index_file", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.response_py.get_return", "_.co... | The function (sorted) defined within the public class called public.The function start at line 51 and ends at 54. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declares 2.0 functions, It has 2.0 functions called insid... |
pasteorg_paste | Dummy_smtplib | public | 0 | 0 | __init__ | def __init__(self, server):import warningswarnings.warn('Dummy_smtplib is not maintained and is deprecated',DeprecationWarning, 2)assert not self.existing, ("smtplib.SMTP() called again before Dummy_smtplib.existing.reset() ""called.")self.server = serverself.open = Trueself.__class__.existing = self | 1 | 11 | 2 | 46 | 0 | 60 | 70 | 60 | self,server | [] | None | {"Assign": 3, "Expr": 1} | 1 | 11 | 1 | ["warnings.warn"] | 6,814 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.Autotools.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.CMake.__init__", "_.content.... | The function (__init__) defined within the public class called Dummy_smtplib.The function start at line 60 and ends at 70. It contains 11 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [60.0] and does not return any value. It declare 1.0 function, It has 1.0 function called... |
pasteorg_paste | Dummy_smtplib | public | 0 | 0 | quit | def quit(self):assert self.open, ("Called %s.quit() twice" % self)self.open = False | 1 | 4 | 1 | 20 | 0 | 72 | 75 | 72 | self | [] | None | {"Assign": 1} | 0 | 4 | 0 | [] | 8 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3913189_sensipeeps_skyleebot.skylee.modules.__init___py.__list_all_modules", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3918872_qubesos_qubes_app_linux_split_gpg.tests.test_evolution_py.main", "_.content.gdrive.M... | The function (quit) defined within the public class called Dummy_smtplib.The function start at line 72 and ends at 75. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It has 8.0 functions calling this function which are ["_.co... |
pasteorg_paste | Dummy_smtplib | public | 0 | 0 | sendmail | def sendmail(self, from_address, to_addresses, msg):self.from_address = from_addressself.to_addresses = to_addressesself.message = msg | 1 | 4 | 4 | 26 | 0 | 77 | 80 | 77 | self,from_address,to_addresses,msg | [] | None | {"Assign": 3} | 0 | 4 | 0 | [] | 0 | [] | The function (sendmail) defined within the public class called Dummy_smtplib.The function start at line 77 and ends at 80. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [77.0] and does not return any value.. |
pasteorg_paste | Dummy_smtplib | public | 0 | 0 | install | def install(cls):smtplib.SMTP = cls | 1 | 2 | 1 | 10 | 0 | 82 | 83 | 82 | cls | [] | None | {"Assign": 1} | 0 | 2 | 0 | [] | 25 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3703461_scoutapp_scout_apm_python.src.scout_apm.falcon_py.ScoutMiddleware.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3703461_scoutapp_scout_apm_python.tests.unit.test_core_py.test_install_fail_monitor_... | The function (install) defined within the public class called Dummy_smtplib.The function start at line 82 and ends at 83. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It has 25.0 functions calling this function which are ["... |
pasteorg_paste | Dummy_smtplib | public | 0 | 0 | reset | def reset(self):assert not self.open, ("SMTP connection not quit")self.__class__.existing = None | 1 | 4 | 1 | 21 | 0 | 87 | 90 | 87 | self | [] | None | {"Assign": 1} | 0 | 4 | 0 | [] | 24 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3537219_anthraxx_diffoscope.tests.conftest_py.reset_progress", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3637699_magicalraccoon_tootstream.src.tootstream.toot_parser_py.TootParser.reset", "_.content.gdrive.MyDri... | The function (reset) defined within the public class called Dummy_smtplib.The function start at line 87 and ends at 90. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It has 24.0 functions calling this function which are ["_.... |
pasteorg_paste | Dummy_smtplib | public | 0 | 0 | __init__ | def __init__(self, app, namespace=None, relative_to=None, extra_environ=None, pre_request_hook=None, post_request_hook=None):"""Wraps a WSGI application in a more convenient interface fortesting.``app`` may be an application, or a Paste Deploy appURI, like ``'config:filename.ini#test'``.``namespace`` is a dictionary th... | 3 | 15 | 7 | 100 | 0 | 101 | 144 | 101 | self,server | [] | None | {"Assign": 3, "Expr": 1} | 1 | 11 | 1 | ["warnings.warn"] | 6,814 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.Autotools.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.CMake.__init__", "_.content.... | The function (__init__) defined within the public class called Dummy_smtplib.The function start at line 101 and ends at 144. It contains 15 lines of code and it has a cyclomatic complexity of 3. It takes 7 parameters, represented as [101.0] and does not return any value. It declare 1.0 function, It has 1.0 function cal... |
pasteorg_paste | Dummy_smtplib | public | 0 | 0 | reset | def reset(self):"""Resets the state of the application; currently just clearssaved cookies."""self.cookies = {} | 1 | 2 | 1 | 12 | 0 | 146 | 151 | 146 | self | [] | None | {"Assign": 1} | 0 | 4 | 0 | [] | 24 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3537219_anthraxx_diffoscope.tests.conftest_py.reset_progress", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3637699_magicalraccoon_tootstream.src.tootstream.toot_parser_py.TootParser.reset", "_.content.gdrive.MyDri... | The function (reset) defined within the public class called Dummy_smtplib.The function start at line 146 and ends at 151. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It has 24.0 functions calling this function which are ["... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.