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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
anaconda_anaconda-client | public | public | 0 | 0 | mount_subcommand.show_subcommand | def show_subcommand(ctx: typer.Context,spec: str = typer.Argument(show_default=False, callback=parse_specs, help='Package written as USER[/PACKAGE[/VERSION[/FILE]]]'),) -> None:args = Namespace(token=ctx.obj.params.get('token'),site=ctx.obj.params.get('site'),spec=spec,)main(args) | 1 | 12 | 4 | 72 | 0 | 118 | 130 | 118 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (mount_subcommand.show_subcommand) defined within the public class called public.The function start at line 118 and ends at 130. It contains 12 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [118.0] and does not return any value.. |
anaconda_anaconda-client | public | public | 0 | 0 | mount_subcommand | def mount_subcommand(app: typer.Typer, name: str, hidden: bool, help_text: str, context_settings: dict) -> None:@app.command(name=name,hidden=hidden,help=help_text,context_settings=context_settings,no_args_is_help=True,)def show_subcommand(ctx: typer.Context,spec: str = typer.Argument(show_default=False, callback=parse... | 1 | 9 | 5 | 55 | 1 | 110 | 130 | 110 | app,name,hidden,help_text,context_settings | ['args'] | None | {"Assign": 1, "Expr": 1} | 6 | 21 | 6 | ["typer.Argument", "Namespace", "ctx.obj.params.get", "ctx.obj.params.get", "main", "app.command"] | 0 | [] | The function (mount_subcommand) defined within the public class called public.The function start at line 110 and ends at 130. It contains 9 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [110.0] and does not return any value. It declares 6.0 functions, and It has 6.0 funct... |
anaconda_anaconda-client | public | public | 0 | 0 | get_attributes | def get_attributes(package: str, args: argparse.Namespace) -> typing.Tuple[Attributes, Attributes]:"""Parse source for attribute details."""loader: typing.Optional[typing.Callable[[typing.TextIO], detect.PackageAttributes]] = Noneif package.endswith('.json'):loader = json.loadelif package.endswith(('.yml', '.yaml')):lo... | 7 | 27 | 2 | 215 | 3 | 28 | 57 | 28 | package,args | ['message', 'package_type', 'loader'] | typing.Tuple[Attributes, Attributes] | {"AnnAssign": 4, "Assign": 5, "Expr": 3, "If": 5, "Return": 2, "Try": 1, "With": 1} | 11 | 30 | 11 | ["package.endswith", "package.endswith", "open", "loader", "detect.PackageType", "detect.detect_package_type", "logger.error", "errors.BinstarError", "detect.get_attrs", "logger.error", "errors.BinstarError"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95060891_anaconda_anaconda_client.binstar_client.commands.update_py.main"] | The function (get_attributes) defined within the public class called public.The function start at line 28 and ends at 57. It contains 27 lines of code and it has a cyclomatic complexity of 7. It takes 2 parameters, represented as [28.0] and does not return any value. It declares 11.0 functions, It has 11.0 functions ca... |
anaconda_anaconda-client | public | public | 0 | 0 | main | def main(args: argparse.Namespace) -> None:"""Process update request."""anaconda_api = get_server_api(args.token, args.site)anaconda_api.check_server()attrs: Attributes = get_attributes(args.source, args)[bool(args.release)]attrs = attrs.get('public_attrs', attrs)if args.release:anaconda_api.update_release(args.spec.us... | 2 | 19 | 1 | 120 | 2 | 60 | 81 | 60 | args | ['anaconda_api', 'attrs'] | None | {"AnnAssign": 1, "Assign": 2, "Expr": 5, "If": 1} | 8 | 22 | 8 | ["get_server_api", "anaconda_api.check_server", "get_attributes", "bool", "attrs.get", "anaconda_api.update_release", "anaconda_api.update_package", "logger.info"] | 304 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3494570_keirf_greaseweazle.src.greaseweazle.cli_py.main", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3511986_dart_archive_pub_dartlang.third_party.pystache.tests.test_commands_py.CommandsTestCase.callScript", "_.... | The function (main) defined within the public class called public.The function start at line 60 and ends at 81. It contains 19 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 8.0 functions, It has 8.0 functions called inside whi... |
anaconda_anaconda-client | public | public | 0 | 0 | file_type | def file_type(path: str) -> str:"""Validate argument value, that should be a valid path to file."""if os.path.isfile(path):return pathraise argparse.ArgumentTypeError(f'{path} is not a valid path') | 2 | 4 | 1 | 30 | 0 | 84 | 89 | 84 | path | [] | str | {"Expr": 1, "If": 1, "Return": 1} | 2 | 6 | 2 | ["os.path.isfile", "argparse.ArgumentTypeError"] | 0 | [] | The function (file_type) defined within the public class called public.The function start at line 84 and ends at 89. It contains 4 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 2.0 functions, and It has 2.0 functions called i... |
anaconda_anaconda-client | public | public | 0 | 0 | add_parser | def add_parser(subparsers: typing.Any) -> None:"""Add parser to CLI."""parser = subparsers.add_parser('update',usage=('\n\tanaconda update [--release] user/package[/version] CONDA_PACKAGE_1.tar.bz2''\n\tanaconda update [--release] user/package[/version] metadata.json'),description=__doc__,)parser.add_argument('spec',he... | 1 | 34 | 1 | 111 | 2 | 92 | 129 | 92 | subparsers | ['parser', 'release_group'] | None | {"Assign": 2, "Expr": 6} | 7 | 38 | 7 | ["subparsers.add_parser", "parser.add_argument", "parser.add_argument", "parser.add_argument", "parser.add_argument_group", "release_group.add_argument", "parser.set_defaults"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.87136529_vladimir_csp_uwsm.uwsm.main_py.Args.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95060891_anaconda_anaconda_client.binstar_client.scripts.cli_py._add_subparser_modules"] | The function (add_parser) defined within the public class called public.The function start at line 92 and ends at 129. It contains 34 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 7.0 functions, It has 7.0 functions called ins... |
anaconda_anaconda-client | public | public | 0 | 0 | mount_subcommand.update | def update(ctx: typer.Context,spec: str = typer.Argument(help=('Package - written as user/package/version[/filename]. ''If filename is not given, copy all files in the version'),show_default=False,callback=parse_specs,), | 1 | 10 | 2 | 33 | 0 | 140 | 149 | 140 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (mount_subcommand.update) defined within the public class called public.The function start at line 140 and ends at 149. It contains 10 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [140.0] and does not return any value.. |
anaconda_anaconda-client | public | public | 0 | 0 | mount_subcommand | def mount_subcommand(app: typer.Typer, name: str, hidden: bool, help_text: str, context_settings: dict) -> None:@app.command(name=name,hidden=hidden,help=help_text,context_settings=context_settings,no_args_is_help=True,)def update(ctx: typer.Context,spec: str = typer.Argument(help=('Package - written as user/package/ve... | 1 | 37 | 5 | 178 | 1 | 132 | 178 | 132 | app,name,hidden,help_text,context_settings | ['args'] | None | {"Assign": 1, "Expr": 1} | 9 | 47 | 9 | ["typer.Argument", "typer.Argument", "typer.Option", "typer.Option", "argparse.Namespace", "ctx.obj.params.get", "ctx.obj.params.get", "main", "app.command"] | 0 | [] | The function (mount_subcommand) defined within the public class called public.The function start at line 132 and ends at 178. It contains 37 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [132.0] and does not return any value. It declares 9.0 functions, and It has 9.0 func... |
anaconda_anaconda-client | public | public | 0 | 0 | main | def main(arguments: argparse.Namespace) -> None:"""Entrypoint of the :code:`upload` command."""uploader: Uploader = Uploader(arguments=arguments)uploader.api.check_server()_ = uploader.usernametry:filename: strfor filename in sorted(set(itertools.chain.from_iterable(arguments.files))):uploader.upload(filename)finally:u... | 3 | 11 | 1 | 77 | 1 | 48 | 60 | 48 | arguments | ['_'] | None | {"AnnAssign": 2, "Assign": 1, "Expr": 5, "For": 1, "Try": 1} | 8 | 13 | 8 | ["Uploader", "uploader.api.check_server", "sorted", "set", "itertools.chain.from_iterable", "uploader.upload", "uploader.print_uploads", "uploader.cleanup"] | 304 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3494570_keirf_greaseweazle.src.greaseweazle.cli_py.main", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3511986_dart_archive_pub_dartlang.third_party.pystache.tests.test_commands_py.CommandsTestCase.callScript", "_.... | The function (main) defined within the public class called public.The function start at line 48 and ends at 60. It contains 11 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value. It declares 8.0 functions, It has 8.0 functions called inside whi... |
anaconda_anaconda-client | CacheRecord | public | 0 | 0 | __init__ | def __init__(self, empty: bool = True) -> None:"""Initialize new :class:`~CacheRecord` instance."""self.empty: bool = empty | 1 | 2 | 2 | 21 | 0 | 79 | 81 | 79 | self,empty | [] | None | {"AnnAssign": 1, "Expr": 1} | 0 | 3 | 0 | [] | 14,667 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.query_py.AllocationError.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.query_py.ContentError.__init__", "_... | The function (__init__) defined within the public class called CacheRecord.The function start at line 79 and ends at 81. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [79.0] and does not return any value. It has 14667.0 functions calling this function which a... |
anaconda_anaconda-client | CacheRecord | public | 0 | 0 | cleanup | def cleanup(storage: typing.Dict[KeyT, CacheRecordT],action: typing.Optional[typing.Callable[[KeyT, CacheRecordT], typing.Any]] = None,) -> int:"""Remove all empty records from :code:`storage`.Optional :code:`action` function might be called for each instance being removed."""to_remove: typing.List[KeyT] = []key: KeyTr... | 5 | 15 | 3 | 109 | 0 | 84 | 106 | 84 | storage,action | [] | int | {"AnnAssign": 3, "Expr": 4, "For": 2, "If": 2, "Return": 1} | 5 | 23 | 5 | ["storage.items", "to_remove.append", "action", "storage.pop", "len"] | 14 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3685324_prologin_stechec2.tools.waf.unittest_gtest_py.unpack_gtest", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3722056_grml_grml2usb.test.grml2usb_py.exec_rsync", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Cre... | The function (cleanup) defined within the public class called CacheRecord.The function start at line 84 and ends at 106. It contains 15 lines of code and it has a cyclomatic complexity of 5. It takes 3 parameters, represented as [84.0] and does not return any value. It declares 5.0 functions, It has 5.0 functions calle... |
anaconda_anaconda-client | CacheRecord | public | 0 | 0 | __init__ | def __init__(self, name: str, empty: bool = True, package_types: typing.Iterable[PackageType] = ()) -> None:"""Initialize new :class:`~PackageCacheRecord` instance."""super().__init__(empty=empty)self.name: typing.Final[str] = nameself.package_types: typing.List[PackageType] = list(package_types) | 1 | 4 | 4 | 67 | 0 | 114 | 118 | 114 | self,empty | [] | None | {"AnnAssign": 1, "Expr": 1} | 0 | 3 | 0 | [] | 14,667 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.query_py.AllocationError.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.query_py.ContentError.__init__", "_... | The function (__init__) defined within the public class called CacheRecord.The function start at line 114 and ends at 118. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [114.0] and does not return any value. It has 14667.0 functions calling this function whic... |
anaconda_anaconda-client | PackageCacheRecord | public | 0 | 1 | update | def update(self, package_type: PackageType) -> None:"""Update record after a file is uploaded to this package."""self.empty = Falseif package_type not in self.package_types:self.package_types.append(package_type) | 2 | 4 | 2 | 33 | 0 | 120 | 124 | 120 | self,package_type | [] | None | {"Assign": 1, "Expr": 2, "If": 1} | 1 | 5 | 1 | ["self.package_types.append"] | 1,312 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16851155_pbui_bobbit.src.bobbit.modules.duckhunt_py.ducks", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.21593641_openforcefield_openff_fragmenter.openff.fragmenter.fragment_py.Fragmenter._find_ring_systems", "_.co... | The function (update) defined within the public class called PackageCacheRecord, that inherit another class.The function start at line 120 and ends at 124. It contains 4 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [120.0] and does not return any value. It declare 1.0 fun... |
anaconda_anaconda-client | CacheRecord | public | 0 | 0 | __init__ | def __init__(self, name: str, version: str, empty: bool = True) -> None:"""Initialize new :class:`~ReleaseCacheRecord` instance."""super().__init__(empty=empty)self.name: typing.Final[str] = nameself.version: typing.Final[str] = version | 1 | 4 | 4 | 56 | 0 | 132 | 136 | 132 | self,empty | [] | None | {"AnnAssign": 1, "Expr": 1} | 0 | 3 | 0 | [] | 14,667 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.query_py.AllocationError.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.query_py.ContentError.__init__", "_... | The function (__init__) defined within the public class called CacheRecord.The function start at line 132 and ends at 136. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [132.0] and does not return any value. It has 14667.0 functions calling this function whic... |
anaconda_anaconda-client | PackageCacheRecord | public | 0 | 1 | update | def update(self) -> None:"""Update record after a file is uploaded to this release."""self.empty = False | 1 | 2 | 1 | 13 | 0 | 138 | 140 | 138 | self,package_type | [] | None | {"Assign": 1, "Expr": 2, "If": 1} | 1 | 5 | 1 | ["self.package_types.append"] | 1,312 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16851155_pbui_bobbit.src.bobbit.modules.duckhunt_py.ducks", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.21593641_openforcefield_openff_fragmenter.openff.fragmenter.fragment_py.Fragmenter._find_ring_systems", "_.co... | The function (update) defined within the public class called PackageCacheRecord, that inherit another class.The function start at line 138 and ends at 140. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 functio... |
anaconda_anaconda-client | CacheRecord | public | 0 | 0 | __init__ | def __init__(self, filename: str, meta: detect.Meta) -> None:"""Initialize new :class:`~PackageMeta` instance."""self.filename: typing.Final[str] = filenameself.meta: typing.Final[detect.Meta] = metaself.__file_attrs: typing.Optional[detect.FileAttributes] = Noneself.__name: typing.Optional[str] = Noneself.__package_at... | 1 | 8 | 3 | 110 | 0 | 156 | 165 | 156 | self,empty | [] | None | {"AnnAssign": 1, "Expr": 1} | 0 | 3 | 0 | [] | 14,667 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.query_py.AllocationError.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.query_py.ContentError.__init__", "_... | The function (__init__) defined within the public class called CacheRecord.The function start at line 156 and ends at 165. It contains 8 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [156.0] and does not return any value. It has 14667.0 functions calling this function whic... |
anaconda_anaconda-client | PackageMeta | public | 0 | 0 | extension | def extension(self) -> str:# noqa: D401"""File extension of the package file."""return self.meta.extension | 1 | 2 | 1 | 14 | 0 | 168 | 170 | 168 | self | [] | str | {"Expr": 1, "Return": 1} | 0 | 3 | 0 | [] | 0 | [] | The function (extension) defined within the public class called PackageMeta.The function start at line 168 and ends at 170. 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.. |
anaconda_anaconda-client | PackageMeta | public | 0 | 0 | file_attrs | def file_attrs(self) -> detect.FileAttributes:# noqa: D401"""Attributes of a file being uploaded."""if self.__file_attrs is None:self._update_attrs()return typing.cast(detect.FileAttributes, self.__file_attrs) | 2 | 4 | 1 | 35 | 0 | 173 | 177 | 173 | self | [] | detect.FileAttributes | {"Expr": 2, "If": 1, "Return": 1} | 2 | 5 | 2 | ["self._update_attrs", "typing.cast"] | 0 | [] | The function (file_attrs) defined within the public class called PackageMeta.The function start at line 173 and ends at 177. It contains 4 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 2.0 functions, and It has 2.0 functions ... |
anaconda_anaconda-client | PackageMeta | public | 0 | 0 | name | def name(self) -> str:# noqa: D401"""Name of a package for which file is being uploaded."""if self.__name is None:self._update_name()return typing.cast(str, self.__name) | 2 | 4 | 1 | 31 | 0 | 180 | 184 | 180 | self | [] | str | {"Expr": 2, "If": 1, "Return": 1} | 2 | 5 | 2 | ["self._update_name", "typing.cast"] | 13 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3594492_mangroveorg_mangrove.mangrove.form_model.tests.test_form_model_py.FormModelTest._create_form_model", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3594492_mangroveorg_mangrove.mangrove.form_model.tests.test_... | The function (name) defined within the public class called PackageMeta.The function start at line 180 and ends at 184. It contains 4 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 2.0 functions, It has 2.0 functions called insi... |
anaconda_anaconda-client | PackageMeta | public | 0 | 0 | name | def name(self, value: str) -> None:"""Update value of a :attr:`~PackageMeta.name`."""self._update_name(value) | 1 | 2 | 2 | 18 | 0 | 187 | 189 | 187 | self | [] | str | {"Expr": 2, "If": 1, "Return": 1} | 2 | 5 | 2 | ["self._update_name", "typing.cast"] | 13 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3594492_mangroveorg_mangrove.mangrove.form_model.tests.test_form_model_py.FormModelTest._create_form_model", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3594492_mangroveorg_mangrove.mangrove.form_model.tests.test_... | The function (name) defined within the public class called PackageMeta.The function start at line 187 and ends at 189. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [187.0] and does not return any value. It declares 2.0 functions, It has 2.0 functions called ... |
anaconda_anaconda-client | PackageMeta | public | 0 | 0 | package_attrs | def package_attrs(self) -> detect.PackageAttributes:# noqa: D401"""Attributes of a package for which file is being uploaded."""if self.__package_attrs is None:self._update_attrs()return typing.cast(detect.PackageAttributes, self.__package_attrs) | 2 | 4 | 1 | 35 | 0 | 192 | 196 | 192 | self | [] | detect.PackageAttributes | {"Expr": 2, "If": 1, "Return": 1} | 2 | 5 | 2 | ["self._update_attrs", "typing.cast"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3969552_mic92_nixpkgs_review.nixpkgs_review.review_py.join_packages"] | The function (package_attrs) defined within the public class called PackageMeta.The function start at line 192 and ends at 196. It contains 4 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 2.0 functions, It has 2.0 functions ca... |
anaconda_anaconda-client | PackageMeta | public | 0 | 0 | package_key | def package_key(self) -> PackageKey:# noqa: D401"""Key for accessing related cached package record."""return self.name | 1 | 2 | 1 | 12 | 0 | 199 | 201 | 199 | self | [] | PackageKey | {"Expr": 1, "Return": 1} | 0 | 3 | 0 | [] | 0 | [] | The function (package_key) defined within the public class called PackageMeta.The function start at line 199 and ends at 201. 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.. |
anaconda_anaconda-client | PackageMeta | public | 0 | 0 | package_type | def package_type(self) -> PackageType:# noqa: D401"""Type of a package being uploaded."""return self.meta.package_type | 1 | 2 | 1 | 14 | 0 | 204 | 206 | 204 | self | [] | PackageType | {"Expr": 1, "Return": 1} | 0 | 3 | 0 | [] | 0 | [] | The function (package_type) defined within the public class called PackageMeta.The function start at line 204 and ends at 206. 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.. |
anaconda_anaconda-client | PackageMeta | public | 0 | 0 | release_attrs | def release_attrs(self) -> detect.ReleaseAttributes:# noqa: D401"""Attributes of a release for which file is being uploaded."""if self.__release_attrs is None:self._update_attrs()return typing.cast(detect.ReleaseAttributes, self.__release_attrs) | 2 | 4 | 1 | 35 | 0 | 209 | 213 | 209 | self | [] | detect.ReleaseAttributes | {"Expr": 2, "If": 1, "Return": 1} | 2 | 5 | 2 | ["self._update_attrs", "typing.cast"] | 0 | [] | The function (release_attrs) defined within the public class called PackageMeta.The function start at line 209 and ends at 213. It contains 4 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 2.0 functions, and It has 2.0 functio... |
anaconda_anaconda-client | PackageMeta | public | 0 | 0 | release_key | def release_key(self) -> ReleaseKey:# noqa: D401"""Key for accessing related cached release record."""return self.name, self.version | 1 | 2 | 1 | 16 | 0 | 216 | 218 | 216 | self | [] | ReleaseKey | {"Expr": 1, "Return": 1} | 0 | 3 | 0 | [] | 0 | [] | The function (release_key) defined within the public class called PackageMeta.The function start at line 216 and ends at 218. 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.. |
anaconda_anaconda-client | PackageMeta | public | 0 | 0 | version | def version(self) -> str:# noqa: D401"""Version of a package being uploaded."""if self.__version is None:self._update_version()return typing.cast(str, self.__version) | 2 | 4 | 1 | 31 | 0 | 221 | 225 | 221 | self | [] | str | {"Expr": 2, "If": 1, "Return": 1} | 2 | 5 | 2 | ["self._update_version", "typing.cast"] | 29 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3719382_myint_rstcheck.src.rstcheck._cli_py.version_callback", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3720326_openxc_openxc_python.openxc.tools.control_py.main", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_C... | The function (version) defined within the public class called PackageMeta.The function start at line 221 and ends at 225. It contains 4 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 2.0 functions, It has 2.0 functions called i... |
anaconda_anaconda-client | PackageMeta | public | 0 | 0 | version | def version(self, value: str) -> None:"""Update value of a :attr:`~PackageMeta.version`."""self._update_version(value) | 1 | 2 | 2 | 18 | 0 | 228 | 230 | 228 | self | [] | str | {"Expr": 2, "If": 1, "Return": 1} | 2 | 5 | 2 | ["self._update_version", "typing.cast"] | 29 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3719382_myint_rstcheck.src.rstcheck._cli_py.version_callback", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3720326_openxc_openxc_python.openxc.tools.control_py.main", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_C... | The function (version) defined within the public class called PackageMeta.The function start at line 228 and ends at 230. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [228.0] and does not return any value. It declares 2.0 functions, It has 2.0 functions call... |
anaconda_anaconda-client | PackageMeta | public | 0 | 0 | rebuild_basename | def rebuild_basename(self) -> str:"""Rebuild package basename from its attributes.Usually basename contains actual filename being uploaded, which may not include expected metadata in theexpected format. This function allows to enforce the standard without requiring user to rename the file.:return: New basename."""subdi... | 3 | 11 | 1 | 112 | 0 | 232 | 252 | 232 | self | [] | str | {"AnnAssign": 2, "Assign": 4, "Expr": 1, "If": 1, "Return": 1, "Try": 1} | 5 | 21 | 5 | ["get", "self.file_attrs.setdefault", "split", "self.file_attrs.get", "setdefault"] | 0 | [] | The function (rebuild_basename) defined within the public class called PackageMeta.The function start at line 232 and ends at 252. It contains 11 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value. It declares 5.0 functions, and It has 5.0 fun... |
anaconda_anaconda-client | PackageMeta | public | 0 | 0 | _update_attrs | def _update_attrs(self, *args: typing.Any, **kwargs: typing.Any) -> None:"""Update content of all attribute fields."""logger.info('Extracting %s attributes for upload', self.package_type.label.lower())try:self.__package_attrs, self.__release_attrs, self.__file_attrs = detect.get_attrs(self.package_type,self.filename,*a... | 2 | 16 | 3 | 101 | 0 | 254 | 270 | 254 | self,*args,**kwargs | [] | None | {"AnnAssign": 1, "Assign": 1, "Expr": 3, "Try": 1} | 6 | 17 | 6 | ["logger.info", "self.package_type.label.lower", "detect.get_attrs", "self.package_type.label.lower", "logger.error", "errors.BinstarError"] | 0 | [] | The function (_update_attrs) defined within the public class called PackageMeta.The function start at line 254 and ends at 270. It contains 16 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [254.0] and does not return any value. It declares 6.0 functions, and It has 6.0 fu... |
anaconda_anaconda-client | PackageMeta | public | 0 | 0 | _update_name | def _update_name(self, value: typing.Optional[str] = None) -> None:"""Update value of a :attr:`~PackageMeta.name`."""name: str = self.package_attrs.get('name', '')if value:if name:good_names: typing.List[str] = [name := name.lower()]if self.package_type is PackageType.STANDARD_PYTHON:good_names.append(name.replace('-',... | 6 | 23 | 2 | 145 | 0 | 272 | 298 | 272 | self,value | [] | None | {"AnnAssign": 3, "Assign": 3, "Expr": 4, "If": 5} | 12 | 27 | 12 | ["self.package_attrs.get", "name.lower", "good_names.append", "name.replace", "value.lower", "value.lower", "lower", "logger.error", "errors.BinstarError", "self.package_type.label.lower", "logger.error", "errors.BinstarError"] | 0 | [] | The function (_update_name) defined within the public class called PackageMeta.The function start at line 272 and ends at 298. It contains 23 lines of code and it has a cyclomatic complexity of 6. It takes 2 parameters, represented as [272.0] and does not return any value. It declares 12.0 functions, and It has 12.0 f... |
anaconda_anaconda-client | PackageMeta | public | 0 | 0 | _update_version | def _update_version(self, value: typing.Optional[str] = None) -> None:"""Update value of a :attr:`~PackageMeta.version`."""if not value:value = self.release_attrs.get('version', None)if not value:message: str = (f'Could not detect package version for package type "{self.package_type.label.lower()}", 'f'please use the -... | 3 | 11 | 2 | 67 | 0 | 300 | 312 | 300 | self,value | [] | None | {"AnnAssign": 1, "Assign": 2, "Expr": 2, "If": 2} | 4 | 13 | 4 | ["self.release_attrs.get", "self.package_type.label.lower", "logger.error", "errors.BinstarError"] | 0 | [] | The function (_update_version) defined within the public class called PackageMeta.The function start at line 300 and ends at 312. It contains 11 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [300.0] and does not return any value. It declares 4.0 functions, and It has 4.0 ... |
anaconda_anaconda-client | CacheRecord | public | 0 | 0 | __init__ | def __init__(self, arguments: argparse.Namespace) -> None:"""Initialize new :class:`~Uploader` instance."""self.arguments: typing.Final[argparse.Namespace] = argumentsself.uploaded_packages: typing.Final[typing.List[UploadedPackage]] = []self.__api: typing.Optional[binstar_client.Binstar] = Noneself.__config: typing.Op... | 1 | 8 | 2 | 133 | 0 | 328 | 338 | 328 | self,empty | [] | None | {"AnnAssign": 1, "Expr": 1} | 0 | 3 | 0 | [] | 14,667 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.query_py.AllocationError.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.query_py.ContentError.__init__", "_... | The function (__init__) defined within the public class called CacheRecord.The function start at line 328 and ends at 338. It contains 8 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [328.0] and does not return any value. It has 14667.0 functions calling this function whic... |
anaconda_anaconda-client | Uploader | public | 0 | 0 | api | def api(self) -> binstar_client.Binstar:# noqa: D401"""Client used to access anaconda.org API."""if self.__api is None:self.__api = get_server_api(token=self.arguments.token, site=self.arguments.site, config=self.config)return self.__api | 2 | 4 | 1 | 49 | 0 | 341 | 345 | 341 | self | [] | binstar_client.Binstar | {"Assign": 1, "Expr": 1, "If": 1, "Return": 1} | 1 | 5 | 1 | ["get_server_api"] | 16 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3526730_foauth_foauth_org.services.launchpad_py.Launchpad.get_user_id", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3952283_home_assistant_libs_pytradfri.examples.debug_info_py.print_gateway", "_.content.gdrive.My... | The function (api) defined within the public class called Uploader.The function start at line 341 and ends at 345. It contains 4 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declare 1.0 function, It has 1.0 function called inside whic... |
anaconda_anaconda-client | Uploader | public | 0 | 0 | config | def config(self) -> typing.Mapping[str, typing.Any]:# noqa: D401"""Configuration of the :code:`anaconda-client`."""if self.__config is None:self.__config = get_config(site=self.arguments.site)return self.__config | 2 | 4 | 1 | 42 | 0 | 348 | 352 | 348 | self | [] | typing.Mapping[str, typing.Any] | {"Assign": 1, "Expr": 1, "If": 1, "Return": 1} | 1 | 5 | 1 | ["get_config"] | 27 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69330939_devilxd_twitchdropsminer.gui_py.ChannelList._selected", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69330939_devilxd_twitchdropsminer.gui_py.GUIManager.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Data... | The function (config) defined within the public class called Uploader.The function start at line 348 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 does not return any value. It declare 1.0 function, It has 1.0 function called inside w... |
anaconda_anaconda-client | Uploader | public | 0 | 0 | username | def username(self) -> str:# noqa: D401"""Name of the user or organization to upload packages to."""if self.__username is None:details: str = ''username: str = self.arguments.user or ''if (not username) and (username := self.config.get('upload_user', '')):details = ' (from "upload_user" preference)'if username:try:self.... | 7 | 18 | 1 | 129 | 0 | 355 | 373 | 355 | self | [] | str | {"AnnAssign": 3, "Assign": 3, "Expr": 4, "If": 3, "Return": 1, "Try": 1} | 6 | 19 | 6 | ["self.config.get", "self.api.user", "logger.error", "errors.BinstarError", "self.api.user", "logger.info"] | 0 | [] | The function (username) defined within the public class called Uploader.The function start at line 355 and ends at 373. It contains 18 lines of code and it has a cyclomatic complexity of 7. The function does not take any parameters and does not return any value. It declares 6.0 functions, and It has 6.0 functions call... |
anaconda_anaconda-client | public | public | 0 | 0 | cleanup.remove_empty_release | def remove_empty_release(_key: ReleaseKey, record: ReleaseCacheRecord) -> None:try:if not self.api.release(self.username, record.name, record.version).get('distributions', []):logger.info('Removing empty "%s/%s" release after failed upload', record.name, record.version)self.api.remove_release(self.username, record.name... | 3 | 7 | 2 | 88 | 0 | 382 | 388 | 382 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (cleanup.remove_empty_release) defined within the public class called public.The function start at line 382 and ends at 388. It contains 7 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [382.0] and does not return any value.. |
anaconda_anaconda-client | public | public | 0 | 0 | cleanup.remove_empty_package | def remove_empty_package(_key: PackageKey, record: PackageCacheRecord) -> None:try:if not self.api.package(self.username, record.name).get('files', []):logger.info('Removing empty "%s" package after failed upload', record.name)self.api.remove_package(self.username, record.name)except (AttributeError, TypeError, errors.... | 3 | 7 | 2 | 76 | 0 | 390 | 396 | 390 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (cleanup.remove_empty_package) defined within the public class called public.The function start at line 390 and ends at 396. It contains 7 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [390.0] and does not return any value.. |
anaconda_anaconda-client | CacheRecord | public | 0 | 0 | cleanup | def cleanup(self) -> None:"""Remove empty releases and packages.Package or release considered to be empty if it was created to upload files to, but all file uploads failed."""def remove_empty_release(_key: ReleaseKey, record: ReleaseCacheRecord) -> None:try:if not self.api.release(self.username, record.name, record.ver... | 1 | 5 | 1 | 32 | 0 | 375 | 399 | 375 | storage,action | [] | int | {"AnnAssign": 3, "Expr": 4, "For": 2, "If": 2, "Return": 1} | 5 | 23 | 5 | ["storage.items", "to_remove.append", "action", "storage.pop", "len"] | 14 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3685324_prologin_stechec2.tools.waf.unittest_gtest_py.unpack_gtest", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3722056_grml_grml2usb.test.grml2usb_py.exec_rsync", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Cre... | The function (cleanup) defined within the public class called CacheRecord.The function start at line 375 and ends at 399. It contains 5 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 5.0 functions, It has 5.0 functions called i... |
anaconda_anaconda-client | Uploader | public | 0 | 0 | get_package | def get_package(self, meta: PackageMeta, *, force: bool = False) -> PackageCacheRecord:"""Retrieve details on a package from the server.If not forced - may return cached record."""key: typing.Final[PackageKey] = meta.package_keycache_record: typing.Optional[PackageCacheRecord]if (not force) and (cache_record := self.__... | 7 | 40 | 3 | 327 | 0 | 401 | 449 | 401 | self,meta,force | [] | PackageCacheRecord | {"AnnAssign": 5, "Assign": 4, "Expr": 4, "If": 3, "Return": 2, "Try": 1} | 17 | 49 | 17 | ["self.__package_cache.get", "self.api.package", "PackageCacheRecord", "list", "map", "instance.get", "logger.error", "errors.UserError", "meta.package_attrs.get", "meta.package_type.label.lower", "logger.error", "errors.BinstarError", "self.api.add_package", "meta.package_attrs.get", "meta.package_attrs.get", "meta.pa... | 0 | [] | The function (get_package) defined within the public class called Uploader.The function start at line 401 and ends at 449. It contains 40 lines of code and it has a cyclomatic complexity of 7. It takes 3 parameters, represented as [401.0] and does not return any value. It declares 17.0 functions, and It has 17.0 funct... |
anaconda_anaconda-client | Uploader | public | 0 | 0 | get_release | def get_release(self, meta: PackageMeta, *, force: bool = False) -> ReleaseCacheRecord:"""Retrieve details on a release from the server.If not forced - may return cached record."""key: typing.Final[ReleaseKey] = meta.release_keycache_record: typing.Optional[ReleaseCacheRecord]if (not force) and (cache_record := self.__... | 8 | 24 | 3 | 272 | 0 | 451 | 483 | 451 | self,meta,force | [] | ReleaseCacheRecord | {"AnnAssign": 3, "Assign": 4, "Expr": 7, "If": 5, "Return": 2, "Try": 1} | 13 | 33 | 13 | ["self.__release_cache.get", "self.api.release", "self.api.update_release", "ReleaseCacheRecord", "logger.info", "bool_input", "logger.info", "SystemExit", "logger.info", "bool_input", "input", "self.api.add_release", "ReleaseCacheRecord"] | 0 | [] | The function (get_release) defined within the public class called Uploader.The function start at line 451 and ends at 483. It contains 24 lines of code and it has a cyclomatic complexity of 8. It takes 3 parameters, represented as [451.0] and does not return any value. It declares 13.0 functions, and It has 13.0 funct... |
anaconda_anaconda-client | Uploader | public | 0 | 0 | print_uploads | def print_uploads(self) -> None:"""Print details on all successful package uploads."""package_info: UploadedPackagefor package_info in self.uploaded_packages:logger.info('%s located at:\n%s\n', package_info['package_type'].label.lower(), package_info['url']) | 2 | 4 | 1 | 40 | 0 | 485 | 489 | 485 | self | [] | None | {"AnnAssign": 1, "Expr": 2, "For": 1} | 2 | 5 | 2 | ["logger.info", "label.lower"] | 0 | [] | The function (print_uploads) defined within the public class called Uploader.The function start at line 485 and ends at 489. It contains 4 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 2.0 functions, and It has 2.0 functions ... |
anaconda_anaconda-client | Uploader | public | 0 | 0 | upload | def upload(self, filename: str) -> bool:"""Upload a file to the server."""if not os.path.exists(filename):message: str = f'File "{filename}" does not exist'logger.error(message)raise errors.BinstarError(message)logger.info('Processing "%s"', filename)package_meta: detect.Meta = self.detect_package_meta(filename,package... | 4 | 13 | 2 | 115 | 0 | 491 | 507 | 491 | self,filename | [] | bool | {"AnnAssign": 2, "Expr": 3, "If": 2, "Return": 1} | 8 | 17 | 8 | ["os.path.exists", "logger.error", "errors.BinstarError", "logger.info", "self.detect_package_meta", "PackageType", "typer.BadParameter", "self.upload_package"] | 14 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3517196_debian_dput_ng.tests.test_upload_py.test_double_upload", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3517196_debian_dput_ng.tests.test_upload_py.test_ppa_upload", "_.content.gdrive.MyDrive.Phd_Thesis.Datas... | The function (upload) defined within the public class called Uploader.The function start at line 491 and ends at 507. It contains 13 lines of code and it has a cyclomatic complexity of 4. It takes 2 parameters, represented as [491.0] and does not return any value. It declares 8.0 functions, It has 8.0 functions called ... |
anaconda_anaconda-client | Uploader | public | 0 | 0 | upload_package | def upload_package(self, filename: str, package_meta: detect.Meta) -> bool:"""Upload a package to the server."""meta: PackageMeta = PackageMeta(filename=filename, meta=package_meta)meta._update_attrs(parser_args=self.arguments)meta._update_name(self.arguments.package)meta._update_version(self.arguments.version)if self.... | 8 | 23 | 3 | 255 | 0 | 509 | 536 | 509 | self,filename,package_meta | [] | bool | {"AnnAssign": 2, "Assign": 3, "Expr": 9, "If": 6, "Return": 3} | 14 | 28 | 14 | ["PackageMeta", "meta._update_attrs", "meta._update_name", "meta._update_version", "meta.file_attrs.setdefault", "meta.rebuild_basename", "self._check_file", "logger.info", "self.get_package", "self.validate_package_type", "logger.info", "self.get_release", "logger.info", "self._upload_file"] | 0 | [] | The function (upload_package) defined within the public class called Uploader.The function start at line 509 and ends at 536. It contains 23 lines of code and it has a cyclomatic complexity of 8. It takes 3 parameters, represented as [509.0] and does not return any value. It declares 14.0 functions, and It has 14.0 fu... |
anaconda_anaconda-client | Uploader | public | 0 | 0 | _check_file | def _check_file(self, meta: PackageMeta) -> bool:""""""basename: str = meta.file_attrs['basename']try:self.api.distribution(self.username, meta.name, meta.version, basename)except errors.NotFound:return Trueif self.arguments.mode == 'skip':logger.info('Distribution already exists. Skipping upload.\n')return Falseif sel... | 6 | 30 | 2 | 189 | 0 | 538 | 572 | 538 | self,meta | [] | bool | {"AnnAssign": 1, "Expr": 8, "If": 4, "Return": 5, "Try": 1} | 9 | 35 | 9 | ["self.api.distribution", "logger.info", "logger.warning", "self.api.remove_dist", "bool_input", "self.api.remove_dist", "logger.info", "logger.info", "errors.Conflict"] | 0 | [] | The function (_check_file) defined within the public class called Uploader.The function start at line 538 and ends at 572. It contains 30 lines of code and it has a cyclomatic complexity of 6. It takes 2 parameters, represented as [538.0] and does not return any value. It declares 9.0 functions, and It has 9.0 functio... |
anaconda_anaconda-client | Uploader | public | 0 | 0 | _upload_file | def _upload_file(self, meta: PackageMeta) -> bool:"""Perform upload of a file after its metadata and related package and release are prepared."""basename: str = meta.file_attrs['basename']package_type: typing.Union[PackageType, str] = meta.file_attrs.pop('binstar_package_type', meta.package_type)stream: typing.BinaryIO... | 1 | 31 | 2 | 218 | 0 | 574 | 607 | 574 | self,meta | [] | bool | {"AnnAssign": 4, "Expr": 5, "Return": 1, "With": 1} | 9 | 34 | 9 | ["meta.file_attrs.pop", "open", "self.api.upload", "meta.file_attrs.get", "self.uploaded_packages.append", "result.get", "update", "update", "logger.info"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.77509666_iterative_dvc_data.src.dvc_data.hashfile.build_py._build_files"] | The function (_upload_file) defined within the public class called Uploader.The function start at line 574 and ends at 607. It contains 31 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [574.0] and does not return any value. It declares 9.0 functions, It has 9.0 functions c... |
anaconda_anaconda-client | Uploader | public | 0 | 0 | detect_package_meta | def detect_package_meta(filename: str, package_type: typing.Optional[PackageType] = None) -> detect.Meta:"""Detect primary details on package being uploaded."""if package_type is None:logger.info('Detecting file type...')result: detect.OptMeta = detect.detect_package_meta(filename)if result is None:message: str = (f'Co... | 4 | 17 | 2 | 129 | 0 | 610 | 627 | 610 | filename,package_type | [] | detect.Meta | {"AnnAssign": 2, "Assign": 2, "Expr": 4, "If": 3, "Return": 1} | 8 | 18 | 8 | ["logger.info", "detect.detect_package_meta", "logger.error", "errors.BinstarError", "logger.info", "detect.complete_package_meta", "detect.Meta", "os.path.splitext"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95060891_anaconda_anaconda_client.binstar_client.utils.detect_py.detect_package_extension", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95060891_anaconda_anaconda_client.binstar_client.utils.detect_py.detect_packa... | The function (detect_package_meta) defined within the public class called Uploader.The function start at line 610 and ends at 627. It contains 17 lines of code and it has a cyclomatic complexity of 4. It takes 2 parameters, represented as [610.0] and does not return any value. It declares 8.0 functions, It has 8.0 func... |
anaconda_anaconda-client | Uploader | public | 0 | 0 | validate_package_type | def validate_package_type(package: PackageCacheRecord, package_type: PackageType) -> bool:"""Check if file of :code:`package_type` might be uploaded to :code:`package`."""if not package.package_types:return Trueif package_type in package.package_types:return Truegroup: typing.Set[PackageType]for group in [{PackageType.... | 6 | 15 | 2 | 98 | 0 | 630 | 648 | 630 | package,package_type | [] | bool | {"AnnAssign": 2, "Expr": 2, "For": 1, "If": 3, "Return": 3} | 5 | 19 | 5 | ["group.isdisjoint", "label.lower", "package_type.label.lower", "logger.error", "errors.BinstarError"] | 0 | [] | The function (validate_package_type) defined within the public class called Uploader.The function start at line 630 and ends at 648. It contains 15 lines of code and it has a cyclomatic complexity of 6. It takes 2 parameters, represented as [630.0] and does not return any value. It declares 5.0 functions, and It has 5... |
anaconda_anaconda-client | public | public | 0 | 0 | pathname_list | def pathname_list(item: str) -> typing.List[str]:"""Expand file patterns to lists of actual file names."""if (os.name == 'nt') and any(character in '*?' for character in item):return glob.glob(item)return [item] | 4 | 4 | 1 | 46 | 0 | 651 | 655 | 651 | item | [] | typing.List[str] | {"Expr": 1, "If": 1, "Return": 2} | 2 | 5 | 2 | ["any", "glob.glob"] | 0 | [] | The function (pathname_list) defined within the public class called public.The function start at line 651 and ends at 655. It contains 4 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters and does not return any value. It declares 2.0 functions, and It has 2.0 functions ca... |
anaconda_anaconda-client | public | public | 0 | 0 | add_parser | def add_parser(subparsers: typing.Any) -> None:"""Register an :code:`upload` command in the application."""description: str = 'Upload packages to your Anaconda repository'parser: argparse.ArgumentParser = subparsers.add_parser('upload',formatter_class=argparse.RawDescriptionHelpFormatter,help=description,description=de... | 1 | 141 | 1 | 501 | 3 | 658 | 807 | 658 | subparsers | ['group', 'register_group', 'mgroup'] | None | {"AnnAssign": 3, "Assign": 3, "Expr": 24} | 30 | 150 | 30 | ["subparsers.add_parser", "parser.add_argument", "parser.add_argument", "label_help.format", "parser.add_argument", "label_help.format", "parser.add_argument", "parser.add_argument", "parser.add_argument", "parser.add_argument_group", "mgroup.add_argument", "mgroup.add_argument", "mgroup.add_argument", "mgroup.add_argu... | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.87136529_vladimir_csp_uwsm.uwsm.main_py.Args.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95060891_anaconda_anaconda_client.binstar_client.scripts.cli_py._add_subparser_modules"] | The function (add_parser) defined within the public class called public.The function start at line 658 and ends at 807. It contains 141 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 30.0 functions, It has 30.0 functions called... |
anaconda_anaconda-client | public | public | 0 | 0 | _exclusive_mode | def _exclusive_mode(ctx: typer.Context, param: typer.CallbackParam, value: str) -> str:"""Check for exclusivity of mode arguments.To do this, we attach a new special attribute onto the typer Context the first timeone of the options in the group is used."""if getattr(ctx, '_modes', None) is None:# Add an empty set on fi... | 5 | 9 | 3 | 87 | 0 | 810 | 828 | 810 | ctx,param,value | [] | str | {"Assign": 2, "Expr": 2, "If": 3, "Return": 1} | 5 | 19 | 5 | ["getattr", "set", "typer.BadParameter", "ctx._modes.add", "join"] | 0 | [] | The function (_exclusive_mode) defined within the public class called public.The function start at line 810 and ends at 828. It contains 9 lines of code and it has a cyclomatic complexity of 5. It takes 3 parameters, represented as [810.0] and does not return any value. It declares 5.0 functions, and It has 5.0 functi... |
anaconda_anaconda-client | public | public | 0 | 0 | mount_subcommand.upload | def upload(ctx: typer.Context,files: typing.List[str] = typer.Argument(),channels: typing.List[str] = typer.Option([],'-c','--channel',help=label_help.format(deprecation=typer.style('(deprecated) ', fg=typer.colors.RED, bold=True),label='channel',),),labels: typing.List[str] = typer.Option([],'-l','--label',help=label_... | 8 | 147 | 2 | 718 | 0 | 845 | 1,001 | 845 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (mount_subcommand.upload) defined within the public class called public.The function start at line 845 and ends at 1001. It contains 147 lines of code and it has a cyclomatic complexity of 8. It takes 2 parameters, represented as [845.0] and does not return any value.. |
anaconda_anaconda-client | public | public | 0 | 0 | mount_subcommand | def mount_subcommand(app: typer.Typer, name: str, hidden: bool, help_text: str, context_settings: dict) -> None:label_help: str = ('{deprecation}Add this file to a specific {label}. ''Warning: if the file {label}s do not include "main", ''the file will not show up in your user {label}')@app.command(name=name,hidden=hid... | 1 | 14 | 5 | 64 | 3 | 831 | 1,001 | 831 | app,name,hidden,help_text,context_settings | ['log_level', 'mode', 'arguments'] | None | {"AnnAssign": 1, "Assign": 9, "AugAssign": 1, "Expr": 2, "If": 6} | 33 | 171 | 33 | ["typer.Argument", "typer.Option", "label_help.format", "typer.style", "typer.Option", "label_help.format", "typer.Option", "typer.Option", "typer.Option", "typer.Option", "typer.Option", "typer.Option", "typer.Option", "typer.Option", "typer.Option", "typer.Option", "typer.Option", "DEFAULT_CONFIG.get", "typer.Option"... | 0 | [] | The function (mount_subcommand) defined within the public class called public.The function start at line 831 and ends at 1001. It contains 14 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [831.0] and does not return any value. It declares 33.0 functions, and It has 33.0 f... |
anaconda_anaconda-client | public | public | 0 | 0 | main | def main(args):aserver_api = get_server_api(args.token, args.site)try:user = aserver_api.user()except errors.Unauthorized as err:logger.debug(err)logger.info('Anonymous User')return 1pprint_user(user)return None | 2 | 10 | 1 | 53 | 2 | 20 | 31 | 20 | args | ['user', 'aserver_api'] | Returns | {"Assign": 2, "Expr": 3, "Return": 2, "Try": 1} | 5 | 12 | 5 | ["get_server_api", "aserver_api.user", "logger.debug", "logger.info", "pprint_user"] | 304 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3494570_keirf_greaseweazle.src.greaseweazle.cli_py.main", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3511986_dart_archive_pub_dartlang.third_party.pystache.tests.test_commands_py.CommandsTestCase.callScript", "_.... | The function (main) defined within the public class called public.The function start at line 20 and ends at 31. It contains 10 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 5.0 functions, It has 5.0 functions called inside... |
anaconda_anaconda-client | public | public | 0 | 0 | add_parser | def add_parser(subparsers):subparser = subparsers.add_parser('whoami', help='Print the information of the current user', description=__doc__)subparser.set_defaults(main=main) | 1 | 3 | 1 | 29 | 1 | 34 | 37 | 34 | subparsers | ['subparser'] | None | {"Assign": 1, "Expr": 1} | 2 | 4 | 2 | ["subparsers.add_parser", "subparser.set_defaults"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.87136529_vladimir_csp_uwsm.uwsm.main_py.Args.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95060891_anaconda_anaconda_client.binstar_client.scripts.cli_py._add_subparser_modules"] | The function (add_parser) defined within the public class called public.The function start at line 34 and ends at 37. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 functions, It has 2.0 functions called insid... |
anaconda_anaconda-client | public | public | 0 | 0 | mount_subcommand.whoami | def whoami(ctx: typer.Context) -> None:args = argparse.Namespace(token=ctx.obj.params.get('token'),site=ctx.obj.params.get('site'),)main(args) | 1 | 6 | 1 | 48 | 0 | 53 | 58 | 53 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (mount_subcommand.whoami) defined within the public class called public.The function start at line 53 and ends at 58. It contains 6 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
anaconda_anaconda-client | public | public | 0 | 0 | mount_subcommand | def mount_subcommand(app: typer.Typer,name: str,hidden: bool,help_text: str,context_settings: Dict[str, Any],) -> None:@app.command(name=name,hidden=hidden,help=help_text,context_settings=context_settings,)def whoami(ctx: typer.Context) -> None:args = argparse.Namespace(token=ctx.obj.params.get('token'),site=ctx.obj.pa... | 1 | 14 | 5 | 57 | 1 | 40 | 58 | 40 | app,name,hidden,help_text,context_settings | ['args'] | None | {"Assign": 1, "Expr": 1} | 5 | 19 | 5 | ["argparse.Namespace", "ctx.obj.params.get", "ctx.obj.params.get", "main", "app.command"] | 0 | [] | The function (mount_subcommand) defined within the public class called public.The function start at line 40 and ends at 58. It contains 14 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [40.0] and does not return any value. It declares 5.0 functions, and It has 5.0 functio... |
anaconda_anaconda-client | public | public | 0 | 0 | transform_conda_deps | def transform_conda_deps(deps):"""Format dependencies into a common binstar format"""depends = []for dep in deps:dep = dep.strip()name_spec = dep.split(' ', 1)if len(name_spec) == 1:(name,) = name_specdepends.append({'name': name, 'specs': []})elif len(name_spec) == 2:name, spec = name_specif spec.endswith('*'):# Star ... | 9 | 29 | 1 | 223 | 6 | 21 | 57 | 21 | deps | ['name_spec', 'operator', 'spec', 'match', 'dep', 'depends'] | Returns | {"Assign": 14, "Expr": 4, "For": 1, "If": 7, "Return": 1} | 14 | 37 | 14 | ["dep.strip", "dep.split", "len", "depends.append", "len", "spec.endswith", "specs_re.match", "match.groups", "depends.append", "len", "spec.endswith", "specs_re.match", "match.groups", "depends.append"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95060891_anaconda_anaconda_client.binstar_client.inspect_package.conda_py.inspect_conda_info_dir"] | The function (transform_conda_deps) defined within the public class called public.The function start at line 21 and ends at 57. It contains 29 lines of code and it has a cyclomatic complexity of 9. The function does not take any parameters, and this function return a value. It declares 14.0 functions, It has 14.0 funct... |
anaconda_anaconda-client | public | public | 0 | 0 | get_subdir | def get_subdir(index):"""Return the sub-directory given the index dictionary.The returnvalue is obtained in the following order:1. when the 'subdir' key exists, it's value is returned2. if the 'arch' is None, or does not exist, 'noarch' is returned3. otherwise, the return value is constructed from the 'platform' key an... | 3 | 9 | 1 | 62 | 2 | 60 | 78 | 60 | index | ['arch', 'intel_map'] | Returns | {"Assign": 2, "Expr": 1, "If": 1, "Return": 3, "Try": 1} | 3 | 19 | 3 | ["index.get", "index.get", "intel_map.get"] | 5 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95060891_anaconda_anaconda_client.binstar_client.inspect_package.conda_py.inspect_conda_info_dir", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95060891_anaconda_anaconda_client.tests.test_subdir_py.TestGetSubdir.t... | The function (get_subdir) defined within the public class called public.The function start at line 60 and ends at 78. It contains 9 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters, and this function return a value. It declares 3.0 functions, It has 3.0 functions called i... |
anaconda_anaconda-client | public | public | 0 | 0 | inspect_conda_info_dir._load | def _load(filename, default=None):info_path = f'info/{filename}'if info_path in info_contents:return json.loads(info_contents[info_path])return default | 2 | 5 | 2 | 30 | 0 | 82 | 86 | 82 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (inspect_conda_info_dir._load) defined within the public class called public.The function start at line 82 and ends at 86. It contains 5 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [82.0] and does not return any value.. |
anaconda_anaconda-client | public | public | 0 | 0 | inspect_conda_info_dir | def inspect_conda_info_dir(info_contents: dict[str, bytes], basename: str) -> tuple[dict, dict, dict]:def _load(filename, default=None):info_path = f'info/{filename}'if info_path in info_contents:return json.loads(info_contents[info_path])return defaultindex = _load('index.json', None)if index is None:raise TypeError('... | 6 | 59 | 2 | 468 | 13 | 81 | 153 | 81 | info_contents,basename | ['platform', 'operatingsystem', 'subdir', 'index', 'conda_depends', 'about', 'machine', 'info_path', 'package_data', 'icon_b64', 'release_data', 'recipe', 'has_prefix'] | tuple[dict, dict, dict] | {"AnnAssign": 1, "Assign": 15, "Expr": 1, "For": 1, "If": 4, "Return": 3} | 40 | 73 | 40 | ["json.loads", "_load", "TypeError", "_load", "recipe.get", "_load", "index.get", "index.get", "index.get", "data_uri_from_bytes", "get_subdir", "index.get", "index.get", "os_map.get", "index.pop", "about.get", "about.get", "about.get", "about.get", "about.get", "about.get", "about.get", "about.get", "about.get", "inde... | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95060891_anaconda_anaconda_client.binstar_client.inspect_package.conda_py.inspect_conda_package"] | The function (inspect_conda_info_dir) defined within the public class called public.The function start at line 81 and ends at 153. It contains 59 lines of code and it has a cyclomatic complexity of 6. It takes 2 parameters, represented as [81.0] and does not return any value. It declares 40.0 functions, It has 40.0 fun... |
anaconda_anaconda-client | public | public | 0 | 0 | gather_info_dir | def gather_info_dir(path: os.PathLike,wanted: frozenset[str] = frozenset(('info/index.json','info/recipe.json','info/about.json','info/has_prefix',)),) -> dict[str, bytes]:"""Use conda-package-streaming to gather files without extracting to disk."""# based on code from conda-indexhave: dict[str, bytes] = {}seeking = se... | 6 | 29 | 2 | 188 | 5 | 156 | 192 | 156 | path,wanted | ['index_json', 'reader', 'seeking', 'wanted', 'package_stream'] | dict[str, bytes] | {"AnnAssign": 1, "Assign": 6, "Expr": 4, "For": 1, "If": 4, "Return": 1, "With": 1} | 13 | 37 | 13 | ["frozenset", "set", "open", "stream_conda_component", "seeking.remove", "tar.extractfile", "reader.read", "package_stream.close", "have.get", "json.loads", "frozenset", "have.update", "gather_info_dir"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95060891_anaconda_anaconda_client.binstar_client.inspect_package.conda_py.gather_info_dir", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95060891_anaconda_anaconda_client.binstar_client.inspect_package.conda_py.ins... | The function (gather_info_dir) defined within the public class called public.The function start at line 156 and ends at 192. It contains 29 lines of code and it has a cyclomatic complexity of 6. It takes 2 parameters, represented as [156.0] and does not return any value. It declares 13.0 functions, It has 13.0 function... |
anaconda_anaconda-client | public | public | 0 | 0 | inspect_conda_package | def inspect_conda_package(filename, *args, **kwargs):info_contents = gather_info_dir(filename)package_data, release_data, file_data = inspect_conda_info_dir(info_contents, os.path.basename(filename))return package_data, release_data, file_data | 1 | 4 | 3 | 42 | 1 | 195 | 198 | 195 | filename,*args,**kwargs | ['info_contents'] | Returns | {"Assign": 2, "Return": 1} | 3 | 4 | 3 | ["gather_info_dir", "inspect_conda_info_dir", "os.path.basename"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95060891_anaconda_anaconda_client.binstar_client.inspect_package.conda_py.main"] | The function (inspect_conda_package) defined within the public class called public.The function start at line 195 and ends at 198. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [195.0], and this function return a value. It declares 3.0 functions, It has 3.0 f... |
anaconda_anaconda-client | public | public | 0 | 0 | main | def main():filename = sys.argv[1]package_data, release_data, file_data = inspect_conda_package(filename)pprint(package_data)print('--')pprint(release_data)print('--')pprint(file_data) | 1 | 8 | 0 | 42 | 1 | 201 | 208 | 201 | ['filename'] | None | {"Assign": 2, "Expr": 5} | 6 | 8 | 6 | ["inspect_conda_package", "pprint", "print", "pprint", "print", "pprint"] | 304 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3494570_keirf_greaseweazle.src.greaseweazle.cli_py.main", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3511986_dart_archive_pub_dartlang.third_party.pystache.tests.test_commands_py.CommandsTestCase.callScript", "_.... | The function (main) defined within the public class called public.The function start at line 201 and ends at 208. It contains 8 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 6.0 functions, It has 6.0 functions called inside wh... | |
anaconda_anaconda-client | public | public | 0 | 0 | is_installer | def is_installer(filename):# NOTE: allowif not filename.endswith('.sh'):return Falsewith open(filename) as file:file.readline()cio_copyright = file.readline()# Copyright (c) 2012-2014 Continuum Analytics, Inc.# NOTE: it would be great if the installers had a unique identifier in the header# Made by CAS installerif 'CAS... | 5 | 11 | 1 | 58 | 1 | 11 | 31 | 11 | filename | ['cio_copyright'] | Returns | {"Assign": 1, "Expr": 1, "If": 3, "Return": 4, "With": 1} | 4 | 21 | 4 | ["filename.endswith", "open", "file.readline", "file.readline"] | 0 | [] | The function (is_installer) defined within the public class called public.The function start at line 11 and ends at 31. It contains 11 lines of code and it has a cyclomatic complexity of 5. The function does not take any parameters, and this function return a value. It declares 4.0 functions, and It has 4.0 functions ... |
anaconda_anaconda-client | public | public | 0 | 0 | inspect_package | def inspect_package(filename, fileobj, *args, **kwarg):line = fileobj.readline()lines = []while line.startswith('#'):if ':' in line:lines.append(line.strip(' #\n'))line = fileobj.readline()try:installer_data = yaml_load('\n'.join(lines))finally:logger.error('Could not load installer info as YAML')summary = 'Conda insta... | 4 | 30 | 4 | 160 | 10 | 34 | 68 | 34 | filename,fileobj,*args,**kwarg | ['line', 'lines', 'package_data', 'file_data', 'version', 'name', 'summary', 'release_data', 'installer_data', 'attrs'] | Returns | {"Assign": 11, "Expr": 2, "If": 1, "Return": 1, "Try": 1, "While": 1} | 12 | 35 | 12 | ["fileobj.readline", "line.startswith", "lines.append", "line.strip", "fileobj.readline", "yaml_load", "join", "logger.error", "installer_data.pop", "installer_data.pop", "installer_data.pop", "path.basename"] | 0 | [] | The function (inspect_package) defined within the public class called public.The function start at line 34 and ends at 68. It contains 30 lines of code and it has a cyclomatic complexity of 4. It takes 4 parameters, represented as [34.0], and this function return a value. It declares 12.0 functions, and It has 12.0 fu... |
anaconda_anaconda-client | EnvInspector | public | 0 | 0 | __init__ | def __init__(self, filename, fileobj):self._name = Noneself._version = Noneself.filename = filenameself.content = yaml_load(fileobj) | 1 | 5 | 3 | 32 | 0 | 9 | 13 | 9 | self,filename,fileobj | [] | None | {"Assign": 4} | 1 | 5 | 1 | ["yaml_load"] | 14,667 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.query_py.AllocationError.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.query_py.ContentError.__init__", "_... | The function (__init__) defined within the public class called EnvInspector.The function start at line 9 and ends at 13. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [9.0] and does not return any value. It declare 1.0 function, It has 1.0 function called ins... |
anaconda_anaconda-client | EnvInspector | public | 0 | 0 | basename | def basename(self):return os.path.basename(self.filename) | 1 | 2 | 1 | 16 | 0 | 16 | 17 | 16 | self | [] | Returns | {"Return": 1} | 1 | 2 | 1 | ["os.path.basename"] | 37 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3511986_dart_archive_pub_dartlang.third_party.pygments.lexers.__init___py.get_lexer_for_filename", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3511986_dart_archive_pub_dartlang.third_party.pygments.lexers.__init__... | The function (basename) defined within the public class called EnvInspector.The function start at line 16 and ends at 17. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declare 1.0 function, It has 1.0 function called ... |
anaconda_anaconda-client | EnvInspector | public | 0 | 0 | name | def name(self):if self._name is None:self._name = self.content['name']return self._name | 2 | 4 | 1 | 26 | 0 | 20 | 23 | 20 | self | [] | Returns | {"Assign": 1, "If": 1, "Return": 1} | 0 | 4 | 0 | [] | 13 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3594492_mangroveorg_mangrove.mangrove.form_model.tests.test_form_model_py.FormModelTest._create_form_model", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3594492_mangroveorg_mangrove.mangrove.form_model.tests.test_... | The function (name) defined within the public class called EnvInspector.The function start at line 20 and ends at 23. 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 has 13.0 functions calling this function which are ["... |
anaconda_anaconda-client | EnvInspector | public | 0 | 0 | get_package_data | def get_package_data(self):return {'name': self.name,'summary': 'Environment file',} | 1 | 5 | 1 | 18 | 0 | 25 | 29 | 25 | self | [] | Returns | {"Return": 1} | 0 | 5 | 0 | [] | 4 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69695072_nexb_univers.etc.scripts.utils_dejacode_py.create_dejacode_package", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69695072_nexb_univers.etc.scripts.utils_dejacode_py.fetch_and_save_about_files", "_.content... | The function (get_package_data) defined within the public class called EnvInspector.The function start at line 25 and ends at 29. It contains 5 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It has 4.0 functions calling this function w... |
anaconda_anaconda-client | EnvInspector | public | 0 | 0 | version | def version(self):if self._version is None:self._version = time.strftime('%Y.%m.%d.%H%M%S')return self._version | 2 | 4 | 1 | 26 | 0 | 32 | 36 | 32 | self | [] | Returns | {"Assign": 1, "If": 1, "Return": 1} | 1 | 5 | 1 | ["time.strftime"] | 29 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3719382_myint_rstcheck.src.rstcheck._cli_py.version_callback", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3720326_openxc_openxc_python.openxc.tools.control_py.main", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_C... | The function (version) defined within the public class called EnvInspector.The function start at line 32 and ends at 36. It contains 4 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters, and this function return a value. It declare 1.0 function, It has 1.0 function called i... |
anaconda_anaconda-client | public | public | 0 | 0 | inspect_env_package | def inspect_env_package(filename, fileobj, *args, **kwargs):environment = EnvInspector(filename, fileobj)package_data = environment.get_package_data()release_data = {'version': environment.version,'description': '',}file_data = {'basename': environment.basename,'attrs': {},}return package_data, release_data, file_data | 1 | 12 | 4 | 63 | 4 | 39 | 52 | 39 | filename,fileobj,*args,**kwargs | ['package_data', 'release_data', 'file_data', 'environment'] | Returns | {"Assign": 4, "Return": 1} | 2 | 14 | 2 | ["EnvInspector", "environment.get_package_data"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95060891_anaconda_anaconda_client.tests.inspect_package.test_env_py.InspectEnvironmentPackageTest.test_inspect_env_package"] | The function (inspect_env_package) defined within the public class called public.The function start at line 39 and ends at 52. It contains 12 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [39.0], and this function return a value. It declares 2.0 functions, It has 2.0 funct... |
anaconda_anaconda-client | public | public | 0 | 0 | inspect_ipynb_package | def inspect_ipynb_package(filename, fileobj, *args, **kwargs):notebook = nbformat.read(fileobj, nbformat.NO_CONVERT)summary = notebook.get('metadata', {}).get('summary', 'Jupyter Notebook')description = notebook.get('metadata', {}).get('description', 'Jupyter Notebook')package_data = {'name': re.sub('\\-ipynb$', '', pa... | 3 | 21 | 4 | 173 | 6 | 13 | 38 | 13 | filename,fileobj,*args,**kwargs | ['description', 'package_data', 'notebook', 'file_data', 'summary', 'release_data'] | Returns | {"Assign": 7, "If": 1, "Return": 1} | 12 | 26 | 12 | ["nbformat.read", "get", "notebook.get", "get", "notebook.get", "re.sub", "parameterize", "os.path.basename", "data_uri_from", "strftime", "datetime.now", "os.path.basename"] | 0 | [] | The function (inspect_ipynb_package) defined within the public class called public.The function start at line 13 and ends at 38. It contains 21 lines of code and it has a cyclomatic complexity of 3. It takes 4 parameters, represented as [13.0], and this function return a value. It declares 12.0 functions, and It has 1... |
anaconda_anaconda-client | public | public | 0 | 0 | sort_ver | def sort_ver(item):return item[1] | 1 | 2 | 1 | 10 | 0 | 18 | 19 | 18 | item | [] | Returns | {"Return": 1} | 0 | 2 | 0 | [] | 0 | [] | The function (sort_ver) defined within the public class called public.The function start at line 18 and ends at 19. 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.. |
anaconda_anaconda-client | public | public | 0 | 0 | sort_key | def sort_key(item):return item['name'] | 1 | 2 | 1 | 10 | 0 | 22 | 23 | 22 | item | [] | Returns | {"Return": 1} | 0 | 2 | 0 | [] | 0 | [] | The function (sort_key) defined within the public class called public.The function start at line 22 and ends at 23. 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.. |
anaconda_anaconda-client | public | public | 0 | 0 | norm_package_name | def norm_package_name(name):return name.replace('.', '-').replace('_', '-').lower() if name else '' | 2 | 2 | 1 | 29 | 0 | 45 | 46 | 45 | name | [] | Returns | {"Return": 1} | 3 | 2 | 3 | ["lower", "replace", "name.replace"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95060891_anaconda_anaconda_client.binstar_client.inspect_package.pypi_py.format_sdist_header_metadata"] | The function (norm_package_name) defined within the public class called public.The function start at line 45 and ends at 46. It contains 2 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters, and this function return a value. It declares 3.0 functions, It has 3.0 functions c... |
anaconda_anaconda-client | public | public | 0 | 0 | norm_package_version | def norm_package_version(version):"""Normalize a version by removing extra spaces and parentheses."""if version:version = ''.join(version.split())if version.startswith('(') and version.endswith(')'):version = version[1:-1]else:version = ''return version | 4 | 8 | 1 | 52 | 1 | 49 | 58 | 49 | version | ['version'] | Returns | {"Assign": 3, "Expr": 1, "If": 2, "Return": 1} | 4 | 10 | 4 | ["join", "version.split", "version.startswith", "version.endswith"] | 0 | [] | The function (norm_package_version) defined within the public class called public.The function start at line 49 and ends at 58. It contains 8 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters, and this function return a value. It declares 4.0 functions, and It has 4.0 fun... |
anaconda_anaconda-client | public | public | 0 | 0 | split_spec | def split_spec(spec, sep):"""Split a spec by separator and return stripped start and end parts."""parts = spec.rsplit(sep, 1)spec_start = parts[0].strip()spec_end = ''if len(parts) == 2:spec_end = parts[-1].strip()return spec_start, spec_end | 2 | 7 | 2 | 54 | 3 | 61 | 68 | 61 | spec,sep | ['parts', 'spec_end', 'spec_start'] | Returns | {"Assign": 4, "Expr": 1, "If": 1, "Return": 1} | 4 | 8 | 4 | ["spec.rsplit", "strip", "len", "strip"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95060891_anaconda_anaconda_client.binstar_client.inspect_package.pypi_py.parse_specification"] | The function (split_spec) defined within the public class called public.The function start at line 61 and ends at 68. It contains 7 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [61.0], and this function return a value. It declares 4.0 functions, It has 4.0 functions calle... |
anaconda_anaconda-client | public | public | 0 | 0 | parse_specification | def parse_specification(spec):"""Parse a requirement from a python distribution metadata and return atuple with name, extras, constraints, marker and url components.This method does not enforce strict specifications but extracts theinformation which is assumed to be *correct*. As such no errors are raised.Example------... | 11 | 15 | 1 | 178 | 5 | 71 | 113 | 71 | spec | ['r', 'extras', 'const', 'spec', 'name'] | Returns | {"Assign": 11, "Expr": 1, "If": 2, "Return": 1} | 16 | 43 | 16 | ["strip", "join", "spec.split", "split_spec", "split_spec", "PARTIAL_PYPI_SPEC_PATTERN.match", "r.group", "r.group", "extra.strip", "extras.split", "r.group", "strip", "join", "const.split", "const.startswith", "const.endswith"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95060891_anaconda_anaconda_client.binstar_client.inspect_package.pypi_py.format_sdist_header_metadata"] | The function (parse_specification) defined within the public class called public.The function start at line 71 and ends at 113. It contains 15 lines of code and it has a cyclomatic complexity of 11. The function does not take any parameters, and this function return a value. It declares 16.0 functions, It has 16.0 func... |
anaconda_anaconda-client | public | public | 0 | 0 | get_header_description | def get_header_description(filedata):"""Get description from metadata file and remove any empty lines at end."""python_version = sys.version_info.majorif python_version == 3:filedata = Parser().parsestr(filedata)else:filedata = Parser().parsestr(filedata.encode('UTF-8', 'replace'))payload = filedata.get_payload()lines ... | 5 | 14 | 1 | 91 | 4 | 116 | 131 | 116 | filedata | ['filedata', 'lines', 'payload', 'python_version'] | Returns | {"Assign": 5, "Expr": 2, "If": 2, "Return": 1, "While": 1} | 9 | 16 | 9 | ["parsestr", "Parser", "parsestr", "Parser", "filedata.encode", "filedata.get_payload", "payload.split", "lines.pop", "join"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95060891_anaconda_anaconda_client.binstar_client.inspect_package.pypi_py.format_sdist_header_metadata"] | The function (get_header_description) defined within the public class called public.The function start at line 116 and ends at 131. It contains 14 lines of code and it has a cyclomatic complexity of 5. The function does not take any parameters, and this function return a value. It declares 9.0 functions, It has 9.0 fun... |
anaconda_anaconda-client | public | public | 0 | 0 | python_version_check | def python_version_check(filedata):python_version = sys.version_info.majorif python_version == 3:filedata = Parser().parsestr(filedata).items()else:filedata = Parser().parsestr(filedata.encode('UTF-8', 'replace')).items()return filedata | 2 | 7 | 1 | 56 | 2 | 136 | 144 | 136 | filedata | ['filedata', 'python_version'] | Returns | {"Assign": 3, "If": 1, "Return": 1} | 7 | 9 | 7 | ["items", "parsestr", "Parser", "items", "parsestr", "Parser", "filedata.encode"] | 3 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95060891_anaconda_anaconda_client.binstar_client.inspect_package.pypi_py.format_sdist_header_metadata", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95060891_anaconda_anaconda_client.binstar_client.inspect_package.... | The function (python_version_check) defined within the public class called public.The function start at line 136 and ends at 144. It contains 7 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 7.0 functions, It has 7.0 functi... |
anaconda_anaconda-client | public | public | 0 | 0 | parse_requirement | def parse_requirement(line, deps, extras, extra):parsed_req = Requirement(line)name = parsed_req.name.lower()specs = sorted(((spec.operator, spec.version) for spec in parsed_req.specifier),key=sort_ver,)if extra:extras[extra].append({'name': name, 'specs': specs})else:deps.append({'name': name, 'specs': specs})deps.sor... | 4 | 14 | 4 | 114 | 3 | 147 | 162 | 147 | line,deps,extras,extra | ['specs', 'parsed_req', 'name'] | None | {"Assign": 3, "Expr": 4, "For": 1, "If": 1} | 8 | 16 | 8 | ["Requirement", "parsed_req.name.lower", "sorted", "append", "deps.append", "deps.sort", "extras.values", "extra_item.sort"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95060891_anaconda_anaconda_client.binstar_client.inspect_package.pypi_py.parse_requires_txt"] | The function (parse_requirement) defined within the public class called public.The function start at line 147 and ends at 162. It contains 14 lines of code and it has a cyclomatic complexity of 4. It takes 4 parameters, represented as [147.0] and does not return any value. It declares 8.0 functions, It has 8.0 function... |
anaconda_anaconda-client | public | public | 0 | 0 | parse_requires_txt | def parse_requires_txt(requires_txt):deps = []error = Falseextras = {}extra = Nonefor line in requires_txt.split('\n'):line = line.strip()if not line:continueif line.startswith('[') and line.endswith(']'):extra = line[1:-1]extras.setdefault(extra, [])# Dont parse this requirementcontinuetry:parse_requirement(line, deps... | 7 | 29 | 1 | 153 | 5 | 165 | 199 | 165 | requires_txt | ['line', 'extra', 'deps', 'extras', 'error'] | Returns | {"Assign": 8, "Expr": 2, "For": 1, "If": 2, "Return": 1, "Try": 1} | 10 | 35 | 10 | ["requires_txt.split", "line.strip", "line.startswith", "line.endswith", "extras.setdefault", "parse_requirement", "sorted", "extras.items", "sorted", "sorted"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95060891_anaconda_anaconda_client.binstar_client.inspect_package.pypi_py.inspect_pypi_package_egg", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95060891_anaconda_anaconda_client.binstar_client.inspect_package.pypi... | The function (parse_requires_txt) defined within the public class called public.The function start at line 165 and ends at 199. It contains 29 lines of code and it has a cyclomatic complexity of 7. The function does not take any parameters, and this function return a value. It declares 10.0 functions, It has 10.0 funct... |
anaconda_anaconda-client | public | public | 0 | 0 | format_requirements | def format_requirements(requires):obj = []for req in requires:parsed_req = Requirement(req)name = parsed_req.name.lower()specs = sorted(((spec.operator, spec.version) for spec in parsed_req.specifier),key=sort_ver,)obj.append({'name': name,'specs': specs,})return obj | 3 | 16 | 1 | 73 | 4 | 202 | 217 | 202 | requires | ['obj', 'parsed_req', 'specs', 'name'] | Returns | {"Assign": 4, "Expr": 1, "For": 1, "Return": 1} | 4 | 16 | 4 | ["Requirement", "parsed_req.name.lower", "sorted", "obj.append"] | 3 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95060891_anaconda_anaconda_client.binstar_client.inspect_package.pypi_py.disutils_dependencies", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95060891_anaconda_anaconda_client.binstar_client.inspect_package.pypi_py... | The function (format_requirements) defined within the public class called public.The function start at line 202 and ends at 217. It contains 16 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 4.0 functions, It has 4.0 functi... |
anaconda_anaconda-client | public | public | 0 | 0 | format_run_requires_metadata | def format_run_requires_metadata(run_requires):deps = []extras = []environments = []for run_require in run_requires:extra = run_require.get('extra')env = run_require.get('environment')requires = run_require['requires']if env:obj = []environments.append({'name': env, 'depends': obj})elif extra is None:obj = depselse:obj... | 5 | 29 | 1 | 167 | 8 | 220 | 253 | 220 | run_requires | ['env', 'extra', 'obj', 'deps', 'extras', 'environments', 'attrs', 'requires'] | Returns | {"Assign": 10, "Expr": 7, "For": 2, "If": 2, "Return": 1} | 11 | 34 | 11 | ["run_require.get", "run_require.get", "environments.append", "extras.append", "obj.extend", "format_requirements", "print", "deps.sort", "extras.sort", "sort", "sorted"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95060891_anaconda_anaconda_client.binstar_client.inspect_package.pypi_py.format_wheel_json_metadata"] | The function (format_run_requires_metadata) defined within the public class called public.The function start at line 220 and ends at 253. It contains 29 lines of code and it has a cyclomatic complexity of 5. The function does not take any parameters, and this function return a value. It declares 11.0 functions, It has ... |
anaconda_anaconda-client | public | public | 0 | 0 | format_requires_metadata | def format_requires_metadata(run_requires):deps = []extras = []extras_re = re.compile('extra == [\'\'](.*)[\'\']')has_dep_errors = Falseif not isinstance(run_requires, dict):has_dep_errors = Truerun_requires = {}for key, requirements in run_requires.items():is_extra = extras_re.match(key)if is_extra:extra = is_extra.gr... | 5 | 26 | 1 | 132 | 9 | 256 | 288 | 256 | run_requires | ['has_dep_errors', 'extra', 'run_requires', 'obj', 'deps', 'extras', 'extras_re', 'is_extra', 'attrs'] | Returns | {"Assign": 12, "Expr": 2, "For": 1, "If": 3, "Return": 1} | 8 | 33 | 8 | ["re.compile", "isinstance", "run_requires.items", "extras_re.match", "is_extra.groups", "extras.append", "obj.extend", "format_requirements"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95060891_anaconda_anaconda_client.binstar_client.inspect_package.pypi_py.format_wheel_json_metadata"] | The function (format_requires_metadata) defined within the public class called public.The function start at line 256 and ends at 288. It contains 26 lines of code and it has a cyclomatic complexity of 5. The function does not take any parameters, and this function return a value. It declares 8.0 functions, It has 8.0 f... |
anaconda_anaconda-client | public | public | 0 | 0 | format_sdist_header_metadata | def format_sdist_header_metadata(data, filename):"""Format the metadata of Standard Python packages stored in email header format.Currently only used as backup on the wheel (compressed) file format."""description = get_header_description(data)config_items = python_version_check(data)attrs = dict(config_items)name = pop... | 16 | 79 | 2 | 554 | 18 | 291 | 389 | 291 | data,filename | ['specs', 'new_environments', 'new_exts', 'pos', 'config_items', 'basename', 'deps', 'description', 'package_data', 'environments', 'file_data', 'exts', 'marker', 'name', 'ext', 'attrs', 'release_data', 'new_specs'] | Returns | {"Assign": 27, "Expr": 9, "For": 4, "If": 8, "Return": 1} | 34 | 99 | 34 | ["get_header_description", "python_version_check", "dict", "pop_key", "path.basename", "basename.split", "pop_key", "pop_key", "pop_key", "pop_key", "pop_key", "parse_specification", "norm_package_name", "const.split", "enumerate", "strip", "strip", "new_specs.append", "marker.startswith", "marker.replace", "strip", "m... | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95060891_anaconda_anaconda_client.binstar_client.inspect_package.pypi_py.inspect_pypi_package_whl"] | The function (format_sdist_header_metadata) defined within the public class called public.The function start at line 291 and ends at 389. It contains 79 lines of code and it has a cyclomatic complexity of 16. It takes 2 parameters, represented as [291.0], and this function return a value. It declares 34.0 functions, It... |
anaconda_anaconda-client | public | public | 0 | 0 | format_wheel_json_metadata | def format_wheel_json_metadata(data, filename, zip_file):package_data = {'name': pop_key(data, 'name'),'summary': pop_key(data, 'summary', None),'license': pop_key(data, 'license', None),}description_doc = (data.get('document_names') or {}).get('description')# Metadata version 2.0if not description_doc:description_doc ... | 7 | 44 | 3 | 297 | 8 | 392 | 444 | 392 | data,filename,zip_file | ['description', 'package_data', 'dependencies', 'file_data', 'description_doc', 'home_page', 'attrs', 'release_data'] | Returns | {"Assign": 12, "If": 4, "Return": 1} | 24 | 53 | 24 | ["pop_key", "pop_key", "pop_key", "get", "data.get", "get", "get", "get", "data.get", "strip", "extract_first", "get", "data.get", "get", "get", "get", "data.get", "pop_key", "data.items", "data.get", "format_run_requires_metadata", "format_requires_metadata", "data.get", "path.basename"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95060891_anaconda_anaconda_client.binstar_client.inspect_package.pypi_py.inspect_pypi_package_whl"] | The function (format_wheel_json_metadata) defined within the public class called public.The function start at line 392 and ends at 444. It contains 44 lines of code and it has a cyclomatic complexity of 7. It takes 3 parameters, represented as [392.0], and this function return a value. It declares 24.0 functions, It ha... |
anaconda_anaconda-client | public | public | 0 | 0 | inspect_pypi_package_whl | def inspect_pypi_package_whl(filename, fileobj):tar_file = zipfile.ZipFile(fileobj)json_data = extract_first(tar_file, '*.dist-info/metadata.json')if json_data is None:json_data = extract_first(tar_file, '*.dist-info/pydist.json')# Metadata 2.1 removed metatada.json. Using good old distutils as fallbackdata = Nonedata ... | 8 | 35 | 2 | 233 | 8 | 447 | 493 | 447 | filename,fileobj | ['file_components', 'json_data', 'abi', 'filename', 'build_no', 'platform', 'tar_file', 'data'] | Returns | {"Assign": 16, "Expr": 2, "If": 7, "Return": 1} | 14 | 47 | 14 | ["zipfile.ZipFile", "extract_first", "extract_first", "extract_first", "format_wheel_json_metadata", "json.loads", "format_sdist_header_metadata", "path.basename", "split", "len", "len", "TypeError", "file_data.setdefault", "file_data.update"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95060891_anaconda_anaconda_client.binstar_client.inspect_package.pypi_py.inspect_pypi_package"] | The function (inspect_pypi_package_whl) defined within the public class called public.The function start at line 447 and ends at 493. It contains 35 lines of code and it has a cyclomatic complexity of 8. It takes 2 parameters, represented as [447.0], and this function return a value. It declares 14.0 functions, It has ... |
anaconda_anaconda-client | public | public | 0 | 0 | disutils_dependencies | def disutils_dependencies(config_items):# NOTE: This is not handling environment markers or extras!requirements = [value for key, value in config_items if key in ['Requires-Dist', 'Requires']]depends = format_requirements(requirements)return {'depends': depends,'extras': [],'has_dep_errors': False,} | 3 | 8 | 1 | 46 | 2 | 496 | 505 | 496 | config_items | ['requirements', 'depends'] | Returns | {"Assign": 2, "Return": 1} | 1 | 10 | 1 | ["format_requirements"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95060891_anaconda_anaconda_client.binstar_client.inspect_package.pypi_py.inspect_pypi_package_sdist"] | The function (disutils_dependencies) defined within the public class called public.The function start at line 496 and ends at 505. It contains 8 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters, and this function return a value. It declare 1.0 function, It has 1.0 functio... |
anaconda_anaconda-client | public | public | 0 | 0 | inspect_pypi_package_sdist | def inspect_pypi_package_sdist(filename, fileobj):tar_file = tarfile.open(filename, fileobj=fileobj)data = extract_first(tar_file, '*.egg-info/PKG-INFO')distribute = Falseif data is None:data = extract_first(tar_file, '*/PKG-INFO')distribute = Trueif data is None:raise errors.NoMetadataError('Could not find *.egg-info/... | 6 | 40 | 2 | 246 | 11 | 508 | 556 | 508 | filename,fileobj | ['requires_txt', 'distribute', 'config_items', 'basename', 'package_data', 'file_data', 'name', 'tar_file', 'attrs', 'release_data', 'data'] | Returns | {"Assign": 14, "Expr": 2, "If": 5, "Return": 1} | 21 | 49 | 21 | ["tarfile.open", "extract_first", "extract_first", "errors.NoMetadataError", "format", "python_version_check", "dict", "pop_key", "path.basename", "basename.split", "pop_key", "pop_key", "pop_key", "pop_key", "pop_key", "path.basename", "file_data.update", "disutils_dependencies", "extract_first", "file_data.update", "... | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95060891_anaconda_anaconda_client.binstar_client.inspect_package.pypi_py.inspect_pypi_package"] | The function (inspect_pypi_package_sdist) defined within the public class called public.The function start at line 508 and ends at 556. It contains 40 lines of code and it has a cyclomatic complexity of 6. It takes 2 parameters, represented as [508.0], and this function return a value. It declares 21.0 functions, It ha... |
anaconda_anaconda-client | public | public | 0 | 0 | inspect_pypi_package_egg | def inspect_pypi_package_egg(filename, fileobj):tar_file = zipfile.ZipFile(fileobj)data = extract_first(tar_file, 'EGG-INFO/PKG-INFO')if data is None:raise errors.NoMetadataError('Could not find EGG-INFO/PKG-INFO file in {} sdist'.format(PackageType.STANDARD_PYTHON.label))attrs = dict(python_version_check(data))package... | 4 | 33 | 2 | 228 | 10 | 559 | 598 | 559 | filename,fileobj | ['python_version', 'requires_txt', 'basename', 'package_data', 'file_data', 'platform', 'tar_file', 'attrs', 'release_data', 'data'] | Returns | {"Assign": 11, "Expr": 1, "If": 3, "Return": 1} | 20 | 40 | 20 | ["zipfile.ZipFile", "extract_first", "errors.NoMetadataError", "format", "dict", "python_version_check", "pop_key", "pop_key", "pop_key", "pop_key", "pop_key", "pop_key", "path.basename", "len", "basename.split", "split", "path.basename", "extract_first", "file_data.update", "parse_requires_txt"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95060891_anaconda_anaconda_client.binstar_client.inspect_package.pypi_py.inspect_pypi_package"] | The function (inspect_pypi_package_egg) defined within the public class called public.The function start at line 559 and ends at 598. It contains 33 lines of code and it has a cyclomatic complexity of 4. It takes 2 parameters, represented as [559.0], and this function return a value. It declares 20.0 functions, It has ... |
anaconda_anaconda-client | public | public | 0 | 0 | inspect_pypi_package_zip | def inspect_pypi_package_zip(filename, fileobj):tar_file = zipfile.ZipFile(fileobj)data = extract_first(tar_file, '*/PKG-INFO')if data is None:raise errors.NoMetadataError('Could not find EGG-INFO/PKG-INFO file in {} sdist'.format(PackageType.STANDARD_PYTHON.label))attrs = dict(Parser().parsestr(data.encode('UTF-8', 'r... | 2 | 20 | 2 | 168 | 6 | 601 | 626 | 601 | filename,fileobj | ['package_data', 'file_data', 'tar_file', 'attrs', 'release_data', 'data'] | Returns | {"Assign": 6, "If": 1, "Return": 1} | 16 | 26 | 16 | ["zipfile.ZipFile", "extract_first", "errors.NoMetadataError", "format", "dict", "items", "parsestr", "Parser", "data.encode", "pop_key", "pop_key", "pop_key", "pop_key", "pop_key", "pop_key", "path.basename"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95060891_anaconda_anaconda_client.binstar_client.inspect_package.pypi_py.inspect_pypi_package"] | The function (inspect_pypi_package_zip) defined within the public class called public.The function start at line 601 and ends at 626. It contains 20 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [601.0], and this function return a value. It declares 16.0 functions, It has ... |
anaconda_anaconda-client | public | public | 0 | 0 | inspect_pypi_package_exe | def inspect_pypi_package_exe(filename):# ipython-0.12.1.win-amd64.exename_version, windist = filename[:-4].rsplit('.', 1)name, version = name_version.split('-', 1)package_data = {'name': name}release_data = {'version': version}file_data = {'attrs': {'packagetype': 'bdist_wininst', 'python_version': 'source', 'windist':... | 1 | 10 | 1 | 83 | 3 | 629 | 643 | 629 | filename | ['package_data', 'file_data', 'release_data'] | Returns | {"Assign": 5, "Return": 1} | 3 | 15 | 3 | ["rsplit", "name_version.split", "path.basename"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95060891_anaconda_anaconda_client.binstar_client.inspect_package.pypi_py.inspect_pypi_package"] | The function (inspect_pypi_package_exe) defined within the public class called public.The function start at line 629 and ends at 643. It contains 10 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declares 3.0 functions, It has 3.0 f... |
anaconda_anaconda-client | public | public | 0 | 0 | inspect_pypi_package_rpm | def inspect_pypi_package_rpm(filename):# ipython-0.12.1.win-amd64.exename_version, rpmarch = filename[:-4].rsplit('.', 1)name, version, python_version = name_version.split('-', 2)package_data = {'name': name}release_data = {'version': version}file_data = {'attrs': {'packagetype': 'bdist_rpm', 'python_version': python_v... | 1 | 10 | 1 | 85 | 3 | 646 | 660 | 646 | filename | ['package_data', 'file_data', 'release_data'] | Returns | {"Assign": 5, "Return": 1} | 3 | 15 | 3 | ["rsplit", "name_version.split", "path.basename"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95060891_anaconda_anaconda_client.binstar_client.inspect_package.pypi_py.inspect_pypi_package"] | The function (inspect_pypi_package_rpm) defined within the public class called public.The function start at line 646 and ends at 660. It contains 10 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declares 3.0 functions, It has 3.0 f... |
anaconda_anaconda-client | public | public | 0 | 0 | inspect_pypi_package | def inspect_pypi_package(filename, fileobj, *args, **kwargs):if filename.endswith('.tar.gz') or filename.endswith('.tar.bz2'):return inspect_pypi_package_sdist(filename, fileobj)if filename.endswith('.whl'):return inspect_pypi_package_whl(filename, fileobj)if filename.endswith('.egg'):return inspect_pypi_package_egg(fi... | 8 | 17 | 4 | 132 | 0 | 663 | 680 | 663 | filename,fileobj,*args,**kwargs | [] | Returns | {"Assign": 1, "If": 6, "Return": 6} | 16 | 18 | 16 | ["filename.endswith", "filename.endswith", "inspect_pypi_package_sdist", "filename.endswith", "inspect_pypi_package_whl", "filename.endswith", "inspect_pypi_package_egg", "filename.endswith", "inspect_pypi_package_zip", "filename.endswith", "inspect_pypi_package_exe", "filename.endswith", "inspect_pypi_package_rpm", "p... | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95060891_anaconda_anaconda_client.binstar_client.inspect_package.pypi_py.main"] | The function (inspect_pypi_package) defined within the public class called public.The function start at line 663 and ends at 680. It contains 17 lines of code and it has a cyclomatic complexity of 8. It takes 4 parameters, represented as [663.0], and this function return a value. It declares 16.0 functions, It has 16.0... |
anaconda_anaconda-client | public | public | 0 | 0 | main | def main():from pprint import pprintfilename = sys.argv[1]if filename.startswith('https://') or filename.startswith('http://'):import ioimport requestsdata = requests.get(filename, stream=True, timeout=10 * 60 * 60).raw.read()fileobj = io.BytesIO(data)else:fileobj = open(filename)package_data, release_data, file_data =... | 3 | 16 | 0 | 109 | 3 | 688 | 707 | 688 | ['filename', 'data', 'fileobj'] | None | {"Assign": 5, "Expr": 5, "If": 1} | 12 | 20 | 12 | ["filename.startswith", "filename.startswith", "raw.read", "requests.get", "io.BytesIO", "open", "inspect_pypi_package", "pprint", "print", "pprint", "print", "pprint"] | 304 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3494570_keirf_greaseweazle.src.greaseweazle.cli_py.main", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3511986_dart_archive_pub_dartlang.third_party.pystache.tests.test_commands_py.CommandsTestCase.callScript", "_.... | The function (main) defined within the public class called public.The function start at line 688 and ends at 707. It contains 16 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value. It declares 12.0 functions, It has 12.0 functions called inside... | |
anaconda_anaconda-client | public | public | 0 | 0 | parse_package_list | def parse_package_list(package_spec):if not package_spec:return []return [spec.strip() for spec in package_spec.split(',')] | 3 | 4 | 1 | 29 | 0 | 9 | 13 | 9 | package_spec | [] | Returns | {"If": 1, "Return": 2} | 2 | 5 | 2 | ["spec.strip", "package_spec.split"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95060891_anaconda_anaconda_client.binstar_client.inspect_package.r_py.inspect_r_package"] | The function (parse_package_list) defined within the public class called public.The function start at line 9 and ends at 13. It contains 4 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters, and this function return a value. It declares 2.0 functions, It has 2.0 functions c... |
anaconda_anaconda-client | public | public | 0 | 0 | inspect_r_package | def inspect_r_package(filename, fileobj, *args, **kwargs):with tarfile.open(filename, fileobj=fileobj) as tar_file:pkg_info = next(name for name in tar_file.getnames() if name.endswith('/DESCRIPTION'))tar_file_descriptor = tar_file.extractfile(pkg_info)raw_attrs = dict(Parser().parse(tar_file_descriptor).items())name =... | 4 | 37 | 4 | 278 | 14 | 16 | 58 | 16 | filename,fileobj,*args,**kwargs | ['_license', 'r_version', 'built', 'pkg_info', 'description', 'package_data', 'file_data', 'version', 'name', 'attrs', 'tar_file_descriptor', 'summary', 'release_data', 'raw_attrs'] | Returns | {"Assign": 22, "If": 1, "Return": 1, "With": 1} | 24 | 43 | 24 | ["tarfile.open", "next", "tar_file.getnames", "name.endswith", "tar_file.extractfile", "dict", "items", "parse", "Parser", "raw_attrs.pop", "raw_attrs.pop", "raw_attrs.pop", "raw_attrs.pop", "raw_attrs.pop", "raw_attrs.get", "parse_package_list", "raw_attrs.get", "parse_package_list", "raw_attrs.get", "raw_attrs.get", ... | 0 | [] | The function (inspect_r_package) defined within the public class called public.The function start at line 16 and ends at 58. It contains 37 lines of code and it has a cyclomatic complexity of 4. It takes 4 parameters, represented as [16.0], and this function return a value. It declares 24.0 functions, and It has 24.0 ... |
anaconda_anaconda-client | public | public | 0 | 0 | extract_first | def extract_first(fileobj, pat):if isinstance(fileobj, ZipFile):return zipfile_match_and_extract(fileobj, pat)if isinstance(fileobj, TarFile):return tarfile_match_and_extract(fileobj, pat)raise TypeError('Don\'t know how to extract %s file type' % type(fileobj),) | 3 | 8 | 2 | 48 | 0 | 8 | 17 | 8 | fileobj,pat | [] | Returns | {"If": 2, "Return": 2} | 6 | 10 | 6 | ["isinstance", "zipfile_match_and_extract", "isinstance", "tarfile_match_and_extract", "TypeError", "type"] | 9 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3696057_scrapy_parsel.tests.test_selector_py.TestSelector.test_extract_first", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3696057_scrapy_parsel.tests.test_selector_py.TestSelector.test_extract_first_default", "_.... | The function (extract_first) defined within the public class called public.The function start at line 8 and ends at 17. It contains 8 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [8.0], and this function return a value. It declares 6.0 functions, It has 6.0 functions call... |
anaconda_anaconda-client | public | public | 0 | 0 | zipfile_match_and_extract | def zipfile_match_and_extract(zip_file, pat):item_name = next((info.filename for info in zip_file.infolist() if fnmatch(info.filename, pat)), None)if item_name is None:return Nonereturn zip_file.read(item_name).decode(errors='ignore') | 4 | 5 | 2 | 57 | 1 | 20 | 24 | 20 | zip_file,pat | ['item_name'] | Returns | {"Assign": 1, "If": 1, "Return": 2} | 5 | 5 | 5 | ["next", "zip_file.infolist", "fnmatch", "decode", "zip_file.read"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95060891_anaconda_anaconda_client.binstar_client.inspect_package.uitls_py.extract_first"] | The function (zipfile_match_and_extract) defined within the public class called public.The function start at line 20 and ends at 24. It contains 5 lines of code and it has a cyclomatic complexity of 4. It takes 2 parameters, represented as [20.0], and this function return a value. It declares 5.0 functions, It has 5.0 ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.