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 | PermissionSpec | public | 0 | 1 | __init__ | def __init__(self, path):self.path = path | 1 | 2 | 2 | 12 | 0 | 420 | 421 | 345 | self | [] | None | {"Assign": 1} | 0 | 2 | 0 | [] | 8,182 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15197461_googleapis_python_cloud_core.google.cloud._helpers.__init___py._LocalStack.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16798231_kapji_capital_gains_calculator.cgt_calc.exceptions_py.AmountMissi... | The function (__init__) defined within the public class called PermissionSpec, that inherit another class.The function start at line 420 and ends at 421. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [345.0] and does not return any value. It has 8182.0 functi... |
pasteorg_pastescript | _Rule | protected | 0 | 1 | noexists | def noexists(self, path, checker):checker.noexists(path) | 1 | 2 | 3 | 15 | 0 | 425 | 426 | 425 | self | [] | Returns | {"Return": 1} | 0 | 2 | 0 | [] | 0 | [] | The function (noexists) defined within the protected class called _Rule, that inherit another class.The function start at line 425 and ends at 426. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [425.0], and this function return a value.. |
pasteorg_pastescript | PermissionSpec | public | 0 | 1 | check | def check(self, path, checker):checker.check(path) | 1 | 2 | 3 | 15 | 0 | 428 | 429 | 428 | self | [] | None | {"Assign": 1, "Expr": 1} | 2 | 3 | 2 | ["_Check", "self.traverse"] | 158 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3580082_pacificbiosciences_falcon.test.test_functional_py.test_calc_cutoff_from_reverse_sorted_readlength_counts", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3580082_pacificbiosciences_falcon.test.test_functional... | The function (check) defined within the public class called PermissionSpec, that inherit another class.The function start at line 428 and ends at 429. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [428.0] and does not return any value. It declares 2.0 functio... |
pasteorg_pastescript | _Rule | protected | 0 | 1 | noexists | def noexists(self, path, checker):pass | 1 | 2 | 3 | 10 | 0 | 433 | 434 | 433 | self | [] | Returns | {"Return": 1} | 0 | 2 | 0 | [] | 0 | [] | The function (noexists) defined within the protected class called _Rule, that inherit another class.The function start at line 433 and ends at 434. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [433.0], and this function return a value.. |
pasteorg_pastescript | PermissionSpec | public | 0 | 1 | check | def check(self, path, checker):checker.check(path) | 1 | 2 | 3 | 15 | 0 | 436 | 437 | 428 | self | [] | None | {"Assign": 1, "Expr": 1} | 2 | 3 | 2 | ["_Check", "self.traverse"] | 158 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3580082_pacificbiosciences_falcon.test.test_functional_py.test_calc_cutoff_from_reverse_sorted_readlength_counts", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3580082_pacificbiosciences_falcon.test.test_functional... | The function (check) defined within the public class called PermissionSpec, that inherit another class.The function start at line 436 and ends at 437. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [428.0] and does not return any value. It declares 2.0 functio... |
pasteorg_pastescript | public | public | 0 | 0 | cpwsgi_server | def cpwsgi_server(app, global_conf=None, host='127.0.0.1', port=None,ssl_pem=None, protocol_version=None, numthreads=None,server_name=None, max=None, request_queue_size=None,timeout=None):"""Serves the specified WSGI app via CherryPyWSGIServer.``app``The WSGI 'application callable'; multiple WSGI applicationsmay be pas... | 14 | 40 | 11 | 253 | 7 | 20 | 121 | 20 | app,global_conf,host,port,ssl_pem,protocol_version,numthreads,server_name,max,request_queue_size,timeout | ['protocol', 'is_ssl', 'kwargs', 'port', 'server', 'var', 'bind_addr'] | Returns | {"Assign": 15, "Expr": 5, "For": 1, "If": 8, "Return": 1, "Try": 1} | 10 | 102 | 10 | ["host.split", "int", "locals", "int", "wsgiserver.CherryPyWSGIServer", "BuiltinSSLAdapter", "print", "print", "server.start", "server.stop"] | 0 | [] | The function (cpwsgi_server) defined within the public class called public.The function start at line 20 and ends at 121. It contains 40 lines of code and it has a cyclomatic complexity of 14. It takes 11 parameters, represented as [20.0], and this function return a value. It declares 10.0 functions, and It has 10.0 f... |
pasteorg_pastescript | BadCommand | public | 0 | 1 | __init__ | def __init__(self, message, exit_code=2):self.message = messageself.exit_code = exit_codeException.__init__(self, message) | 1 | 4 | 3 | 29 | 0 | 24 | 27 | 24 | self,message,exit_code | [] | None | {"Assign": 2, "Expr": 1} | 1 | 4 | 1 | ["Exception.__init__"] | 8,182 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15197461_googleapis_python_cloud_core.google.cloud._helpers.__init___py._LocalStack.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16798231_kapji_capital_gains_calculator.cgt_calc.exceptions_py.AmountMissi... | The function (__init__) defined within the public class called BadCommand, that inherit another class.The function start at line 24 and ends at 27. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [24.0] and does not return any value. It declare 1.0 function, It... |
pasteorg_pastescript | BadCommand | public | 0 | 1 | _get_message | def _get_message(self):"""Getter for 'message'; needed only to override deprecationin BaseException."""return self.__message | 1 | 2 | 1 | 10 | 0 | 29 | 32 | 29 | self | [] | Returns | {"Expr": 1, "Return": 1} | 0 | 4 | 0 | [] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3695170_m_o_a_t_distmqtt.moat.mqtt._main_py.do_pub"] | The function (_get_message) defined within the public class called BadCommand, that inherit another class.The function start at line 29 and ends at 32. 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 1.0 function ca... |
pasteorg_pastescript | BadCommand | public | 0 | 1 | _set_message | def _set_message(self, value):"""Setter for 'message'; needed only to override deprecationin BaseException."""self.__message = value | 1 | 2 | 2 | 13 | 0 | 34 | 37 | 34 | self,value | [] | None | {"Assign": 1, "Expr": 1} | 0 | 4 | 0 | [] | 0 | [] | The function (_set_message) defined within the public class called BadCommand, that inherit another class.The function start at line 34 and ends at 37. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [34.0] and does not return any value.. |
pasteorg_pastescript | public | public | 0 | 0 | run | def run(args=None):if (not args andlen(sys.argv) >= 2and os.environ.get('_') and sys.argv[0] != os.environ['_']and os.environ['_'] == sys.argv[1]):# probably it's an exe executionargs = ['exe', os.environ['_']] + sys.argv[2:]if args is None:args = sys.argv[1:]options, args = parser.parse_args(args)options.base_parser =... | 11 | 23 | 1 | 197 | 4 | 73 | 96 | 73 | args | ['commands', 'args', 'command', 'command_name'] | None | {"Assign": 10, "Expr": 3, "If": 5} | 8 | 24 | 8 | ["len", "os.environ.get", "parser.parse_args", "system_plugins.extend", "get_commands", "print", "load", "invoke"] | 668 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3508273_sc3_cookcountyjail.fabfile_py.add_directories", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3508273_sc3_cookcountyjail.fabfile_py.add_project_to_path", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation... | The function (run) defined within the public class called public.The function start at line 73 and ends at 96. It contains 23 lines of code and it has a cyclomatic complexity of 11. The function does not take any parameters and does not return any value. It declares 8.0 functions, It has 8.0 functions called inside whi... |
pasteorg_pastescript | public | public | 0 | 0 | parse_exe_file | def parse_exe_file(config):import shlexp = configparser.RawConfigParser()p.read([config])command_name = 'exe'options = []if p.has_option('exe', 'command'):command_name = p.get('exe', 'command')if p.has_option('exe', 'options'):options = shlex.split(p.get('exe', 'options'))if p.has_option('exe', 'sys.path'):paths = shle... | 6 | 19 | 1 | 165 | 5 | 98 | 116 | 98 | config | ['args', 'command_name', 'paths', 'options', 'p'] | Returns | {"Assign": 8, "Expr": 3, "For": 1, "If": 3, "Return": 1} | 15 | 19 | 15 | ["configparser.RawConfigParser", "p.read", "p.has_option", "p.get", "p.has_option", "shlex.split", "p.get", "p.has_option", "shlex.split", "p.get", "os.path.abspath", "os.path.join", "os.path.dirname", "pkg_resources.working_set.add_entry", "sys.path.insert"] | 0 | [] | The function (parse_exe_file) defined within the public class called public.The function start at line 98 and ends at 116. It contains 19 lines of code and it has a cyclomatic complexity of 6. The function does not take any parameters, and this function return a value. It declares 15.0 functions, and It has 15.0 funct... |
pasteorg_pastescript | public | public | 0 | 0 | get_commands | def get_commands():plugins = system_plugins[:]egg_info_dir = pluginlib.find_egg_info_dir(os.getcwd())if egg_info_dir:plugins.append(os.path.splitext(os.path.basename(egg_info_dir))[0])base_dir = os.path.dirname(egg_info_dir)if base_dir not in sys.path:sys.path.insert(0, base_dir)pkg_resources.working_set.add_entry(base... | 3 | 13 | 0 | 112 | 4 | 118 | 130 | 118 | ['commands', 'base_dir', 'plugins', 'egg_info_dir'] | Returns | {"Assign": 5, "Expr": 4, "If": 2, "Return": 1} | 12 | 13 | 12 | ["pluginlib.find_egg_info_dir", "os.getcwd", "plugins.append", "os.path.splitext", "os.path.basename", "os.path.dirname", "sys.path.insert", "pkg_resources.working_set.add_entry", "pluginlib.resolve_plugins", "pluginlib.load_commands_from_plugins", "commands.update", "pluginlib.load_global_commands"] | 8 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3681862_fschulze_mr_developer.src.mr.developer.develop_py.Develop.__call__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3681862_fschulze_mr_developer.src.mr.developer.tests.test_common_py.test_find_internal_comma... | The function (get_commands) defined within the public class called public.The function start at line 118 and ends at 130. It contains 13 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters, and this function return a value. It declares 12.0 functions, It has 12.0 functions c... | |
pasteorg_pastescript | public | public | 0 | 0 | invoke | def invoke(command, command_name, options, args):try:runner = command(command_name)exit_code = runner.run(args)except BadCommand as e:print(e.message)exit_code = e.exit_codesys.exit(exit_code) | 2 | 8 | 4 | 49 | 2 | 132 | 139 | 132 | command,command_name,options,args | ['runner', 'exit_code'] | None | {"Assign": 3, "Expr": 2, "Try": 1} | 4 | 8 | 4 | ["command", "runner.run", "print", "sys.exit"] | 18 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3926013_duniter_silkaj.tests.test_checksum_py.test_checksum_command", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3926013_duniter_silkaj.tests.test_cli_py.test_cli_dry_run_display_options_passed_together", "_.cont... | The function (invoke) defined within the public class called public.The function start at line 132 and ends at 139. It contains 8 lines of code and it has a cyclomatic complexity of 2. It takes 4 parameters, represented as [132.0] and does not return any value. It declares 4.0 functions, It has 4.0 functions called ins... |
pasteorg_pastescript | BadCommand | public | 0 | 1 | __init__ | def __init__(self, name):self.command_name = name | 1 | 2 | 2 | 12 | 0 | 144 | 145 | 144 | self,message,exit_code | [] | None | {"Assign": 2, "Expr": 1} | 1 | 4 | 1 | ["Exception.__init__"] | 8,182 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15197461_googleapis_python_cloud_core.google.cloud._helpers.__init___py._LocalStack.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16798231_kapji_capital_gains_calculator.cgt_calc.exceptions_py.AmountMissi... | The function (__init__) defined within the public class called BadCommand, that inherit another class.The function start at line 144 and ends at 145. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [144.0] and does not return any value. It declare 1.0 function,... |
pasteorg_pastescript | public | public | 0 | 0 | run | def run(self, args):self.parse_args(args)# Setup defaults:for name, default in [('verbose', 0),('quiet', 0),('interactive', False),('overwrite', False)]:if not hasattr(self.options, name):setattr(self.options, name, default)if getattr(self.options, 'simulate', False):self.options.verbose = max(self.options.verbose, 1)s... | 18 | 50 | 2 | 402 | 0 | 178 | 234 | 178 | args | [] | None | {"Assign": 10, "Expr": 3, "If": 5} | 8 | 24 | 8 | ["len", "os.environ.get", "parser.parse_args", "system_plugins.extend", "get_commands", "print", "load", "invoke"] | 668 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3508273_sc3_cookcountyjail.fabfile_py.add_directories", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3508273_sc3_cookcountyjail.fabfile_py.add_project_to_path", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation... | The function (run) defined within the public class called public.The function start at line 178 and ends at 234. It contains 50 lines of code and it has a cyclomatic complexity of 18. It takes 2 parameters, represented as [178.0] and does not return any value. It declares 8.0 functions, It has 8.0 functions called insi... |
pasteorg_pastescript | Command | public | 0 | 1 | parse_args | def parse_args(self, args):if self.usage:usage = ' '+self.usageelse:usage = ''self.parser.usage = "%%prog [options]%s\n%s" % (usage, self.summary)self.parser.prog = self._prog_name()if self.description:desc = self.descriptiondesc = textwrap.dedent(desc)self.parser.description = descself.options, self.args = self.parser... | 3 | 13 | 2 | 91 | 0 | 236 | 248 | 236 | self,args | [] | None | {"Assign": 8, "If": 2} | 3 | 13 | 3 | ["self._prog_name", "textwrap.dedent", "self.parser.parse_args"] | 297 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16798231_kapji_capital_gains_calculator.cgt_calc.main_py.main", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3580082_pacificbiosciences_falcon.falcon_kit.mains.build_pdb_py.main", "_.content.gdrive.MyDrive.Phd_Thes... | The function (parse_args) defined within the public class called Command, that inherit another class.The function start at line 236 and ends at 248. It contains 13 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [236.0] and does not return any value. It declares 3.0 function... |
pasteorg_pastescript | Command | public | 0 | 1 | _prog_name | def _prog_name(self):return '%s %s' % (os.path.basename(sys.argv[0]), self.command_name) | 1 | 2 | 1 | 27 | 0 | 250 | 251 | 250 | self | [] | Returns | {"Return": 1} | 1 | 2 | 1 | ["os.path.basename"] | 0 | [] | The function (_prog_name) defined within the public class called Command, that inherit another class.The function start at line 250 and ends at 251. 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_pastescript | Command | public | 0 | 1 | here | def here(cls):mod = sys.modules[cls.__module__]return os.path.dirname(mod.__file__) | 1 | 3 | 1 | 26 | 0 | 257 | 259 | 257 | cls | [] | Returns | {"Assign": 1, "Return": 1} | 1 | 3 | 1 | ["os.path.dirname"] | 0 | [] | The function (here) defined within the public class called Command, that inherit another class.The function start at line 257 and ends at 259. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declare 1.0 function, and I... |
pasteorg_pastescript | Command | public | 0 | 1 | ask | def ask(self, prompt, safe=False, default=True):"""Prompt the user.Default can be true, false, ``'careful'`` or``'none'``.If ``'none'`` then the user must enter y/n.If``'careful'`` then the user must enter yes/no (long form).If the interactive option is over two (``-ii``) then ``safe``will be used as a default.This opt... | 11 | 26 | 4 | 146 | 0 | 263 | 299 | 263 | self,prompt,safe,default | [] | Returns | {"Assign": 2, "AugAssign": 4, "Expr": 4, "If": 9, "Return": 3, "While": 1} | 8 | 37 | 8 | ["lower", "strip", "input", "print", "print", "lower", "lower", "print"] | 3 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3691476_jasongross_coq_tools.coq_tools.find_bug_py.get_error_reg_string", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3691476_jasongross_coq_tools.coq_tools.find_bug_py.get_error_reg_string_of_output", "_.content.... | The function (ask) defined within the public class called Command, that inherit another class.The function start at line 263 and ends at 299. It contains 26 lines of code and it has a cyclomatic complexity of 11. It takes 4 parameters, represented as [263.0], and this function return a value. It declares 8.0 functions,... |
pasteorg_pastescript | Command | public | 0 | 1 | challenge | def challenge(self, prompt, default=NoDefault, should_echo=True):"""Prompt the user for a variable."""if default is not NoDefault:prompt += ' [%r]' % defaultprompt += ': 'while 1:if should_echo:prompt_method = inputelse:prompt_method = getpass.getpassresponse = prompt_method(prompt).strip()if not response:if default is... | 6 | 17 | 4 | 75 | 0 | 301 | 320 | 301 | self,prompt,default,should_echo | [] | Returns | {"Assign": 3, "AugAssign": 2, "Expr": 1, "If": 4, "Return": 2, "While": 1} | 2 | 20 | 2 | ["strip", "prompt_method"] | 0 | [] | The function (challenge) defined within the public class called Command, that inherit another class.The function start at line 301 and ends at 320. It contains 17 lines of code and it has a cyclomatic complexity of 6. It takes 4 parameters, represented as [301.0], and this function return a value. It declares 2.0 funct... |
pasteorg_pastescript | Command | public | 0 | 1 | pad | def pad(self, s, length, dir='left'):if len(s) >= length:return sif dir == 'left':return s + ' '*(length-len(s))else:return ' '*(length-len(s)) + s | 3 | 7 | 4 | 56 | 0 | 322 | 328 | 322 | self,s,length,dir | [] | Returns | {"If": 2, "Return": 3} | 3 | 7 | 3 | ["len", "len", "len"] | 9 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3701896_chainer_chainer_chemistry.tests.utils_tests.test_sparse_utils_py.naive_convert", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69485146_mgaido91_fbk_fairseq_st.fairseq.modules.character_token_embedder_py.Cha... | The function (pad) defined within the public class called Command, that inherit another class.The function start at line 322 and ends at 328. It contains 7 lines of code and it has a cyclomatic complexity of 3. It takes 4 parameters, represented as [322.0], and this function return a value. It declares 3.0 functions, I... |
pasteorg_pastescript | Command | public | 0 | 1 | standard_parser | def standard_parser(cls, verbose=True,interactive=False,no_interactive=False,simulate=False,quiet=False,overwrite=False):"""Create a standard ``OptionParser`` instance.Typically used like::class MyCommand(Command):parser = Command.standard_parser()Subclasses may redefine ``standard_parser``, so use thenearest superclas... | 7 | 38 | 7 | 175 | 0 | 330 | 378 | 330 | cls,verbose,interactive,no_interactive,simulate,quiet,overwrite | [] | Returns | {"Assign": 1, "Expr": 7, "If": 6, "Return": 1} | 7 | 49 | 7 | ["bool_optparse.BoolOptionParser", "parser.add_option", "parser.add_option", "parser.add_option", "parser.add_option", "parser.add_option", "parser.add_option"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051046_pasteorg_pastescript.paste.script.appinstall_py.AbstractInstallCommand.standard_parser"] | The function (standard_parser) defined within the public class called Command, that inherit another class.The function start at line 330 and ends at 378. It contains 38 lines of code and it has a cyclomatic complexity of 7. It takes 7 parameters, represented as [330.0], and this function return a value. It declares 7.0... |
pasteorg_pastescript | Command | public | 0 | 1 | shorten | def shorten(self, fn, *paths):"""Return a shorted form of the filename (relative to the currentdirectory), typically for displaying in messages.If``*paths`` are present, then use os.path.join to create thefull filename before shortening."""if paths:fn = os.path.join(fn, *paths)if fn.startswith(os.getcwd()):return fn[le... | 3 | 7 | 3 | 65 | 0 | 382 | 394 | 382 | self,fn,*paths | [] | Returns | {"Assign": 1, "Expr": 1, "If": 2, "Return": 2} | 6 | 13 | 6 | ["os.path.join", "fn.startswith", "os.getcwd", "lstrip", "len", "os.getcwd"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69709534_toni880_tonic_userbot.userbot.modules.anilist_py.anilist"] | The function (shorten) defined within the public class called Command, that inherit another class.The function start at line 382 and ends at 394. It contains 7 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [382.0], and this function return a value. It declares 6.0 function... |
pasteorg_pastescript | Command | public | 0 | 1 | ensure_dir | def ensure_dir(self, dir, svn_add=True):"""Ensure that the directory exists, creating it if necessary.Respects verbosity and simulation.Adds directory to subversion if ``.svn/`` directory exists inparent, and directory was created."""dir = dir.rstrip(os.sep)if not dir:# we either reached the parent-most directory, or w... | 8 | 16 | 3 | 137 | 0 | 396 | 423 | 396 | self,dir,svn_add | [] | None | {"Assign": 1, "Expr": 6, "If": 6, "Return": 1} | 13 | 28 | 13 | ["dir.rstrip", "os.path.exists", "self.ensure_dir", "os.path.dirname", "print", "self.shorten", "os.mkdir", "os.path.exists", "os.path.join", "os.path.dirname", "self.svn_command", "print", "self.shorten"] | 0 | [] | The function (ensure_dir) defined within the public class called Command, that inherit another class.The function start at line 396 and ends at 423. It contains 16 lines of code and it has a cyclomatic complexity of 8. It takes 3 parameters, represented as [396.0] and does not return any value. It declares 13.0 functio... |
pasteorg_pastescript | Command | public | 0 | 1 | ensure_file | def ensure_file(self, filename, content, svn_add=True):"""Ensure a file named ``filename`` exists with the givencontent.If ``--interactive`` has been enabled, this will askthe user what to do if a file exists with different content."""global difflibassert content is not None, ("You cannot pass a content of None")self.e... | 17 | 52 | 4 | 313 | 0 | 425 | 482 | 425 | self,filename,content,svn_add | [] | None | {"Assign": 7, "Expr": 14, "If": 14, "Return": 4, "While": 1} | 31 | 58 | 31 | ["self.ensure_dir", "os.path.dirname", "os.path.exists", "print", "open", "f.write", "f.close", "os.path.exists", "os.path.join", "os.path.dirname", "self.svn_command", "open", "f.read", "f.close", "print", "print", "difflib.context_diff", "content.splitlines", "old_content.splitlines", "print", "join", "lower", "strip... | 0 | [] | The function (ensure_file) defined within the public class called Command, that inherit another class.The function start at line 425 and ends at 482. It contains 52 lines of code and it has a cyclomatic complexity of 17. It takes 4 parameters, represented as [425.0] and does not return any value. It declares 31.0 funct... |
pasteorg_pastescript | Command | public | 0 | 1 | insert_into_file | def insert_into_file(self, filename, marker_name, text, indent=False):"""Inserts ``text`` into the file, right after the given marker.Markers look like: ``-*- <marker_name>[:]? -*-``, and the textwill go on the immediately following line.Raises ``ValueError`` if the marker is not found.If ``indent`` is true, then the t... | 15 | 42 | 5 | 316 | 0 | 484 | 541 | 484 | self,filename,marker_name,text,indent | [] | None | {"Assign": 9, "Expr": 9, "For": 1, "If": 9, "Return": 2} | 31 | 58 | 31 | ["text.endswith", "ValueError", "os.path.exists", "print", "self.shorten", "open", "f.readlines", "f.close", "re.compile", "re.escape", "range", "len", "regex.search", "len", "startswith", "strip", "join", "text.strip", "print", "print", "text.lstrip", "re.search", "match.group", "print", "ValueError", "print", "self.s... | 0 | [] | The function (insert_into_file) defined within the public class called Command, that inherit another class.The function start at line 484 and ends at 541. It contains 42 lines of code and it has a cyclomatic complexity of 15. It takes 5 parameters, represented as [484.0] and does not return any value. It declares 31.0 ... |
pasteorg_pastescript | Command | public | 0 | 1 | run_command | def run_command(self, cmd, *args, **kw):"""Runs the command, respecting verbosity and simulation.Returns stdout, or None if simulating.Keyword arguments:cwd:the current working directory to run the command incapture_stderr:if true, then both stdout and stderr will be returnedexpect_returncode:if true, then don't fail i... | 18 | 54 | 4 | 329 | 0 | 543 | 612 | 543 | self,cmd,*args,**kw | [] | Returns | {"Assign": 13, "Expr": 11, "If": 14, "Return": 2, "Try": 1} | 26 | 70 | 26 | ["RuntimeError", "self.quote_first_command_arg", "popdefault", "os.getcwd", "popdefault", "popdefault", "popdefault", "popdefault", "subprocess.Popen", "list", "OSError", "print", "join", "proc.communicate", "print", "join", "print", "print", "OSError", "print", "print", "print", "print", "print", "join", "print"] | 34 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3584344_influxgraph_influxgraph.influxgraph._version_py.git_pieces_from_vcs", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3584344_influxgraph_influxgraph.versioneer_py.do_vcs_install", "_.content.gdrive.MyDrive.Ph... | The function (run_command) defined within the public class called Command, that inherit another class.The function start at line 543 and ends at 612. It contains 54 lines of code and it has a cyclomatic complexity of 18. It takes 4 parameters, represented as [543.0], and this function return a value. It declares 26.0 f... |
pasteorg_pastescript | Command | public | 0 | 1 | quote_first_command_arg | def quote_first_command_arg(self, arg):"""There's a bug in Windows when running an executable that'slocated inside a path with a space in it.This method handlesthat case, or on non-Windows systems or an executable with nospaces, it just leaves well enough alone."""if (sys.platform != 'win32'or ' ' not in arg):# Problem... | 4 | 13 | 2 | 50 | 0 | 614 | 633 | 614 | self,arg | [] | Returns | {"Assign": 1, "Expr": 1, "If": 1, "Return": 2, "Try": 1} | 2 | 20 | 2 | ["ValueError", "win32api.GetShortPathName"] | 0 | [] | The function (quote_first_command_arg) defined within the public class called Command, that inherit another class.The function start at line 614 and ends at 633. It contains 13 lines of code and it has a cyclomatic complexity of 4. It takes 2 parameters, represented as [614.0], and this function return a value. It decl... |
pasteorg_pastescript | Command | public | 0 | 1 | svn_command | def svn_command(self, *args, **kw):"""Run an svn command, but don't raise an exception if it fails."""try:return self.run_command('svn', *args, **kw)except OSError as e:if not self._svn_failed:print('Unable to run svn command (%s); proceeding anyway' % e)self._svn_failed = True | 3 | 7 | 3 | 49 | 0 | 637 | 646 | 637 | self,*args,**kw | [] | Returns | {"Assign": 1, "Expr": 2, "If": 1, "Return": 1, "Try": 1} | 2 | 10 | 2 | ["self.run_command", "print"] | 0 | [] | The function (svn_command) defined within the public class called Command, that inherit another class.The function start at line 637 and ends at 646. It contains 7 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [637.0], and this function return a value. It declares 2.0 func... |
pasteorg_pastescript | Command | public | 0 | 1 | write_file | def write_file(self, filename, content, source=None, binary=True, svn_add=True):"""Like ``ensure_file``, but without the interactivity.Mostlydeprecated.(I think I forgot it existed)"""import warningswarnings.warn("command.write_file has been replaced with ""command.ensure_file",DeprecationWarning, 2)if os.path.exists(f... | 16 | 39 | 6 | 262 | 0 | 648 | 690 | 648 | self,filename,content,source,binary,svn_add | [] | None | {"Assign": 6, "Expr": 9, "If": 11, "Return": 2} | 23 | 43 | 23 | ["warnings.warn", "os.path.exists", "open", "open", "f.read", "f.close", "print", "self.shorten", "self.ask", "print", "self.shorten", "self.shorten", "print", "self.shorten", "os.path.exists", "open", "open", "f.write", "f.close", "os.path.exists", "os.path.join", "os.path.dirname", "self.svn_command"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95131422_fosslight_fosslight_util.src.fosslight_util.write_spdx_py.write_spdx"] | The function (write_file) defined within the public class called Command, that inherit another class.The function start at line 648 and ends at 690. It contains 39 lines of code and it has a cyclomatic complexity of 16. It takes 6 parameters, represented as [648.0] and does not return any value. It declares 23.0 functi... |
pasteorg_pastescript | Command | public | 0 | 1 | parse_vars | def parse_vars(self, args):"""Given variables like ``['a=b', 'c=d']`` turns it into ``{'a':'b', 'c': 'd'}``"""result = {}for arg in args:if '=' not in arg:raise BadCommand('Variable assignment %r invalid (no "=")'% arg)name, value = arg.split('=', 1)result[name] = valuereturn result | 3 | 10 | 2 | 50 | 0 | 692 | 705 | 692 | self,args | [] | Returns | {"Assign": 3, "Expr": 1, "For": 1, "If": 1, "Return": 1} | 2 | 14 | 2 | ["BadCommand", "arg.split"] | 0 | [] | The function (parse_vars) defined within the public class called Command, that inherit another class.The function start at line 692 and ends at 705. It contains 10 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [692.0], and this function return a value. It declares 2.0 func... |
pasteorg_pastescript | Command | public | 0 | 1 | read_vars | def read_vars(self, config, section='pastescript'):"""Given a configuration filename, this will return a map of values."""result = {}p = configparser.RawConfigParser()p.read([config])if p.has_section(section):for key, value in p.items(section):if key.endswith('__eval__'):result[key[:-len('__eval__')]] = eval(value)else... | 4 | 11 | 3 | 86 | 0 | 707 | 720 | 707 | self,config,section | [] | Returns | {"Assign": 4, "Expr": 2, "For": 1, "If": 2, "Return": 1} | 7 | 14 | 7 | ["configparser.RawConfigParser", "p.read", "p.has_section", "p.items", "key.endswith", "len", "eval"] | 0 | [] | The function (read_vars) defined within the public class called Command, that inherit another class.The function start at line 707 and ends at 720. It contains 11 lines of code and it has a cyclomatic complexity of 4. It takes 3 parameters, represented as [707.0], and this function return a value. It declares 7.0 funct... |
pasteorg_pastescript | Command | public | 0 | 1 | write_vars | def write_vars(self, config, vars, section='pastescript'):"""Given a configuration filename, this will add items in thevars mapping to the configuration file.Will create theconfiguration file if it doesn't exist."""modified = Falsep = configparser.RawConfigParser()if not os.path.exists(config):f = open(config, 'w')f.wr... | 8 | 23 | 4 | 170 | 0 | 722 | 752 | 722 | self,config,vars,section | [] | None | {"Assign": 7, "Expr": 8, "For": 1, "If": 5} | 16 | 31 | 16 | ["configparser.RawConfigParser", "os.path.exists", "open", "f.write", "f.close", "p.read", "p.has_section", "p.add_section", "p.options", "vars.items", "isinstance", "p.set", "repr", "p.set", "p.write", "open"] | 0 | [] | The function (write_vars) defined within the public class called Command, that inherit another class.The function start at line 722 and ends at 752. It contains 23 lines of code and it has a cyclomatic complexity of 8. It takes 4 parameters, represented as [722.0] and does not return any value. It declares 16.0 functio... |
pasteorg_pastescript | Command | public | 0 | 1 | indent_block | def indent_block(self, text, indent=2, initial=None):"""Indent the block of text (each line is indented).If you give``initial``, then that is used in lieue of ``indent`` for thefirst line."""if initial is None:initial = indentlines = text.splitlines()first = (' '*initial) + lines[0]rest = [(' '*indent)+l for l in lines... | 3 | 7 | 4 | 73 | 0 | 754 | 765 | 754 | self,text,indent,initial | [] | Returns | {"Assign": 4, "Expr": 1, "If": 1, "Return": 1} | 2 | 12 | 2 | ["text.splitlines", "join"] | 0 | [] | The function (indent_block) defined within the public class called Command, that inherit another class.The function start at line 754 and ends at 765. It contains 7 lines of code and it has a cyclomatic complexity of 3. It takes 4 parameters, represented as [754.0], and this function return a value. It declares 2.0 fun... |
pasteorg_pastescript | Command | public | 0 | 1 | logging_file_config | def logging_file_config(self, config_file):"""Setup logging via the logging module's fileConfig function with thespecified ``config_file``, if applicable.ConfigParser defaults are specified for the special ``__file__``and ``here`` variables, similar to PasteDeploy config loading."""parser = configparser.ConfigParser()p... | 2 | 7 | 2 | 63 | 0 | 767 | 780 | 767 | self,config_file | [] | None | {"Assign": 2, "Expr": 3, "If": 1} | 7 | 14 | 7 | ["configparser.ConfigParser", "parser.read", "parser.has_section", "os.path.abspath", "fileConfig", "dict", "os.path.dirname"] | 0 | [] | The function (logging_file_config) defined within the public class called Command, that inherit another class.The function start at line 767 and ends at 780. It contains 7 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [767.0] and does not return any value. It declares 7.0 ... |
pasteorg_pastescript | public | public | 0 | 0 | run | def run(self, args):#for name, value in os.environ.items():#print '%s: %s' % (name, value)#print sys.argvprint(('Command %r not known (you may need to run setup.py egg_info)' % self.command_name))commands = sorted(get_commands().items())if not commands:print('No commands registered.')print('Have you installed Paste Scr... | 4 | 15 | 2 | 102 | 0 | 784 | 801 | 784 | args | [] | None | {"Assign": 10, "Expr": 3, "If": 5} | 8 | 24 | 8 | ["len", "os.environ.get", "parser.parse_args", "system_plugins.extend", "get_commands", "print", "load", "invoke"] | 668 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3508273_sc3_cookcountyjail.fabfile_py.add_directories", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3508273_sc3_cookcountyjail.fabfile_py.add_project_to_path", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation... | The function (run) defined within the public class called public.The function start at line 784 and ends at 801. It contains 15 lines of code and it has a cyclomatic complexity of 4. It takes 2 parameters, represented as [784.0] and does not return any value. It declares 8.0 functions, It has 8.0 functions called insid... |
pasteorg_pastescript | public | public | 0 | 0 | popdefault | def popdefault(dict, name, default=None):if name not in dict:return defaultelse:v = dict[name]del dict[name]return v | 2 | 7 | 3 | 34 | 1 | 803 | 809 | 803 | dict,name,default | ['v'] | Returns | {"Assign": 1, "If": 1, "Return": 2} | 0 | 7 | 0 | [] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051046_pasteorg_pastescript.paste.script.command_py.Command.run_command", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051046_pasteorg_pastescript.paste.script.filemaker_py.FileOp.run_command"] | The function (popdefault) defined within the public class called public.The function start at line 803 and ends at 809. It contains 7 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [803.0], and this function return a value. It has 2.0 functions calling this function which a... |
pasteorg_pastescript | public | public | 0 | 0 | copy_dir | def copy_dir(source, dest, vars, verbosity, simulate, indent=0, use_cheetah=False, sub_vars=True, interactive=False, svn_add=True, overwrite=True, template_renderer=None):"""Copies the ``source`` directory to the ``dest`` directory.``vars``: A dictionary of variables to use in any substitutions.``verbosity``: Higher nu... | 44 | 112 | 12 | 808 | 12 | 25 | 170 | 25 | source,dest,vars,verbosity,simulate,indent,use_cheetah,sub_vars,interactive,svn_add,overwrite,template_renderer | ['proc', 'content', 'already_exists', 'cmd', 'names', 'sub_file', 'old_content', 'use_pkg_resources', 'pad', 'full', 'dest_full', 'reason'] | None | {"Assign": 23, "Expr": 21, "For": 1, "If": 34, "Try": 1, "With": 3} | 56 | 146 | 56 | ["vars.setdefault", "vars.setdefault", "isinstance", "pkg_resources.resource_listdir", "os.listdir", "names.sort", "os.path.exists", "print", "svn_makedirs", "print", "join", "os.path.join", "should_skip_file", "print", "os.path.join", "substitute_filename", "dest_full.endswith", "pkg_resources.resource_isdir", "print"... | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051046_pasteorg_pastescript.paste.script.copydir_py.copy_dir"] | The function (copy_dir) defined within the public class called public.The function start at line 25 and ends at 170. It contains 112 lines of code and it has a cyclomatic complexity of 44. It takes 12 parameters, represented as [25.0] and does not return any value. It declares 56.0 functions, It has 56.0 functions call... |
pasteorg_pastescript | public | public | 0 | 0 | should_skip_file | def should_skip_file(name):"""Checks if a file should be skipped based on its name.If it should be skipped, returns the reason, otherwise returnsNone."""if name.startswith('.'):return 'Skipping hidden file %(filename)s'if name.endswith('~') or name.endswith('.bak'):return 'Skipping backup file %(filename)s'if name.ends... | 8 | 12 | 1 | 85 | 0 | 172 | 189 | 172 | name | [] | Returns | {"Expr": 1, "If": 5, "Return": 6} | 7 | 18 | 7 | ["name.startswith", "name.endswith", "name.endswith", "name.endswith", "name.endswith", "os.path.splitext", "name.endswith"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051046_pasteorg_pastescript.paste.script.copydir_py.copy_dir"] | The function (should_skip_file) defined within the public class called public.The function start at line 172 and ends at 189. It contains 12 lines of code and it has a cyclomatic complexity of 8. The function does not take any parameters, and this function return a value. It declares 7.0 functions, It has 7.0 functions... |
pasteorg_pastescript | public | public | 0 | 0 | query_interactive | def query_interactive(src_fn, dest_fn, src_content, dest_content,simulate):global all_answerfrom difflib import unified_diff, context_diffu_diff = list(unified_diff(dest_content.splitlines(),src_content.splitlines(),dest_fn, src_fn))c_diff = list(context_diff(dest_content.splitlines(),src_content.splitlines(),dest_fn, ... | 22 | 58 | 5 | 390 | 11 | 194 | 251 | 194 | src_fn,dest_fn,src_content,dest_content,simulate | ['all_answer', 'n', 'rest', 'u_diff', 'c_diff', 'prompt', 'response', 'added', 'new_dest_fn', 'msg', 'removed'] | Returns | {"Assign": 15, "AugAssign": 1, "Expr": 7, "If": 11, "Return": 3, "While": 2} | 34 | 58 | 34 | ["list", "unified_diff", "dest_content.splitlines", "src_content.splitlines", "list", "context_diff", "dest_content.splitlines", "src_content.splitlines", "len", "l.startswith", "l.startswith", "len", "l.startswith", "l.startswith", "print", "len", "len", "len", "dest_content.splitlines", "lower", "strip", "input", "os... | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051046_pasteorg_pastescript.paste.script.copydir_py.copy_dir"] | The function (query_interactive) defined within the public class called public.The function start at line 194 and ends at 251. It contains 58 lines of code and it has a cyclomatic complexity of 22. It takes 5 parameters, represented as [194.0], and this function return a value. It declares 34.0 functions, It has 34.0 f... |
pasteorg_pastescript | public | public | 0 | 0 | svn_makedirs | def svn_makedirs(dir, svn_add, verbosity, pad):parent = os.path.dirname(os.path.abspath(dir))if not os.path.exists(parent):svn_makedirs(parent, svn_add, verbosity, pad)os.mkdir(dir)if not svn_add:returnif os.system('svn info %r >/dev/null 2>&1' % parent) > 0:if verbosity > 1:print('%sNot part of a svn working copy; can... | 8 | 19 | 4 | 151 | 3 | 263 | 281 | 263 | dir,svn_add,verbosity,pad | ['proc', 'parent', 'cmd'] | None | {"Assign": 4, "Expr": 6, "If": 6, "Return": 2} | 13 | 19 | 13 | ["os.path.dirname", "os.path.abspath", "os.path.exists", "svn_makedirs", "os.mkdir", "os.system", "print", "print", "join", "subprocess.Popen", "proc.communicate", "print", "print"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051046_pasteorg_pastescript.paste.script.copydir_py.copy_dir", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051046_pasteorg_pastescript.paste.script.copydir_py.svn_makedirs"] | The function (svn_makedirs) defined within the public class called public.The function start at line 263 and ends at 281. It contains 19 lines of code and it has a cyclomatic complexity of 8. It takes 4 parameters, represented as [263.0] and does not return any value. It declares 13.0 functions, It has 13.0 functions c... |
pasteorg_pastescript | public | public | 0 | 0 | substitute_filename | def substitute_filename(fn, vars):for var, value in vars.items():fn = fn.replace('+%s+' % var, str(value))return fn | 2 | 4 | 2 | 35 | 1 | 283 | 286 | 283 | fn,vars | ['fn'] | Returns | {"Assign": 1, "For": 1, "Return": 1} | 3 | 4 | 3 | ["vars.items", "fn.replace", "str"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051046_pasteorg_pastescript.paste.script.copydir_py.copy_dir"] | The function (substitute_filename) defined within the public class called public.The function start at line 283 and ends at 286. It contains 4 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [283.0], and this function return a value. It declares 3.0 functions, It has 3.0 fun... |
pasteorg_pastescript | public | public | 0 | 0 | substitute_content | def substitute_content(content, vars, filename='<string>', use_cheetah=False, template_renderer=None):global Cheetahv = standard_vars.copy()v.update(vars)vars = vif template_renderer is not None:return template_renderer(content, vars, filename=filename)if not use_cheetah:tmpl = LaxTemplate(content)try:return tmpl.subst... | 5 | 20 | 5 | 126 | 3 | 288 | 307 | 288 | content,vars,filename,use_cheetah,template_renderer | ['tmpl', 'v', 'vars'] | Returns | {"Assign": 4, "Expr": 2, "If": 3, "Return": 3, "Try": 1} | 9 | 20 | 9 | ["standard_vars.copy", "v.update", "template_renderer", "LaxTemplate", "tmpl.substitute", "TypeMapper", "_add_except", "Cheetah.Template.Template", "careful_sub"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051046_pasteorg_pastescript.paste.script.copydir_py.copy_dir"] | The function (substitute_content) defined within the public class called public.The function start at line 288 and ends at 307. It contains 20 lines of code and it has a cyclomatic complexity of 5. It takes 5 parameters, represented as [288.0], and this function return a value. It declares 9.0 functions, It has 9.0 fun... |
pasteorg_pastescript | public | public | 0 | 0 | careful_sub | def careful_sub(cheetah_template, vars, filename):"""Substitutes the template with the variables, using the.body() method if it exists.It assumes that the variableswere also passed in via the searchList."""if not hasattr(cheetah_template, 'body'):return sub_catcher(filename, vars, str, cheetah_template)body = cheetah_t... | 4 | 10 | 3 | 84 | 2 | 309 | 323 | 309 | cheetah_template,vars,filename | ['body', 'call_vars'] | Returns | {"Assign": 4, "Expr": 1, "For": 1, "If": 2, "Return": 2} | 4 | 15 | 4 | ["hasattr", "sub_catcher", "inspect.getargspec", "sub_catcher"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051046_pasteorg_pastescript.paste.script.copydir_py.substitute_content"] | The function (careful_sub) defined within the public class called public.The function start at line 309 and ends at 323. It contains 10 lines of code and it has a cyclomatic complexity of 4. It takes 3 parameters, represented as [309.0], and this function return a value. It declares 4.0 functions, It has 4.0 functions ... |
pasteorg_pastescript | public | public | 0 | 0 | sub_catcher | def sub_catcher(filename, vars, func, *args, **kw):"""Run a substitution, returning the value.If an error occurs, showthe filename.If the error is a NameError, show the variables."""try:return func(*args, **kw)except SkipTemplate as e:print('Skipping file %s' % filename)if str(e):print(str(e))raiseexcept Exception as e... | 6 | 14 | 5 | 96 | 0 | 325 | 342 | 325 | filename,vars,func,*args,**kw | [] | Returns | {"Expr": 5, "For": 1, "If": 2, "Return": 1, "Try": 1} | 10 | 18 | 10 | ["func", "print", "str", "print", "str", "print", "isinstance", "sorted", "vars.items", "print"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051046_pasteorg_pastescript.paste.script.copydir_py.careful_sub"] | The function (sub_catcher) defined within the public class called public.The function start at line 325 and ends at 342. It contains 14 lines of code and it has a cyclomatic complexity of 6. It takes 5 parameters, represented as [325.0], and this function return a value. It declares 10.0 functions, It has 10.0 function... |
pasteorg_pastescript | public | public | 0 | 0 | html_quote | def html_quote(s):if s is None:return ''return html.escape(str(s), 1) | 2 | 4 | 1 | 24 | 0 | 344 | 347 | 344 | s | [] | Returns | {"If": 1, "Return": 2} | 2 | 4 | 2 | ["html.escape", "str"] | 0 | [] | The function (html_quote) defined within the public class called public.The function start at line 344 and ends at 347. It contains 4 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters, and this function return a value. It declares 2.0 functions, and It has 2.0 functions c... |
pasteorg_pastescript | public | public | 0 | 0 | url_quote | def url_quote(s):if s is None:return ''return quote(str(s)) | 2 | 4 | 1 | 20 | 0 | 349 | 352 | 349 | s | [] | Returns | {"If": 1, "Return": 2} | 2 | 4 | 2 | ["quote", "str"] | 0 | [] | The function (url_quote) defined within the public class called public.The function start at line 349 and ends at 352. It contains 4 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters, and this function return a value. It declares 2.0 functions, and It has 2.0 functions ca... |
pasteorg_pastescript | public | public | 0 | 0 | test | def test(conf, true_cond, false_cond=None):if conf:return true_condelse:return false_cond | 2 | 5 | 3 | 20 | 0 | 354 | 358 | 354 | conf,true_cond,false_cond | [] | Returns | {"If": 1, "Return": 2} | 0 | 5 | 0 | [] | 54 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3517602_chromaway_ngcccbase.coloredcoinlib.tests.test_colordef_py.TestEPOBC.test_run_kernel", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3517602_chromaway_ngcccbase.coloredcoinlib.tests.test_colordef_py.TestOBC.t... | The function (test) defined within the public class called public.The function start at line 354 and ends at 358. It contains 5 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [354.0], and this function return a value. It has 54.0 functions calling this function which are ["... |
pasteorg_pastescript | public | public | 0 | 0 | skip_template | def skip_template(condition=True, *args):"""Raise SkipTemplate, which causes copydir to skip the templatebeing processed.If you pass in a condition, only raise if thatcondition is true (allows you to use this with string.Template)If you pass any additional arguments, they will be used toinstantiate SkipTemplate (genera... | 2 | 3 | 2 | 20 | 0 | 360 | 371 | 360 | condition,*args | [] | None | {"Expr": 1, "If": 1} | 1 | 12 | 1 | ["SkipTemplate"] | 0 | [] | The function (skip_template) defined within the public class called public.The function start at line 360 and ends at 371. It contains 3 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [360.0] and does not return any value. It declare 1.0 function, and It has 1.0 function c... |
pasteorg_pastescript | public | public | 0 | 0 | _add_except | def _add_except(exc, info):if not hasattr(exc, 'args') or exc.args is None:returnargs = list(exc.args)if args:args[0] += ' ' + infoelse:args = [info]exc.args = tuple(args)return | 4 | 10 | 2 | 58 | 1 | 373 | 382 | 373 | exc,info | ['args'] | None | {"Assign": 3, "AugAssign": 1, "If": 2, "Return": 2} | 3 | 10 | 3 | ["hasattr", "list", "tuple"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051046_pasteorg_pastescript.paste.script.copydir_py.eval_with_catch", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051046_pasteorg_pastescript.paste.script.copydir_py.substitute_content"] | The function (_add_except) defined within the public class called public.The function start at line 373 and ends at 382. It contains 10 lines of code and it has a cyclomatic complexity of 4. It takes 2 parameters, represented as [373.0] and does not return any value. It declares 3.0 functions, It has 3.0 functions call... |
pasteorg_pastescript | TypeMapper | public | 0 | 1 | __getitem__ | def __getitem__(self, item):options = item.split('|')for op in options[:-1]:try:value = eval_with_catch(op, dict(self.items()))breakexcept (NameError, KeyError):passelse:value = eval(options[-1], dict(self.items()))if value is None:return ''else:return str(value) | 4 | 14 | 2 | 86 | 0 | 400 | 413 | 400 | self,item | [] | Returns | {"Assign": 3, "For": 1, "If": 1, "Return": 2, "Try": 1} | 8 | 14 | 8 | ["item.split", "eval_with_catch", "dict", "self.items", "eval", "dict", "self.items", "str"] | 30 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3535398_idsia_brainstorm.brainstorm.structure.buffer_views_py.BufferView.__getitem__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3573634_xray7224_pypump.pypump.models.feed_py.Lists.__getitem__", "_.content.gdriv... | The function (__getitem__) defined within the public class called TypeMapper, that inherit another class.The function start at line 400 and ends at 413. It contains 14 lines of code and it has a cyclomatic complexity of 4. It takes 2 parameters, represented as [400.0], and this function return a value. It declares 8.0 ... |
pasteorg_pastescript | public | public | 0 | 0 | eval_with_catch | def eval_with_catch(expr, vars):try:return eval(expr, vars)except Exception as e:_add_except(e, 'in expression %r' % expr)raise | 2 | 6 | 2 | 30 | 0 | 415 | 420 | 415 | expr,vars | [] | Returns | {"Expr": 1, "Return": 1, "Try": 1} | 2 | 6 | 2 | ["eval", "_add_except"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051046_pasteorg_pastescript.paste.script.copydir_py.TypeMapper.__getitem__"] | The function (eval_with_catch) defined within the public class called public.The function start at line 415 and ends at 420. It contains 6 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [415.0], and this function return a value. It declares 2.0 functions, It has 2.0 functio... |
pasteorg_pastescript | CreateDistroCommand | public | 0 | 1 | command | def command(self):if self.options.list_templates:return self.list_templates()asked_tmpls = self.options.templates or ['basic_package']templates = []for tmpl_name in asked_tmpls:self.extend_templates(templates, tmpl_name)if self.options.list_variables:return self.list_variables(templates)if self.verbose:print('Selected ... | 37 | 95 | 1 | 712 | 0 | 65 | 187 | 65 | self | [] | Returns | {"Assign": 26, "Expr": 18, "For": 7, "If": 22, "Return": 3, "Try": 1} | 52 | 123 | 52 | ["self.list_templates", "self.extend_templates", "self.list_variables", "print", "max", "len", "print", "len", "print", "self.challenge", "BadCommand", "lstrip", "os.path.join", "self._bad_chars_re.sub", "dist_name.lower", "pluginlib.egg_name", "vars.update", "self.parse_vars", "os.path.exists", "items", "self.read_var... | 59 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3569468_lun_4_jose.ext.exec_py.Exec._eval", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3569468_lun_4_jose.ext.exec_py.Exec.retry", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.368186... | The function (command) defined within the public class called CreateDistroCommand, that inherit another class.The function start at line 65 and ends at 187. It contains 95 lines of code and it has a cyclomatic complexity of 37. The function does not take any parameters, and this function return a value. It declares 52.... |
pasteorg_pastescript | CreateDistroCommand | public | 0 | 1 | create_template | def create_template(self, template, output_dir, vars):if self.verbose:print('Creating template %s' % template.name)template.run(self, output_dir, vars) | 2 | 4 | 4 | 34 | 0 | 189 | 192 | 189 | self,template,output_dir,vars | [] | None | {"Expr": 2, "If": 1} | 2 | 4 | 2 | ["print", "template.run"] | 0 | [] | The function (create_template) defined within the public class called CreateDistroCommand, that inherit another class.The function start at line 189 and ends at 192. It contains 4 lines of code and it has a cyclomatic complexity of 2. It takes 4 parameters, represented as [189.0] and does not return any value. It decla... |
pasteorg_pastescript | CreateDistroCommand | public | 0 | 1 | setup_svn_repository | def setup_svn_repository(self, output_dir, dist_name):# @@: Use subprocesssvn_repos = self.options.svn_repositorysvn_repos_path = os.path.join(svn_repos, dist_name).replace('\\','/')svn_command = 'svn'if sys.platform == 'win32':svn_command += '.exe'# @@: The previous method of formatting this string using \ doesn't wor... | 6 | 25 | 3 | 153 | 0 | 194 | 220 | 194 | self,output_dir,dist_name | [] | None | {"Assign": 7, "AugAssign": 1, "Expr": 5, "If": 5} | 9 | 27 | 9 | ["replace", "os.path.join", "print", "print", "os.system", "replace", "os.path.join", "print", "os.system"] | 0 | [] | The function (setup_svn_repository) defined within the public class called CreateDistroCommand, that inherit another class.The function start at line 194 and ends at 220. It contains 25 lines of code and it has a cyclomatic complexity of 6. It takes 3 parameters, represented as [194.0] and does not return any value. It... |
pasteorg_pastescript | CreateDistroCommand | public | 0 | 1 | add_svn_repository | def add_svn_repository(self, vars, output_dir):svn_repos = self.options.svn_repositoryegg_info_dir = pluginlib.egg_info_dir(output_dir, vars['project'])svn_command = 'svn'if sys.platform == 'win32':svn_command += '.exe'self.run_command(svn_command, 'add', '-N', egg_info_dir)paster_plugins_file = os.path.join(egg_info_d... | 4 | 17 | 3 | 117 | 0 | 232 | 248 | 232 | self,vars,output_dir | [] | None | {"Assign": 4, "AugAssign": 1, "Expr": 4, "If": 3} | 8 | 17 | 8 | ["pluginlib.egg_info_dir", "self.run_command", "os.path.join", "os.path.exists", "self.run_command", "self.run_command", "join", "print"] | 0 | [] | The function (add_svn_repository) defined within the public class called CreateDistroCommand, that inherit another class.The function start at line 232 and ends at 248. It contains 17 lines of code and it has a cyclomatic complexity of 4. It takes 3 parameters, represented as [232.0] and does not return any value. It d... |
pasteorg_pastescript | CreateDistroCommand | public | 0 | 1 | extend_templates | def extend_templates(self, templates, tmpl_name):if '#' in tmpl_name:dist_name, tmpl_name = tmpl_name.split('#', 1)else:dist_name, tmpl_name = None, tmpl_nameif dist_name is None:for entry in self.all_entry_points():if entry.name == tmpl_name:tmpl = entry.load()(entry.name)dist_name = entry.dist.project_namebreakelse:r... | 8 | 26 | 3 | 164 | 0 | 250 | 276 | 250 | self,templates,tmpl_name | [] | None | {"Assign": 8, "Expr": 2, "For": 3, "If": 4, "Return": 1} | 9 | 27 | 9 | ["tmpl_name.split", "self.all_entry_points", "entry.load", "LookupError", "pkg_resources.get_distribution", "dist.get_entry_info", "entry.load", "self.extend_templates", "templates.append"] | 0 | [] | The function (extend_templates) defined within the public class called CreateDistroCommand, that inherit another class.The function start at line 250 and ends at 276. It contains 26 lines of code and it has a cyclomatic complexity of 8. It takes 3 parameters, represented as [250.0] and does not return any value. It dec... |
pasteorg_pastescript | CreateDistroCommand | public | 0 | 1 | all_entry_points | def all_entry_points(self):if not hasattr(self, '_entry_points'):self._entry_points = list(pkg_resources.iter_entry_points('paste.paster_create_template'))return self._entry_points | 2 | 5 | 1 | 31 | 0 | 278 | 282 | 278 | self | [] | Returns | {"Assign": 1, "If": 1, "Return": 1} | 3 | 5 | 3 | ["hasattr", "list", "pkg_resources.iter_entry_points"] | 0 | [] | The function (all_entry_points) defined within the public class called CreateDistroCommand, that inherit another class.The function start at line 278 and ends at 282. 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 decl... |
pasteorg_pastescript | CreateDistroCommand | public | 0 | 1 | display_vars | def display_vars(self, vars):vars = sorted(vars.items())print('Variables:')max_var = max([len(n) for n, v in vars])for name, value in vars:print('%s:%s%s' % (name, ' '*(max_var-len(name)), value)) | 3 | 7 | 2 | 66 | 0 | 284 | 290 | 284 | self,vars | [] | None | {"Assign": 2, "Expr": 2, "For": 1} | 7 | 7 | 7 | ["sorted", "vars.items", "print", "max", "len", "print", "len"] | 0 | [] | The function (display_vars) defined within the public class called CreateDistroCommand, that inherit another class.The function start at line 284 and ends at 290. It contains 7 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [284.0] and does not return any value. It declares... |
pasteorg_pastescript | CreateDistroCommand | public | 0 | 1 | list_templates | def list_templates(self):templates = []for entry in self.all_entry_points():try:templates.append(entry.load()(entry.name))except Exception as e:# We will not be stopped!print('Warning: could not load entry point %s (%s: %s)' % (entry.name, e.__class__.__name__, e))max_name = max([len(t.name) for t in templates])templat... | 5 | 16 | 1 | 126 | 0 | 292 | 309 | 292 | self | [] | None | {"Assign": 3, "Expr": 4, "For": 2, "Try": 1} | 10 | 18 | 10 | ["self.all_entry_points", "templates.append", "entry.load", "print", "max", "len", "sorted", "print", "print", "len"] | 0 | [] | The function (list_templates) defined within the public class called CreateDistroCommand, that inherit another class.The function start at line 292 and ends at 309. It contains 16 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 ... |
pasteorg_pastescript | CreateDistroCommand | public | 0 | 1 | inspect_files | def inspect_files(self, output_dir, templates, vars):file_sources = {}for template in templates:self._find_files(template, vars, file_sources)self._show_files(output_dir, file_sources)self._show_leftovers(output_dir, file_sources) | 2 | 6 | 4 | 46 | 0 | 311 | 316 | 311 | self,output_dir,templates,vars | [] | None | {"Assign": 1, "Expr": 3, "For": 1} | 3 | 6 | 3 | ["self._find_files", "self._show_files", "self._show_leftovers"] | 0 | [] | The function (inspect_files) defined within the public class called CreateDistroCommand, that inherit another class.The function start at line 311 and ends at 316. It contains 6 lines of code and it has a cyclomatic complexity of 2. It takes 4 parameters, represented as [311.0] and does not return any value. It declare... |
pasteorg_pastescript | CreateDistroCommand | public | 0 | 1 | _find_files | def _find_files(self, template, vars, file_sources):tmpl_dir = template.template_dir()self._find_template_files(template, tmpl_dir, vars, file_sources) | 1 | 4 | 4 | 30 | 0 | 318 | 321 | 318 | self,template,vars,file_sources | [] | None | {"Assign": 1, "Expr": 1} | 2 | 4 | 2 | ["template.template_dir", "self._find_template_files"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3666831_ethereum_py_ssz._project_template.fill_template_vars_py._replace", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3719451_ethereum_pyrlp._project_template.fill_template_vars_py._replace"] | The function (_find_files) defined within the public class called CreateDistroCommand, that inherit another class.The function start at line 318 and ends at 321. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [318.0] and does not return any value. It declares ... |
pasteorg_pastescript | CreateDistroCommand | public | 0 | 1 | _find_template_files | def _find_template_files(self, template, tmpl_dir, vars, file_sources, join=''):full_dir = os.path.join(tmpl_dir, join)for name in os.listdir(full_dir):if name.startswith('.'):continueif os.path.isdir(os.path.join(full_dir, name)):self._find_template_files(template, tmpl_dir, vars, file_sources,join=os.path.join(join, ... | 6 | 17 | 6 | 158 | 0 | 323 | 339 | 323 | self,template,tmpl_dir,vars,file_sources,join | [] | None | {"Assign": 4, "Expr": 2, "For": 2, "If": 3} | 13 | 17 | 13 | ["os.path.join", "os.listdir", "name.startswith", "os.path.isdir", "os.path.join", "self._find_template_files", "os.path.join", "os.path.join", "vars.items", "partial.replace", "partial.endswith", "append", "file_sources.setdefault"] | 0 | [] | The function (_find_template_files) defined within the public class called CreateDistroCommand, that inherit another class.The function start at line 323 and ends at 339. It contains 17 lines of code and it has a cyclomatic complexity of 6. It takes 6 parameters, represented as [323.0] and does not return any value. It... |
pasteorg_pastescript | CreateDistroCommand | public | 0 | 1 | _show_files | def _show_files(self, output_dir, file_sources, join='', indent=0):pad = ' '*(2*indent)full_dir = os.path.join(output_dir, join)names = os.listdir(full_dir)dirs = [n for n in namesif os.path.isdir(os.path.join(full_dir, n))]fns = [n for n in names if not os.path.isdir(os.path.join(full_dir, n))]dirs.sort()names.sort()f... | 15 | 37 | 5 | 282 | 0 | 344 | 380 | 344 | self,output_dir,file_sources,join,indent | [] | None | {"Assign": 9, "Expr": 8, "For": 4, "If": 6} | 18 | 37 | 18 | ["os.path.join", "os.listdir", "os.path.isdir", "os.path.join", "os.path.isdir", "os.path.join", "dirs.sort", "names.sort", "fnmatch.fnmatch", "print", "os.path.join", "print", "file_sources.pop", "print", "print", "print", "self._show_files", "os.path.join"] | 0 | [] | The function (_show_files) defined within the public class called CreateDistroCommand, that inherit another class.The function start at line 344 and ends at 380. It contains 37 lines of code and it has a cyclomatic complexity of 15. It takes 5 parameters, represented as [344.0] and does not return any value. It declare... |
pasteorg_pastescript | CreateDistroCommand | public | 0 | 1 | _show_leftovers | def _show_leftovers(self, output_dir, file_sources):if not file_sources:returnprint()print('These files were supposed to be generated by templates')print('but were not found:')file_sources = sorted(file_sources.items())for partial, templates in file_sources:print('%s from:' % partial)for template in templates:print('%s... | 4 | 11 | 3 | 61 | 0 | 382 | 392 | 382 | self,output_dir,file_sources | [] | None | {"Assign": 1, "Expr": 5, "For": 2, "If": 1, "Return": 1} | 7 | 11 | 7 | ["print", "print", "print", "sorted", "file_sources.items", "print", "print"] | 0 | [] | The function (_show_leftovers) defined within the public class called CreateDistroCommand, that inherit another class.The function start at line 382 and ends at 392. It contains 11 lines of code and it has a cyclomatic complexity of 4. It takes 3 parameters, represented as [382.0] and does not return any value. It decl... |
pasteorg_pastescript | CreateDistroCommand | public | 0 | 1 | list_variables | def list_variables(self, templates):for tmpl_name, tmpl in templates:if not tmpl.read_vars():if self.verbose > 1:self._show_template_vars(tmpl_name, tmpl, 'No variables found')continueself._show_template_vars(tmpl_name, tmpl) | 4 | 8 | 2 | 48 | 0 | 394 | 401 | 394 | self,templates | [] | None | {"Expr": 2, "For": 1, "If": 2} | 3 | 8 | 3 | ["tmpl.read_vars", "self._show_template_vars", "self._show_template_vars"] | 0 | [] | The function (list_variables) defined within the public class called CreateDistroCommand, that inherit another class.The function start at line 394 and ends at 401. It contains 8 lines of code and it has a cyclomatic complexity of 4. It takes 2 parameters, represented as [394.0] and does not return any value. It declar... |
pasteorg_pastescript | CreateDistroCommand | public | 0 | 1 | _show_template_vars | def _show_template_vars(self, tmpl_name, tmpl, message=None):title = '%s (from %s)' % (tmpl.name, tmpl_name)print(title)print('-'*len(title))if message is not None:print('%s' % message)print()returntmpl.print_vars(indent=2) | 2 | 9 | 4 | 61 | 0 | 403 | 411 | 403 | self,tmpl_name,tmpl,message | [] | None | {"Assign": 1, "Expr": 5, "If": 1, "Return": 1} | 6 | 9 | 6 | ["print", "print", "len", "print", "print", "tmpl.print_vars"] | 0 | [] | The function (_show_template_vars) defined within the public class called CreateDistroCommand, that inherit another class.The function start at line 403 and ends at 411. It contains 9 lines of code and it has a cyclomatic complexity of 2. It takes 4 parameters, represented as [403.0] and does not return any value. It d... |
pasteorg_pastescript | public | public | 0 | 0 | add_custom_options | def add_custom_options(parser):"""This method can modify the ``parser`` object (which is an``optparse.OptionParser`` instance).This can be used to add newoptions to the command."""pass | 1 | 2 | 1 | 7 | 0 | 10 | 16 | 10 | parser | [] | None | {"Expr": 1} | 0 | 7 | 0 | [] | 0 | [] | The function (add_custom_options) defined within the public class called public.The function start at line 10 and ends at 16. 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_pastescript | public | public | 0 | 0 | default_config_filename | def default_config_filename(installer):"""This function can return a default filename or directory for theconfiguration file, if none was explicitly given.Return None to mean no preference.The first non-None returningvalue will be used.Pay attention to ``installer.expect_config_directory`` here,and to ``installer.defau... | 1 | 2 | 1 | 10 | 0 | 18 | 29 | 18 | installer | [] | Returns | {"Expr": 1, "Return": 1} | 0 | 12 | 0 | [] | 0 | [] | The function (default_config_filename) defined within the public class called public.The function start at line 18 and ends at 29. 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 | install_variables | def install_variables(installer):"""Returns a dictionary of variables for use later in the process(e.g., filling a configuration file).These are combined from allsysconfig files."""return {} | 1 | 2 | 1 | 9 | 0 | 31 | 37 | 31 | installer | [] | Returns | {"Expr": 1, "Return": 1} | 0 | 7 | 0 | [] | 0 | [] | The function (install_variables) defined within the public class called public.The function start at line 31 and ends at 37. 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 | post_setup_hook | def post_setup_hook(installer, config_file):"""This is called at the very end of ``paster setup-app``.Youmight use it to register an application globally."""pass | 1 | 2 | 2 | 9 | 0 | 39 | 44 | 39 | installer,config_file | [] | None | {"Expr": 1} | 0 | 6 | 0 | [] | 0 | [] | The function (post_setup_hook) defined within the public class called public.The function start at line 39 and ends at 44. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [39.0] and does not return any value.. |
pasteorg_pastescript | EntryPointCommand | public | 0 | 1 | command | def command(self):if self.options.list_entry_points:return self.list_entry_points()if self.options.show_egg:return self.show_egg(self.options.show_egg)if not self.args:raise BadCommand("You must give an entry point (or --list)")pattern = self.get_pattern(self.args[0])groups = self.get_groups_by_pattern(pattern)if not g... | 8 | 21 | 1 | 152 | 0 | 43 | 63 | 43 | self | [] | Returns | {"Assign": 5, "Expr": 4, "For": 1, "If": 6, "Return": 2} | 14 | 21 | 14 | ["self.list_entry_points", "self.show_egg", "BadCommand", "self.get_pattern", "self.get_groups_by_pattern", "BadCommand", "len", "self.get_pattern", "self.get_group_description", "print", "print", "self.wrap", "print", "self.print_entry_points_by_group"] | 59 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3569468_lun_4_jose.ext.exec_py.Exec._eval", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3569468_lun_4_jose.ext.exec_py.Exec.retry", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.368186... | The function (command) defined within the public class called EntryPointCommand, that inherit another class.The function start at line 43 and ends at 63. It contains 21 lines of code and it has a cyclomatic complexity of 8. The function does not take any parameters, and this function return a value. It declares 14.0 fu... |
pasteorg_pastescript | EntryPointCommand | public | 0 | 1 | print_entry_points_by_group | def print_entry_points_by_group(self, group, ep_pat):env = pkg_resources.Environment()project_names = sorted(env)for project_name in project_names:dists = list(env[project_name])assert distsdist = dists[0]entries = list(dist.get_entry_map(group).values())if ep_pat:entries = [e for e in entries if ep_pat.search(e.name)]... | 10 | 24 | 3 | 175 | 0 | 65 | 88 | 65 | self,group,ep_pat | [] | None | {"Assign": 7, "Expr": 5, "For": 2, "If": 4} | 17 | 24 | 17 | ["pkg_resources.Environment", "sorted", "list", "list", "values", "dist.get_entry_map", "ep_pat.search", "len", "print", "len", "print", "entries.sort", "print", "self._ep_description", "self.get_entry_point_description", "print", "self.wrap"] | 0 | [] | The function (print_entry_points_by_group) defined within the public class called EntryPointCommand, that inherit another class.The function start at line 65 and ends at 88. It contains 24 lines of code and it has a cyclomatic complexity of 10. It takes 3 parameters, represented as [65.0] and does not return any value.... |
pasteorg_pastescript | EntryPointCommand | public | 0 | 1 | show_egg | def show_egg(self, egg_name):group_pat = Noneif self.args:group_pat = self.get_pattern(self.args[0])ep_pat = Noneif len(self.args) > 1:ep_pat = self.get_pattern(self.args[1])if egg_name.startswith('egg:'):egg_name = egg_name[4:]dist = pkg_resources.get_distribution(egg_name)entry_map = dist.get_entry_map()entry_groups ... | 12 | 26 | 2 | 193 | 0 | 90 | 115 | 90 | self,egg_name | [] | None | {"Assign": 10, "Expr": 4, "For": 2, "If": 7} | 19 | 26 | 19 | ["self.get_pattern", "len", "self.get_pattern", "egg_name.startswith", "pkg_resources.get_distribution", "dist.get_entry_map", "sorted", "entry_map.items", "group_pat.search", "print", "sorted", "points.items", "ep_pat.search", "print", "self._ep_description", "self.get_entry_point_description", "print", "self.wrap", "... | 0 | [] | The function (show_egg) defined within the public class called EntryPointCommand, that inherit another class.The function start at line 90 and ends at 115. It contains 26 lines of code and it has a cyclomatic complexity of 12. It takes 2 parameters, represented as [90.0] and does not return any value. It declares 19.0 ... |
pasteorg_pastescript | EntryPointCommand | public | 0 | 1 | wrap | def wrap(self, text, indent=0):text = dedent(text)width = int(os.environ.get('COLUMNS', 70)) - indenttext = '\n'.join([line.rstrip() for line in text.splitlines()])paras = text.split('\n\n')new_paras = []for para in paras:if para.lstrip() == para:# leading whitespace means don't rewrappara = '\n'.join(textwrap.wrap(par... | 5 | 14 | 3 | 135 | 0 | 117 | 131 | 117 | self,text,indent | [] | Returns | {"Assign": 8, "Expr": 1, "For": 1, "If": 1, "Return": 1} | 14 | 15 | 14 | ["dedent", "int", "os.environ.get", "join", "line.rstrip", "text.splitlines", "text.split", "para.lstrip", "join", "textwrap.wrap", "new_paras.append", "join", "text.splitlines", "join"] | 12 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3580082_pacificbiosciences_falcon.falcon_kit.FastaReader_py.FastaRecord.__str__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3611215_ask_python_github2.github2.bin.search_repos_py.main", "_.content.gdrive.MyDrive... | The function (wrap) defined within the public class called EntryPointCommand, that inherit another class.The function start at line 117 and ends at 131. It contains 14 lines of code and it has a cyclomatic complexity of 5. It takes 3 parameters, represented as [117.0], and this function return a value. It declares 14.0... |
pasteorg_pastescript | EntryPointCommand | public | 0 | 1 | _ep_description | def _ep_description(self, ep, pad_name=None):name = ep.nameif pad_name is not None:name = name + ' '*(pad_name-len(name))dest = ep.module_nameif ep.attrs:dest = dest + ':' + '.'.join(ep.attrs)return '%s = %s' % (name, dest) | 3 | 8 | 3 | 68 | 0 | 133 | 140 | 133 | self,ep,pad_name | [] | Returns | {"Assign": 4, "If": 2, "Return": 1} | 2 | 8 | 2 | ["len", "join"] | 0 | [] | The function (_ep_description) defined within the public class called EntryPointCommand, that inherit another class.The function start at line 133 and ends at 140. It contains 8 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [133.0], and this function return a value. It dec... |
pasteorg_pastescript | EntryPointCommand | public | 0 | 1 | get_pattern | def get_pattern(self, s):if not s:return Noneif self.options.use_regex:return re.compile(s)else:return re.compile(fnmatch.translate(s), re.I) | 3 | 7 | 2 | 45 | 0 | 142 | 148 | 142 | self,s | [] | Returns | {"If": 2, "Return": 3} | 3 | 7 | 3 | ["re.compile", "re.compile", "fnmatch.translate"] | 0 | [] | The function (get_pattern) defined within the public class called EntryPointCommand, that inherit another class.The function start at line 142 and ends at 148. It contains 7 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [142.0], and this function return a value. It declare... |
pasteorg_pastescript | EntryPointCommand | public | 0 | 1 | list_entry_points | def list_entry_points(self):pattern = self.get_pattern(self.args and self.args[0])groups = self.get_groups_by_pattern(pattern)print('%i entry point groups found:' % len(groups))for group in groups:desc = self.get_group_description(group)print('[%s]' % group)if desc:if hasattr(desc, 'description'):desc = desc.descriptio... | 5 | 11 | 1 | 87 | 0 | 150 | 160 | 150 | self | [] | None | {"Assign": 4, "Expr": 3, "For": 1, "If": 2} | 9 | 11 | 9 | ["self.get_pattern", "self.get_groups_by_pattern", "print", "len", "self.get_group_description", "print", "hasattr", "print", "self.wrap"] | 0 | [] | The function (list_entry_points) defined within the public class called EntryPointCommand, that inherit another class.The function start at line 150 and ends at 160. It contains 11 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... |
pasteorg_pastescript | EntryPointCommand | public | 0 | 1 | get_groups_by_pattern | def get_groups_by_pattern(self, pattern):env = pkg_resources.Environment()eps = {}for project_name in env:for dist in env[project_name]:for name in pkg_resources.get_entry_map(dist):if pattern and not pattern.search(name):continueif (not patternand name.startswith('paste.description.')):continueeps[name] = Nonereturn s... | 8 | 13 | 2 | 82 | 0 | 162 | 174 | 162 | self,pattern | [] | Returns | {"Assign": 3, "For": 3, "If": 2, "Return": 1} | 6 | 13 | 6 | ["pkg_resources.Environment", "pkg_resources.get_entry_map", "pattern.search", "name.startswith", "sorted", "eps.keys"] | 0 | [] | The function (get_groups_by_pattern) defined within the public class called EntryPointCommand, that inherit another class.The function start at line 162 and ends at 174. It contains 13 lines of code and it has a cyclomatic complexity of 8. It takes 2 parameters, represented as [162.0], and this function return a value.... |
pasteorg_pastescript | EntryPointCommand | public | 0 | 1 | get_group_description | def get_group_description(self, group):for entry in pkg_resources.iter_entry_points('paste.entry_point_description'):if entry.name == group:ep = entry.load()if hasattr(ep, 'description'):return ep.descriptionelse:return epreturn None | 4 | 9 | 2 | 49 | 0 | 176 | 184 | 176 | self,group | [] | Returns | {"Assign": 1, "For": 1, "If": 2, "Return": 3} | 3 | 9 | 3 | ["pkg_resources.iter_entry_points", "entry.load", "hasattr"] | 0 | [] | The function (get_group_description) defined within the public class called EntryPointCommand, that inherit another class.The function start at line 176 and ends at 184. It contains 9 lines of code and it has a cyclomatic complexity of 4. It takes 2 parameters, represented as [176.0], and this function return a value. ... |
pasteorg_pastescript | EntryPointCommand | public | 0 | 1 | get_entry_point_description | def get_entry_point_description(self, ep, group):try:return self._safe_get_entry_point_description(ep, group)except Exception as e:out = StringIO()traceback.print_exc(file=out)return ErrorDescription(e, out.getvalue()) | 2 | 7 | 3 | 49 | 0 | 186 | 192 | 186 | self,ep,group | [] | Returns | {"Assign": 1, "Expr": 1, "Return": 2, "Try": 1} | 5 | 7 | 5 | ["self._safe_get_entry_point_description", "StringIO", "traceback.print_exc", "ErrorDescription", "out.getvalue"] | 0 | [] | The function (get_entry_point_description) defined within the public class called EntryPointCommand, that inherit another class.The function start at line 186 and ends at 192. It contains 7 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [186.0], and this function return a v... |
pasteorg_pastescript | EntryPointCommand | public | 0 | 1 | _safe_get_entry_point_description | def _safe_get_entry_point_description(self, ep, group):ep.dist.activate()meta_group = 'paste.description.'+groupmeta = ep.dist.get_entry_info(meta_group, ep.name)if not meta:generic = list(pkg_resources.iter_entry_points(meta_group, 'generic'))if not generic:return super_generic(ep.load())# @@: Error if len(generic) > ... | 3 | 14 | 3 | 94 | 0 | 194 | 208 | 194 | self,ep,group | [] | Returns | {"Assign": 6, "Expr": 1, "If": 2, "Return": 2} | 9 | 15 | 9 | ["ep.dist.activate", "ep.dist.get_entry_info", "list", "pkg_resources.iter_entry_points", "super_generic", "ep.load", "load", "obj", "meta.load"] | 0 | [] | The function (_safe_get_entry_point_description) defined within the public class called EntryPointCommand, that inherit another class.The function start at line 194 and ends at 208. It contains 14 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [194.0], and this function ret... |
pasteorg_pastescript | EntryPointDescription | public | 0 | 1 | __init__ | def __init__(self, group):self.group = group | 1 | 2 | 2 | 12 | 0 | 212 | 213 | 212 | self,group | [] | None | {"Assign": 1} | 0 | 2 | 0 | [] | 8,182 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15197461_googleapis_python_cloud_core.google.cloud._helpers.__init___py._LocalStack.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16798231_kapji_capital_gains_calculator.cgt_calc.exceptions_py.AmountMissi... | The function (__init__) defined within the public class called EntryPointDescription, that inherit another class.The function start at line 212 and ends at 213. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [212.0] and does not return any value. It has 8182.0... |
pasteorg_pastescript | EntryPointDescription | public | 0 | 1 | __init__ | def __init__(self, doc_object):self.doc_object = doc_objectself.description = dedent(self.doc_object.__doc__)try:if isinstance(self.doc_object, type):func = self.doc_object.__init__elif (hasattr(self.doc_object, '__call__')and not isinstance(self.doc_object, types.FunctionType)):func = self.doc_object.__call__else:func... | 8 | 23 | 2 | 141 | 0 | 220 | 242 | 220 | self,group | [] | None | {"Assign": 1} | 0 | 2 | 0 | [] | 8,182 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15197461_googleapis_python_cloud_core.google.cloud._helpers.__init___py._LocalStack.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16798231_kapji_capital_gains_calculator.cgt_calc.exceptions_py.AmountMissi... | The function (__init__) defined within the public class called EntryPointDescription, that inherit another class.The function start at line 220 and ends at 242. It contains 23 lines of code and it has a cyclomatic complexity of 8. It takes 2 parameters, represented as [220.0] and does not return any value. It has 8182.... |
pasteorg_pastescript | public | public | 0 | 0 | dedent | def dedent(s):if s is None:return ss = s.strip('\n').strip('\r')return textwrap.dedent(s) | 2 | 5 | 1 | 32 | 1 | 244 | 248 | 244 | s | ['s'] | Returns | {"Assign": 1, "If": 1, "Return": 2} | 3 | 5 | 3 | ["strip", "s.strip", "textwrap.dedent"] | 216 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3608748_photon_hdf5_phconvert.phconvert.hdf5_py._autofill_laser_rep_rates", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3608748_photon_hdf5_phconvert.phconvert.hdf5_py._check_photon_data_tables", "_.content.gdrive... | The function (dedent) defined within the public class called public.The function start at line 244 and ends at 248. 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 3.0 functions, It has 3.0 functions called ins... |
pasteorg_pastescript | public | public | 0 | 0 | super_generic | def super_generic(obj):desc = SuperGeneric(obj)if not desc.description:return Nonereturn desc | 2 | 5 | 1 | 21 | 1 | 250 | 254 | 250 | obj | ['desc'] | Returns | {"Assign": 1, "If": 1, "Return": 2} | 1 | 5 | 1 | ["SuperGeneric"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051046_pasteorg_pastescript.paste.script.entrypoints_py.EntryPointCommand._safe_get_entry_point_description"] | The function (super_generic) defined within the public class called public.The function start at line 250 and ends at 254. It contains 5 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters, and this function return a value. It declare 1.0 function, It has 1.0 function called... |
pasteorg_pastescript | EntryPointDescription | public | 0 | 1 | __init__ | def __init__(self, exc, tb):self.exc = excself.tb = '\n'.join(tb)self.description = 'Error loading: %s' % exc | 1 | 4 | 3 | 31 | 0 | 258 | 261 | 258 | self,group | [] | None | {"Assign": 1} | 0 | 2 | 0 | [] | 8,182 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15197461_googleapis_python_cloud_core.google.cloud._helpers.__init___py._LocalStack.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16798231_kapji_capital_gains_calculator.cgt_calc.exceptions_py.AmountMissi... | The function (__init__) defined within the public class called EntryPointDescription, that inherit another class.The function start at line 258 and ends at 261. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [258.0] and does not return any value. It has 8182.0... |
pasteorg_pastescript | ExeCommand | public | 0 | 1 | run | def run(self, argv):if argv and argv[0] in ('-h', '--help'):print(self.description)returnif os.environ.get('REQUEST_METHOD'):# We're probably in a CGI environmentsys.stdout = sys.stderros.environ['PASTE_DEFAULT_QUIET'] = 'true'# Maybe import cgitb or something?if '_' not in os.environ:print("Warning: this command is in... | 18 | 62 | 2 | 397 | 0 | 40 | 106 | 40 | self,argv | [] | None | {"Assign": 21, "AugAssign": 2, "Expr": 14, "For": 1, "If": 11, "Return": 1, "While": 2} | 29 | 67 | 29 | ["print", "os.environ.get", "print", "print", "print", "extra_args.pop", "args.append", "extra_args.pop", "os.path.dirname", "open", "f.readlines", "f.close", "self._exe_section_re.search", "lines.pop", "lines.pop", "line.strip", "line.startswith", "self._section_re.search", "command.BadCommand", "line.split", "name.st... | 668 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3508273_sc3_cookcountyjail.fabfile_py.add_directories", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3508273_sc3_cookcountyjail.fabfile_py.add_project_to_path", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation... | The function (run) defined within the public class called ExeCommand, that inherit another class.The function start at line 40 and ends at 106. It contains 62 lines of code and it has a cyclomatic complexity of 18. It takes 2 parameters, represented as [40.0] and does not return any value. It declares 29.0 functions, I... |
pasteorg_pastescript | FileOp | public | 0 | 1 | __init__ | def __init__(self, simulate=False, verbose=True, interactive=True, source_dir=None, template_vars=None):"""Initialize our File operation helper objectsource_dirShould refer to the directory within the packagethat contains the templates to be used for the other copyoperations. It is assumed that packages will keep all t... | 2 | 13 | 6 | 70 | 0 | 16 | 41 | 16 | self,simulate,verbose,interactive,source_dir,template_vars | [] | None | {"Assign": 7, "Expr": 1, "If": 1} | 1 | 26 | 1 | ["isinstance"] | 8,182 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15197461_googleapis_python_cloud_core.google.cloud._helpers.__init___py._LocalStack.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16798231_kapji_capital_gains_calculator.cgt_calc.exceptions_py.AmountMissi... | The function (__init__) defined within the public class called FileOp, that inherit another class.The function start at line 16 and ends at 41. It contains 13 lines of code and it has a cyclomatic complexity of 2. It takes 6 parameters, represented as [16.0] and does not return any value. It declare 1.0 function, It ha... |
pasteorg_pastescript | FileOp | public | 0 | 1 | copy_file | def copy_file(self, template, dest, filename=None, add_py=True, package=True,template_renderer=None):"""Copy a file from the source location to somewhere in thedestination.templateThe filename underneath self.source_dir to copy/processdestThe destination directory in the project relative to wherethis command is being r... | 4 | 14 | 7 | 125 | 0 | 43 | 78 | 43 | self,template,dest,filename,add_py,package,template_renderer | [] | None | {"Assign": 7, "Expr": 2, "If": 3} | 6 | 36 | 6 | ["template.split", "filename.endswith", "self.find_dir", "self.load_content", "os.path.join", "self.ensure_file"] | 15 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3508237_rcbops_ansible_lxc_rpc.scripts.rpc_wheel_builder_py._make_wheels", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3912752_dbr_tvnamer.tvnamer.files_py.Renamer.new_path", "_.content.gdrive.MyDrive.Phd_Thesis.D... | The function (copy_file) defined within the public class called FileOp, that inherit another class.The function start at line 43 and ends at 78. It contains 14 lines of code and it has a cyclomatic complexity of 4. It takes 7 parameters, represented as [43.0] and does not return any value. It declares 6.0 functions, It... |
pasteorg_pastescript | FileOp | public | 0 | 1 | copy_dir | def copy_dir(self, template_dir, dest, destname=None, package=True):"""Copy a directory recursively, processing any files within itthat need to be processed (end in _tmpl).template_dirDirectory under self.source_dir to copy/processdestDestination directory into which this directory will be copiedto.destnameUse this nam... | 1 | 2 | 5 | 20 | 0 | 80 | 98 | 80 | self,template_dir,dest,destname,package | [] | None | {"Expr": 1} | 0 | 19 | 0 | [] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051046_pasteorg_pastescript.paste.script.copydir_py.copy_dir"] | The function (copy_dir) defined within the public class called FileOp, that inherit another class.The function start at line 80 and ends at 98. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [80.0] and does not return any value. It has 1.0 function calling thi... |
pasteorg_pastescript | FileOp | public | 0 | 1 | load_content | def load_content(self, base_package, base, name, template, template_renderer=None):blank = os.path.join(base, name + '.py')read_content = Trueif not os.path.exists(blank):if self.use_pkg_resources:fullpath = '/'.join([self.source_dir[1], template])content = pkg_resources.resource_string(self.source_dir[0], fullpath)rea... | 5 | 23 | 6 | 157 | 0 | 100 | 122 | 100 | self,base_package,base,name,template,template_renderer | [] | Returns | {"Assign": 10, "Expr": 1, "If": 4, "Return": 1} | 10 | 23 | 10 | ["os.path.join", "os.path.exists", "join", "pkg_resources.resource_string", "os.path.join", "open", "f.read", "f.close", "blank.endswith", "copydir.substitute_content"] | 0 | [] | The function (load_content) defined within the public class called FileOp, that inherit another class.The function start at line 100 and ends at 122. It contains 23 lines of code and it has a cyclomatic complexity of 5. It takes 6 parameters, represented as [100.0], and this function return a value. It declares 10.0 fu... |
pasteorg_pastescript | FileOp | public | 0 | 1 | find_dir | def find_dir(self, dirname, package=False):egg_info = pluginlib.find_egg_info_dir(os.getcwd())# @@: Should give error about egg_info when top_level.txt missingf = open(os.path.join(egg_info, 'top_level.txt'))packages = [l.strip() for l in f.readlines()if l.strip() and not l.strip().startswith('#')]f.close()if not len(p... | 9 | 22 | 3 | 204 | 0 | 124 | 148 | 124 | self,dirname,package | [] | Returns | {"Assign": 6, "Expr": 3, "For": 1, "If": 4, "Return": 2} | 21 | 25 | 21 | ["pluginlib.find_egg_info_dir", "os.getcwd", "open", "os.path.join", "l.strip", "f.readlines", "l.strip", "startswith", "l.strip", "f.close", "len", "BadCommand", "os.path.dirname", "os.path.join", "os.path.exists", "possible.append", "self.ensure_dir", "os.path.join", "self.find_dir", "len", "BadCommand"] | 0 | [] | The function (find_dir) defined within the public class called FileOp, that inherit another class.The function start at line 124 and ends at 148. It contains 22 lines of code and it has a cyclomatic complexity of 9. It takes 3 parameters, represented as [124.0], and this function return a value. It declares 21.0 functi... |
pasteorg_pastescript | FileOp | public | 0 | 1 | parse_path_name_args | def parse_path_name_args(self, name):"""Given the name, assume that the first argument is a path/filenamecombination. Return the name and dir of this. If the name ends with'.py' that will be erased.Examples:comments ->comments, ''admin/comments ->comments, 'admin'h/ab/fred->fred, 'h/ab'"""if name.endswith('.py'):# Eras... | 6 | 16 | 2 | 138 | 0 | 150 | 177 | 150 | self,name | [] | Returns | {"Assign": 8, "Expr": 1, "If": 5, "Return": 1} | 6 | 28 | 6 | ["name.endswith", "name.replace", "name.replace", "name.split", "len", "os.path.join"] | 0 | [] | The function (parse_path_name_args) defined within the public class called FileOp, that inherit another class.The function start at line 150 and ends at 177. It contains 16 lines of code and it has a cyclomatic complexity of 6. It takes 2 parameters, represented as [150.0], and this function return a value. It declares... |
pasteorg_pastescript | FileOp | public | 0 | 1 | ensure_dir | def ensure_dir(self, dir, svn_add=True, package=False):"""Ensure that the directory exists, creating it if necessary.Respects verbosity and simulation.Adds directory to subversion if ``.svn/`` directory exists inparent, and directory was created.packageIf package is True, any directories created will contain a__init__.... | 11 | 25 | 4 | 232 | 0 | 179 | 220 | 179 | self,dir,svn_add,package | [] | None | {"Assign": 3, "Expr": 10, "If": 8, "Return": 1} | 23 | 42 | 23 | ["dir.rstrip", "os.path.exists", "self.ensure_dir", "os.path.dirname", "print", "self.shorten", "os.mkdir", "os.path.exists", "os.path.join", "os.path.dirname", "self.svn_command", "os.path.join", "open", "f.write", "f.close", "print", "self.shorten", "os.path.exists", "os.path.join", "os.path.dirname", "self.svn_comma... | 0 | [] | The function (ensure_dir) defined within the public class called FileOp, that inherit another class.The function start at line 179 and ends at 220. It contains 25 lines of code and it has a cyclomatic complexity of 11. It takes 4 parameters, represented as [179.0] and does not return any value. It declares 23.0 functio... |
pasteorg_pastescript | FileOp | public | 0 | 1 | ensure_file | def ensure_file(self, filename, content, svn_add=True, package=False):"""Ensure a file named ``filename`` exists with the givencontent.If ``--interactive`` has been enabled, this will askthe user what to do if a file exists with different content."""global difflibself.ensure_dir(os.path.dirname(filename), svn_add=svn_a... | 17 | 49 | 5 | 305 | 0 | 222 | 276 | 222 | self,filename,content,svn_add,package | [] | None | {"Assign": 7, "Expr": 14, "If": 14, "Return": 4, "While": 1} | 31 | 55 | 31 | ["self.ensure_dir", "os.path.dirname", "os.path.exists", "print", "open", "f.write", "f.close", "os.path.exists", "os.path.join", "os.path.dirname", "self.svn_command", "open", "f.read", "f.close", "print", "print", "difflib.context_diff", "content.splitlines", "old_content.splitlines", "print", "join", "lower", "strip... | 0 | [] | The function (ensure_file) defined within the public class called FileOp, that inherit another class.The function start at line 222 and ends at 276. It contains 49 lines of code and it has a cyclomatic complexity of 17. It takes 5 parameters, represented as [222.0] and does not return any value. It declares 31.0 functi... |
pasteorg_pastescript | FileOp | public | 0 | 1 | shorten | def shorten(self, fn, *paths):"""Return a shorted form of the filename (relative to the currentdirectory), typically for displaying in messages.If``*paths`` are present, then use os.path.join to create thefull filename before shortening."""if paths:fn = os.path.join(fn, *paths)if fn.startswith(os.getcwd()):return fn[le... | 3 | 7 | 3 | 65 | 0 | 278 | 290 | 278 | self,fn,*paths | [] | Returns | {"Assign": 1, "Expr": 1, "If": 2, "Return": 2} | 6 | 13 | 6 | ["os.path.join", "fn.startswith", "os.getcwd", "lstrip", "len", "os.getcwd"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69709534_toni880_tonic_userbot.userbot.modules.anilist_py.anilist"] | The function (shorten) defined within the public class called FileOp, that inherit another class.The function start at line 278 and ends at 290. It contains 7 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [278.0], and this function return a value. It declares 6.0 functions... |
pasteorg_pastescript | FileOp | public | 0 | 1 | svn_command | def svn_command(self, *args, **kw):"""Run an svn command, but don't raise an exception if it fails."""try:return self.run_command('svn', *args, **kw)except OSError as e:if not self._svn_failed:print('Unable to run svn command (%s); proceeding anyway' % e)self._svn_failed = True | 3 | 7 | 3 | 49 | 0 | 294 | 303 | 294 | self,*args,**kw | [] | Returns | {"Assign": 1, "Expr": 2, "If": 1, "Return": 1, "Try": 1} | 2 | 10 | 2 | ["self.run_command", "print"] | 0 | [] | The function (svn_command) defined within the public class called FileOp, that inherit another class.The function start at line 294 and ends at 303. It contains 7 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [294.0], and this function return a value. It declares 2.0 funct... |
pasteorg_pastescript | FileOp | public | 0 | 1 | run_command | def run_command(self, cmd, *args, **kw):"""Runs the command, respecting verbosity and simulation.Returns stdout, or None if simulating."""cwd = popdefault(kw, 'cwd', os.getcwd())capture_stderr = popdefault(kw, 'capture_stderr', False)expect_returncode = popdefault(kw, 'expect_returncode', False)assert not kw, ("Argumen... | 13 | 40 | 4 | 245 | 0 | 305 | 349 | 305 | self,cmd,*args,**kw | [] | Returns | {"Assign": 7, "Expr": 9, "If": 10, "Return": 2, "Try": 1} | 19 | 45 | 19 | ["popdefault", "os.getcwd", "popdefault", "popdefault", "subprocess.Popen", "list", "OSError", "print", "join", "proc.communicate", "print", "join", "print", "print", "OSError", "print", "print", "print", "print"] | 34 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3584344_influxgraph_influxgraph.influxgraph._version_py.git_pieces_from_vcs", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3584344_influxgraph_influxgraph.versioneer_py.do_vcs_install", "_.content.gdrive.MyDrive.Ph... | The function (run_command) defined within the public class called FileOp, that inherit another class.The function start at line 305 and ends at 349. It contains 40 lines of code and it has a cyclomatic complexity of 13. It takes 4 parameters, represented as [305.0], and this function return a value. It declares 19.0 fu... |
pasteorg_pastescript | public | public | 0 | 0 | popdefault | def popdefault(dict, name, default=None):if name not in dict:return defaultelse:v = dict[name]del dict[name]return v | 2 | 7 | 3 | 34 | 1 | 351 | 357 | 351 | dict,name,default | ['v'] | Returns | {"Assign": 1, "If": 1, "Return": 2} | 0 | 7 | 0 | [] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051046_pasteorg_pastescript.paste.script.command_py.Command.run_command", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051046_pasteorg_pastescript.paste.script.filemaker_py.FileOp.run_command"] | The function (popdefault) defined within the public class called public.The function start at line 351 and ends at 357. It contains 7 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [351.0], and this function return a value. It has 2.0 functions calling this function which a... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.