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
Sema4AI_actions
Versions
public
1
1
__lt__
def __lt__(self, other):return self.version < other.version
1
2
2
15
0
36
37
36
self,other
[]
None
{}
0
2
0
[]
0
[]
The function (__lt__) defined within the public class called Versions, implement an interface, and it inherit another class.The function start at line 36 and ends at 37. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [36.0] and does not return any value..
Sema4AI_actions
IPackageData
public
1
1
add_release
def add_release(self, version_str: VersionStr, release_info: list[dict]) -> None:"""Args:version_str: The version we have info on.release_info: For each release we may have a list of files available."""
1
1
3
19
0
62
67
62
self,version_str,release_info
[]
None
{"Expr": 1}
0
6
0
[]
2
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94655678_flathub_infra_flatpak_external_data_checker.src.lib.appdata_py.add_release_to_file", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94655678_flathub_infra_flatpak_external_data_checker.tests.test_appdata_py....
The function (add_release) defined within the public class called IPackageData, implement an interface, and it inherit another class.The function start at line 62 and ends at 67. It contains 1 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [62.0] and does not return any val...
Sema4AI_actions
IPackageData
public
1
1
latest_version
def latest_version(self) -> VersionStr:pass
1
2
1
8
0
70
71
70
self
[]
VersionStr
{}
0
2
0
[]
0
[]
The function (latest_version) defined within the public class called IPackageData, implement an interface, and it inherit another class.The function start at line 70 and ends at 71. 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 val...
Sema4AI_actions
IPackageData
public
1
1
get_last_release_data
def get_last_release_data(self) -> ReleaseData | None:pass
1
2
1
10
0
73
74
73
self
[]
ReleaseData | None
{}
0
2
0
[]
0
[]
The function (get_last_release_data) defined within the public class called IPackageData, implement an interface, and it inherit another class.The function start at line 73 and ends at 74. 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 ...
Sema4AI_actions
IPackageData
public
1
1
iter_versions_released_after
def iter_versions_released_after(self, after_datetime: datetime.datetime) -> Iterator[ReleaseData]:pass
1
4
2
17
0
76
79
76
self,after_datetime
[]
Iterator[ReleaseData]
{}
0
4
0
[]
0
[]
The function (iter_versions_released_after) defined within the public class called IPackageData, implement an interface, and it inherit another class.The function start at line 76 and ends at 79. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [76.0] and does n...
Sema4AI_actions
IPackageData
public
1
1
iter_versions_newer_than
def iter_versions_newer_than(self, version: Versions) -> Iterator[ReleaseData]:pass
1
2
2
15
0
81
82
81
self,version
[]
Iterator[ReleaseData]
{}
0
2
0
[]
0
[]
The function (iter_versions_newer_than) defined within the public class called IPackageData, implement an interface, and it inherit another class.The function start at line 81 and ends at 82. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [81.0] and does not r...
Sema4AI_actions
IPackageData
public
1
1
info
def info(self):pass
1
2
1
6
0
85
86
85
self
[]
None
{}
0
2
0
[]
207
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3575929_ministryofjustice_bootstrap_cfn.bootstrap_cfn.autoscale_py.Autoscale.set_autoscaling_desired_capacity", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3575929_ministryofjustice_bootstrap_cfn.bootstrap_cfn.aut...
The function (info) defined within the public class called IPackageData, implement an interface, and it inherit another class.The function start at line 85 and ends at 86. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It has...
Sema4AI_actions
IPackageData
public
1
1
get_release_data
def get_release_data(self, version: VersionStr) -> ReleaseData | None:pass
1
2
2
14
0
88
89
88
self,version
[]
ReleaseData | None
{}
0
2
0
[]
0
[]
The function (get_release_data) defined within the public class called IPackageData, implement an interface, and it inherit another class.The function start at line 88 and ends at 89. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [88.0] and does not return an...
Sema4AI_actions
IPyPiCloud
public
1
1
get_package_data
def get_package_data(self, package_name: str) -> IPackageData | None:pass
1
2
2
14
0
93
94
93
self,package_name
[]
IPackageData | None
{}
0
2
0
[]
4
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95147348_aboutcode_org_python_inspector.etc.scripts.utils_dejacode_py.create_dejacode_package", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95147348_aboutcode_org_python_inspector.etc.scripts.utils_dejacode_py.fet...
The function (get_package_data) defined within the public class called IPyPiCloud, implement an interface, and it inherit another class.The function start at line 93 and ends at 94. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [93.0] and does not return any ...
Sema4AI_actions
IPyPiCloud
public
1
1
get_versions_newer_than
def get_versions_newer_than(self, package_name: str, version: Versions | VersionStr) -> list[VersionStr]:"""Args:package_name: The name of the packageversion: The minimum version (versions returned must be > than this one).Returns:A sorted list containing the versions > than the one passed (the lastentry is the latest ...
1
3
3
21
0
96
107
96
self,package_name,version
[]
list[VersionStr]
{"Expr": 1}
0
12
0
[]
0
[]
The function (get_versions_newer_than) defined within the public class called IPyPiCloud, implement an interface, and it inherit another class.The function start at line 96 and ends at 107. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [96.0] and does not ret...
Sema4AI_actions
ISqliteQueries
public
1
1
db_cursors
def db_cursors(self, db_cursor: Sequence[Cursor] | None = None) -> Iterator[Sequence[Cursor]]:pass
1
4
2
25
0
136
139
136
self,db_cursor
[]
Iterator[Sequence[Cursor]]
{}
0
4
0
[]
0
[]
The function (db_cursors) defined within the public class called ISqliteQueries, implement an interface, and it inherit another class.The function start at line 136 and ends at 139. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [136.0] and does not return any...
Sema4AI_actions
ISqliteQueries
public
1
1
query_names
def query_names(self, db_cursors: Sequence[Cursor] | None = None) -> set[str]:pass
1
2
2
22
0
141
142
141
self,db_cursors
[]
set[str]
{}
0
2
0
[]
0
[]
The function (query_names) defined within the public class called ISqliteQueries, implement an interface, and it inherit another class.The function start at line 141 and ends at 142. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [141.0] and does not return an...
Sema4AI_actions
ISqliteQueries
public
1
1
query_versions
def query_versions(self, package_name, db_cursors: Sequence[Cursor] | None = None) -> set[str]:pass
1
4
3
24
0
144
147
144
self,package_name,db_cursors
[]
set[str]
{}
0
4
0
[]
0
[]
The function (query_versions) defined within the public class called ISqliteQueries, implement an interface, and it inherit another class.The function start at line 144 and ends at 147. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [144.0] and does not return...
Sema4AI_actions
ISqliteQueries
public
1
1
query_version_info
def query_version_info(self,package_name: str,version: str,db_cursors: Sequence[Cursor] | None = None,) -> CondaVersionInfo:pass
1
7
4
28
0
149
155
149
self,package_name,version,db_cursors
[]
CondaVersionInfo
{}
0
7
0
[]
0
[]
The function (query_version_info) defined within the public class called ISqliteQueries, implement an interface, and it inherit another class.The function start at line 149 and ends at 155. It contains 7 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [149.0] and does not re...
Sema4AI_actions
IOnFinished
public
1
1
__call__
def __call__(self):pass
1
2
1
6
0
159
160
159
self
[]
None
{}
0
2
0
[]
50
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3561509_collective_solgema_fullcalendar.Solgema.fullcalendar.browser.views_py.SolgemaFullcalendarEventJS.__call__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3598540_saltstack_salt_testing.salttesting.runtests_p...
The function (__call__) defined within the public class called IOnFinished, implement an interface, and it inherit another class.The function start at line 159 and ends at 160. 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. I...
Sema4AI_actions
ICondaCloud
public
1
1
is_information_cached
def is_information_cached(self) -> bool:pass
1
2
1
8
0
164
165
164
self
[]
bool
{}
0
2
0
[]
0
[]
The function (is_information_cached) defined within the public class called ICondaCloud, implement an interface, and it inherit another class.The function start at line 164 and ends at 165. 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...
Sema4AI_actions
ICondaCloud
public
1
1
sqlite_queries
def sqlite_queries(self) -> ISqliteQueries | None:pass
1
2
1
10
0
167
168
167
self
[]
ISqliteQueries | None
{}
0
2
0
[]
0
[]
The function (sqlite_queries) defined within the public class called ICondaCloud, implement an interface, and it inherit another class.The function start at line 167 and ends at 168. 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 va...
Sema4AI_actions
ICondaCloud
public
1
1
schedule_update
def schedule_update(self, on_finished: IOnFinished | None = None, wait=False, force=False) -> None:pass
1
4
4
24
0
170
173
170
self,on_finished,wait,force
[]
None
{}
0
4
0
[]
0
[]
The function (schedule_update) defined within the public class called ICondaCloud, implement an interface, and it inherit another class.The function start at line 170 and ends at 173. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [170.0] and does not return a...
Sema4AI_actions
PackageDepsConda
public
0
1
add_dep
def add_dep(self, value: str, as_range):from ..action_package_handling import convert_conda_entryfrom ._conda_deps import CondaDepInfotry:_name, entry_in_conda, _op, _version = convert_conda_entry(None, value)except Exception as e:self._deps[value] = CondaDepInfo(value, value, "", as_range, error_msg=f"Error parsing '{...
2
11
3
77
0
6
18
6
self,value,as_range
[]
None
{"Assign": 2, "Expr": 1, "Try": 1}
3
13
3
["convert_conda_entry", "CondaDepInfo", "CondaDeps.add_dep"]
0
[]
The function (add_dep) defined within the public class called PackageDepsConda, that inherit another class.The function start at line 6 and ends at 18. It contains 11 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [6.0] and does not return any value. It declares 3.0 functio...
Sema4AI_actions
PackageDepsConda
public
0
1
add_dep
def add_dep(self, value: str, as_range):from ..action_package_handling import convert_pip_entryfrom ._pip_deps import PipDepInfotry:_name, entry_in_pip, _op, _version = convert_pip_entry(None, value)except Exception as e:self._deps[value] = PipDepInfo(name=value,extras=None,constraints=None,marker=None,url="",requireme...
2
18
3
98
0
26
45
26
self,value,as_range
[]
None
{"Assign": 2, "Expr": 1, "Try": 1}
3
13
3
["convert_conda_entry", "CondaDepInfo", "CondaDeps.add_dep"]
0
[]
The function (add_dep) defined within the public class called PackageDepsConda, that inherit another class.The function start at line 26 and ends at 45. It contains 18 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [26.0] and does not return any value. It declares 3.0 funct...
Sema4AI_actions
PipDeps
public
0
0
__init__
def __init__(self):self._deps = {}
1
2
1
11
0
27
28
27
self
[]
None
{"Assign": 1}
0
2
0
[]
6,243
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.AlertCollector_py.AlertCollector.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.ClusterAlertCollector_py.ClusterAlertCollec...
The function (__init__) defined within the public class called PipDeps.The function start at line 27 and ends at 28. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It has 6243.0 functions calling this function which are ["_.c...
Sema4AI_actions
PipDeps
public
0
0
add_dep
def add_dep(self, value, as_range):from .pip_impl.pip_distlib_util import IDENTIFIER, parse_requirementtry:req = parse_requirement(value)except Exception as e:remaining = value.strip()# -- ignored because it's used for pip flags (i.e.: --use-feature=truststore).if not remaining or remaining.startswith("#") or remaining...
8
41
3
223
0
30
75
30
self,value,as_range
[]
None
{"Assign": 8, "If": 3, "Return": 2, "Try": 1}
11
46
11
["parse_requirement", "value.strip", "remaining.startswith", "remaining.startswith", "value.startswith", "value.endswith", "PipDepInfo", "IDENTIFIER.match", "m.groups", "PipDepInfo", "PipDepInfo"]
2
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server.vendored_deps.package_deps._package_deps_py.PackageDepsPip.add_dep", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.common.src...
The function (add_dep) defined within the public class called PipDeps.The function start at line 30 and ends at 75. It contains 41 lines of code and it has a cyclomatic complexity of 8. It takes 3 parameters, represented as [30.0] and does not return any value. It declares 11.0 functions, It has 11.0 functions called i...
Sema4AI_actions
PipDeps
public
0
0
iter_deps_infos
def iter_deps_infos(self) -> Iterator[PipDepInfo]:yield from self._deps.values()
1
2
1
19
0
77
78
77
self
[]
Iterator[PipDepInfo]
{"Expr": 1}
1
2
1
["self._deps.values"]
0
[]
The function (iter_deps_infos) defined within the public class called PipDeps.The function start at line 77 and ends at 78. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, and It has 1.0 function call...
Sema4AI_actions
BaseAnalyzer
public
0
0
__init__
def __init__(self,contents: str,path: str,conda_cloud: ICondaCloud,pypi_cloud: IPyPiCloud | None = None,):"""Args:contents: The contents of the conda.yaml/action-server.yaml.path: The path for the conda yaml."""from .pypi_cloud import PyPiCloudself.contents = contentsself.path = pathself._loaded_yaml = Falseself._load_...
2
18
5
91
0
27
53
27
self,contents,path,conda_cloud,pypi_cloud
[]
None
{"AnnAssign": 2, "Assign": 6, "Expr": 1, "If": 1}
1
27
1
["PyPiCloud"]
6,247
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.AlertCollector_py.AlertCollector.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.ClusterAlertCollector_py.ClusterAlertCollec...
The function (__init__) defined within the public class called BaseAnalyzer.The function start at line 27 and ends at 53. It contains 18 lines of code and it has a cyclomatic complexity of 2. It takes 5 parameters, represented as [27.0] and does not return any value. It declare 1.0 function, It has 1.0 function called ...
Sema4AI_actions
BaseAnalyzer
public
0
0
_load_yaml_info
def _load_yaml_info(self) -> None:"""Loads the base information and creates errors for syntax errorsloading the yaml."""if self._loaded_yaml:returnself._loaded_yaml = Truefrom yaml.error import MarkedYAMLErrorfrom ..yaml_with_location import LoaderWithLines, create_range_from_locationdiagnostic: _DiagnosticsTypedDicttr...
5
33
1
177
0
55
98
55
self
[]
None
{"AnnAssign": 2, "Assign": 7, "Expr": 3, "If": 3, "Return": 1, "Try": 1}
8
44
8
["LoaderWithLines", "pathlib.Path", "loader.get_single_data", "isinstance", "create_range_from_location", "self._load_errors.append", "create_range_from_location", "self._load_errors.append"]
4
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server.vendored_deps.package_deps.analyzer_py.CondaYamlAnalyzer._load_yaml_info", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.acti...
The function (_load_yaml_info) defined within the public class called BaseAnalyzer.The function start at line 55 and ends at 98. It contains 33 lines of code and it has a cyclomatic complexity of 5. The function does not take any parameters and does not return any value. It declares 8.0 functions, It has 8.0 functions ...
Sema4AI_actions
BaseAnalyzer
public
0
0
iter_pip_issues
def iter_pip_issues(self):from .pip_impl import pip_packaging_versionfor dep_info in self._pip_deps.iter_deps_infos():if dep_info.error_msg:diagnostic = {"range": dep_info.dep_range,"severity": _DiagnosticSeverity.Error,"source": "sema4ai","message": dep_info.error_msg,}yield diagnosticcontinueif dep_info.constraints a...
7
29
1
153
0
100
134
100
self
[]
None
{"Assign": 6, "Expr": 2, "For": 1, "If": 4}
8
35
8
["self._pip_deps.iter_deps_infos", "len", "next", "iter", "self._pypi_cloud.get_versions_newer_than", "pip_packaging_version.parse", "len", "join"]
0
[]
The function (iter_pip_issues) defined within the public class called BaseAnalyzer.The function start at line 100 and ends at 134. It contains 29 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 8.0 functions, and It has 8.0 fun...
Sema4AI_actions
BaseAnalyzer
public
0
0
iter_conda_issues
def iter_conda_issues(self) -> Iterator[_DiagnosticsTypedDict]:from .conda_cloud import sort_conda_versionsfrom .conda_impl.conda_version import VersionSpecdiagnostic: _DiagnosticsTypedDictdep_vspec = self._conda_deps.get_dep_vspec("python")# See: https://devguide.python.org/versions/if dep_vspec is not None:# We have ...
17
72
1
380
0
136
231
136
self
[]
Iterator[_DiagnosticsTypedDict]
{"AnnAssign": 1, "Assign": 16, "Expr": 5, "For": 4, "If": 11, "With": 1}
23
96
23
["self._conda_deps.get_dep_vspec", "VersionSpec", "split", "vspec.match", "self._conda_deps.get_dep_range", "self._conda_deps.get_dep_vspec", "VersionSpec", "str", "range", "vspec.match", "self._conda_deps.get_dep_range", "self._conda_cloud.sqlite_queries", "sqlite_queries.db_cursors", "self._conda_deps.iter_deps_infos...
0
[]
The function (iter_conda_issues) defined within the public class called BaseAnalyzer.The function start at line 136 and ends at 231. It contains 72 lines of code and it has a cyclomatic complexity of 17. The function does not take any parameters and does not return any value. It declares 23.0 functions, and It has 23....
Sema4AI_actions
BaseAnalyzer
public
0
0
find_pip_dep_at
def find_pip_dep_at(self, line, col) -> "Optional[PipDepInfo]":"""Args:line: 0-based line"""from ..yaml_with_location import is_insideself._load_yaml_info()for dep_info in self._pip_deps.iter_deps_infos():if is_inside(dep_info.dep_range, line, col):return dep_inforeturn None
3
7
3
50
0
233
244
233
self,line,col
[]
'Optional[PipDepInfo]'
{"Expr": 2, "For": 1, "If": 1, "Return": 2}
3
12
3
["self._load_yaml_info", "self._pip_deps.iter_deps_infos", "is_inside"]
0
[]
The function (find_pip_dep_at) defined within the public class called BaseAnalyzer.The function start at line 233 and ends at 244. It contains 7 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [233.0] and does not return any value. It declares 3.0 functions, and It has 3.0 ...
Sema4AI_actions
BaseAnalyzer
public
0
0
find_conda_dep_at
def find_conda_dep_at(self, line, col) -> "Optional[CondaDepInfo]":from ..yaml_with_location import is_insideself._load_yaml_info()for dep_info in self._conda_deps.iter_deps_infos():if is_inside(dep_info.dep_range, line, col):return dep_inforeturn None
3
7
3
49
0
246
253
246
self,line,col
[]
'Optional[CondaDepInfo]'
{"Expr": 1, "For": 1, "If": 1, "Return": 2}
3
8
3
["self._load_yaml_info", "self._conda_deps.iter_deps_infos", "is_inside"]
0
[]
The function (find_conda_dep_at) defined within the public class called BaseAnalyzer.The function start at line 246 and ends at 253. It contains 7 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [246.0] and does not return any value. It declares 3.0 functions, and It has 3....
Sema4AI_actions
public
public
0
0
extract_range
def extract_range(*items):from ..yaml_with_location import create_range_from_locationfor item in items:if hasattr(item, "as_range"):return item.as_range()return create_range_from_location(0, 0)
3
6
1
38
0
256
262
256
*items
[]
Returns
{"For": 1, "If": 1, "Return": 2}
3
7
3
["hasattr", "item.as_range", "create_range_from_location"]
2
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server.vendored_deps.package_deps.analyzer_py.PackageYamlAnalyzer._iter_external_endpoints_issues", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Se...
The function (extract_range) defined within the public class called public.The function start at line 256 and ends at 262. It contains 6 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters, and this function return a value. It declares 3.0 functions, It has 3.0 functions cal...
Sema4AI_actions
public
public
0
0
type_repr
def type_repr(obj):# Needed to deal with the `str_with_location`, `dict_with_location`, etc.if isinstance(obj, str):return "str"elif isinstance(obj, bool):return "bool"elif isinstance(obj, int):return "int"elif isinstance(obj, float):return "float"elif isinstance(obj, list):return "list"elif isinstance(obj, dict):retur...
9
19
1
95
0
265
284
265
obj
[]
Returns
{"If": 7, "Return": 9, "Try": 1}
10
20
10
["isinstance", "isinstance", "isinstance", "isinstance", "isinstance", "isinstance", "isinstance", "type", "str", "type"]
4
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server.vendored_deps.package_deps.analyzer_py.PackageYamlAnalyzer._iter_external_endpoints_issues", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Se...
The function (type_repr) defined within the public class called public.The function start at line 265 and ends at 284. It contains 19 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 10.0 functions, It has 10.0 functions call...
Sema4AI_actions
BaseAnalyzer
public
0
0
__init__
def __init__(self,contents: str,path: str,conda_cloud: ICondaCloud,pypi_cloud: IPyPiCloud | None = None,):from ._package_deps import PackageDepsConda, PackageDepsPipself._pip_deps = PackageDepsPip()self._conda_deps = PackageDepsConda()self._additional_load_errors: list[_DiagnosticsTypedDict] = []BaseAnalyzer.__init__(s...
1
12
5
74
0
288
301
288
self,contents,path,conda_cloud,pypi_cloud
[]
None
{"AnnAssign": 2, "Assign": 6, "Expr": 1, "If": 1}
1
27
1
["PyPiCloud"]
6,247
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.AlertCollector_py.AlertCollector.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.ClusterAlertCollector_py.ClusterAlertCollec...
The function (__init__) defined within the public class called BaseAnalyzer.The function start at line 288 and ends at 301. It contains 12 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [288.0] and does not return any value. It declare 1.0 function, It has 1.0 function call...
Sema4AI_actions
PackageYamlAnalyzer
public
0
1
iter_package_yaml_issues
def iter_package_yaml_issues(self) -> Iterator[_DiagnosticsTypedDict]:self._load_yaml_info()if self._load_errors:yield from iter(self._load_errors)returndata = self._yaml_dataif not data:returnyield from iter(self._additional_load_errors)yield from self.iter_conda_issues()yield from self.iter_pip_issues()yield from sel...
3
12
1
68
0
303
316
303
self
[]
Iterator[_DiagnosticsTypedDict]
{"Assign": 1, "Expr": 6, "If": 2, "Return": 2}
6
14
6
["self._load_yaml_info", "iter", "iter", "self.iter_conda_issues", "self.iter_pip_issues", "self._iter_external_endpoints_issues"]
0
[]
The function (iter_package_yaml_issues) defined within the public class called PackageYamlAnalyzer, that inherit another class.The function start at line 303 and ends at 316. It contains 12 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...
Sema4AI_actions
PackageYamlAnalyzer
public
0
1
_iter_external_endpoints_issues
def _iter_external_endpoints_issues(self) -> Iterator[_DiagnosticsTypedDict]:from ..yaml_with_location import dict_with_locationdata = self._yaml_dataif not data:returnexternal_endpoints = data.get("external-endpoints")if not external_endpoints:returnif not isinstance(external_endpoints, list):yield {"range": extract_r...
22
109
1
561
0
318
440
318
self
[]
Iterator[_DiagnosticsTypedDict]
{"AnnAssign": 1, "Assign": 6, "Expr": 12, "For": 2, "If": 16, "Return": 3}
34
123
34
["data.get", "isinstance", "extract_range", "isinstance", "extract_range", "set", "endpoint.keys", "extract_range", "sorted", "sorted", "extract_range", "isinstance", "extract_range", "type_repr", "extract_range", "isinstance", "extract_range", "isinstance", "extract_range", "type_repr", "isinstance", "extract_range", ...
0
[]
The function (_iter_external_endpoints_issues) defined within the public class called PackageYamlAnalyzer, that inherit another class.The function start at line 318 and ends at 440. It contains 109 lines of code and it has a cyclomatic complexity of 22. The function does not take any parameters and does not return any ...
Sema4AI_actions
BaseAnalyzer
public
0
0
_load_yaml_info
def _load_yaml_info(self) -> None:if self._loaded_yaml:returnfrom ..yaml_with_location import (create_range_from_location,str_with_location,str_with_location_capture,)BaseAnalyzer._load_yaml_info(self)data = self._yaml_dataif not data:returndiagnostic: _DiagnosticsTypedDictdependencies_key_entry: str_with_location_capt...
17
119
1
561
0
442
573
442
self
[]
None
{"AnnAssign": 2, "Assign": 7, "Expr": 3, "If": 3, "Return": 1, "Try": 1}
8
44
8
["LoaderWithLines", "pathlib.Path", "loader.get_single_data", "isinstance", "create_range_from_location", "self._load_errors.append", "create_range_from_location", "self._load_errors.append"]
4
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server.vendored_deps.package_deps.analyzer_py.CondaYamlAnalyzer._load_yaml_info", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.acti...
The function (_load_yaml_info) defined within the public class called BaseAnalyzer.The function start at line 442 and ends at 573. It contains 119 lines of code and it has a cyclomatic complexity of 17. The function does not take any parameters and does not return any value. It declares 8.0 functions, It has 8.0 functi...
Sema4AI_actions
BaseAnalyzer
public
0
0
__init__
def __init__(self,contents: str,path: str,conda_cloud: ICondaCloud,pypi_cloud: IPyPiCloud | None = None,):from ._conda_deps import CondaDepsfrom ._pip_deps import PipDepsself._pip_deps = PipDeps()self._conda_deps = CondaDeps()BaseAnalyzer.__init__(self, contents, path, conda_cloud, pypi_cloud=pypi_cloud)
1
12
5
66
0
577
590
577
self,contents,path,conda_cloud,pypi_cloud
[]
None
{"AnnAssign": 2, "Assign": 6, "Expr": 1, "If": 1}
1
27
1
["PyPiCloud"]
6,247
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.AlertCollector_py.AlertCollector.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.ClusterAlertCollector_py.ClusterAlertCollec...
The function (__init__) defined within the public class called BaseAnalyzer.The function start at line 577 and ends at 590. It contains 12 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [577.0] and does not return any value. It declare 1.0 function, It has 1.0 function call...
Sema4AI_actions
BaseAnalyzer
public
0
0
_load_yaml_info
def _load_yaml_info(self) -> None:if self._loaded_yaml:returnfrom ..yaml_with_location import str_with_locationBaseAnalyzer._load_yaml_info(self)data = self._yaml_dataif not data:returndependencies = data.get("dependencies")conda_versions = self._conda_depspip_versions = self._pip_depsif dependencies:for dep in depende...
11
23
1
132
0
592
623
592
self
[]
None
{"AnnAssign": 2, "Assign": 7, "Expr": 3, "If": 3, "Return": 1, "Try": 1}
8
44
8
["LoaderWithLines", "pathlib.Path", "loader.get_single_data", "isinstance", "create_range_from_location", "self._load_errors.append", "create_range_from_location", "self._load_errors.append"]
4
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server.vendored_deps.package_deps.analyzer_py.CondaYamlAnalyzer._load_yaml_info", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.acti...
The function (_load_yaml_info) defined within the public class called BaseAnalyzer.The function start at line 592 and ends at 623. It contains 23 lines of code and it has a cyclomatic complexity of 11. The function does not take any parameters and does not return any value. It declares 8.0 functions, It has 8.0 functio...
Sema4AI_actions
CondaYamlAnalyzer
public
0
1
iter_conda_yaml_issues
def iter_conda_yaml_issues(self) -> Iterator[_DiagnosticsTypedDict]:self._load_yaml_info()if self._load_errors:yield from iter(self._load_errors)returndata = self._yaml_dataif not data:returnyield from self.iter_conda_issues()yield from self.iter_pip_issues()
3
10
1
53
0
625
636
625
self
[]
Iterator[_DiagnosticsTypedDict]
{"Assign": 1, "Expr": 4, "If": 2, "Return": 2}
4
12
4
["self._load_yaml_info", "iter", "self.iter_conda_issues", "self.iter_pip_issues"]
0
[]
The function (iter_conda_yaml_issues) defined within the public class called CondaYamlAnalyzer, that inherit another class.The function start at line 625 and ends at 636. It contains 10 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 dec...
Sema4AI_actions
public
public
0
0
timestamp_to_datetime
def timestamp_to_datetime(timestamp_milliseconds: float) -> datetime.datetime:timestamp_seconds = timestamp_milliseconds / 1000# Convert to secondsreturn datetime.datetime.fromtimestamp(timestamp_seconds)
1
3
1
25
1
74
76
74
timestamp_milliseconds
['timestamp_seconds']
datetime.datetime
{"Assign": 1, "Return": 1}
1
3
1
["datetime.datetime.fromtimestamp"]
2
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3925405_juanifioren_django_oidc_provider.oidc_provider.tests.cases.test_utils_py.TokenTest.test_create_id_token", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.70286108_google_research_skai.src.colab.colab_utils_py....
The function (timestamp_to_datetime) defined within the public class called public.The function start at line 74 and ends at 76. 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 declare 1.0 function, It has 1.0 function call...
Sema4AI_actions
SqliteQueries
public
0
0
__init__
def __init__(self, sqlite_file: Path | Sequence[Path]):sqlite_files: Sequence[Path]if isinstance(sqlite_file, Path):sqlite_files = [sqlite_file]else:sqlite_files = sqlite_fileself.sqlite_files: Sequence[Path] = sqlite_files
2
7
2
48
0
80
86
80
self,sqlite_file
[]
None
{"AnnAssign": 2, "Assign": 2, "If": 1}
1
7
1
["isinstance"]
6,243
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.AlertCollector_py.AlertCollector.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.ClusterAlertCollector_py.ClusterAlertCollec...
The function (__init__) defined within the public class called SqliteQueries.The function start at line 80 and ends at 86. It contains 7 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [80.0] and does not return any value. It declare 1.0 function, It has 1.0 function called ...
Sema4AI_actions
SqliteQueries
public
0
0
db_cursors
def db_cursors(self, db_cursor: Sequence[Cursor] | None = None) -> Iterator[Sequence[Cursor]]:if db_cursor is not None:yield db_cursorreturnimport sqlite3db_cursors: list[Cursor] = []db_connections: list = []for path in self.sqlite_files:db_connections.append(sqlite3.connect(path))db_cursors.append(db_connections[-1].c...
8
25
2
130
0
89
116
89
self,db_cursor
[]
Iterator[Sequence[Cursor]]
{"AnnAssign": 2, "Expr": 8, "For": 3, "If": 1, "Return": 1, "Try": 3}
8
28
8
["db_connections.append", "sqlite3.connect", "db_cursors.append", "cursor", "cursor.close", "log.exception", "db_connection.close", "log.exception"]
0
[]
The function (db_cursors) defined within the public class called SqliteQueries.The function start at line 89 and ends at 116. It contains 25 lines of code and it has a cyclomatic complexity of 8. It takes 2 parameters, represented as [89.0] and does not return any value. It declares 8.0 functions, and It has 8.0 funct...
Sema4AI_actions
SqliteQueries
public
0
0
query_names
def query_names(self, db_cursors: Sequence[Cursor] | None = None) -> set[str]:with self.db_cursors(db_cursors) as db_cursors:package_names: set[str] = set()for db_cursor in db_cursors:db_cursor.execute("SELECT package_name FROM packages")rows = db_cursor.fetchall()package_names.update(row[0] for row in rows)return pack...
3
8
2
74
0
118
126
118
self,db_cursors
[]
set[str]
{"AnnAssign": 1, "Assign": 1, "Expr": 2, "For": 1, "Return": 1, "With": 1}
5
9
5
["self.db_cursors", "set", "db_cursor.execute", "db_cursor.fetchall", "package_names.update"]
0
[]
The function (query_names) defined within the public class called SqliteQueries.The function start at line 118 and ends at 126. It contains 8 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [118.0] and does not return any value. It declares 5.0 functions, and It has 5.0 fun...
Sema4AI_actions
SqliteQueries
public
0
0
query_versions
def query_versions(self, package_name, db_cursors: Sequence[Cursor] | None = None) -> set[str]:with self.db_cursors(db_cursors) as db_cursors:versions: set[str] = set()for db_cursor in db_cursors:db_cursor.execute("""SELECT Versions.versionFROM PackagesINNER JOIN Versions ON Packages.package_id = Versions.package_idWHE...
5
22
3
98
0
128
152
128
self,package_name,db_cursors
[]
set[str]
{"AnnAssign": 1, "Assign": 1, "Expr": 2, "For": 1, "Return": 1, "With": 1}
5
25
5
["self.db_cursors", "set", "db_cursor.execute", "db_cursor.fetchall", "versions.update"]
0
[]
The function (query_versions) defined within the public class called SqliteQueries.The function start at line 128 and ends at 152. It contains 22 lines of code and it has a cyclomatic complexity of 5. It takes 3 parameters, represented as [128.0] and does not return any value. It declares 5.0 functions, and It has 5.0...
Sema4AI_actions
SqliteQueries
public
0
0
query_version_info
def query_version_info(self,package_name: str,version: str,db_cursors: Sequence[Cursor] | None = None,) -> CondaVersionInfo:"""Note that the same package/version may have multiple infosbecause of build ids (but in this API this isn't given,so, if the same depends are available then they're shownonly as one)."""with sel...
4
30
4
132
0
154
194
154
self,package_name,version,db_cursors
[]
CondaVersionInfo
{"AnnAssign": 1, "Assign": 5, "Expr": 3, "For": 2, "Return": 1, "Try": 1, "With": 1}
6
41
6
["self.db_cursors", "db_cursor.execute", "db_cursor.fetchall", "lst.append", "max", "CondaVersionInfo"]
0
[]
The function (query_version_info) defined within the public class called SqliteQueries.The function start at line 154 and ends at 194. It contains 30 lines of code and it has a cyclomatic complexity of 4. It takes 4 parameters, represented as [154.0] and does not return any value. It declares 6.0 functions, and It has...
Sema4AI_actions
public
public
0
0
version_key
def version_key(version_info: CondaVersionInfo):from .conda_impl.conda_version import VersionOrderversion_order = VersionOrder(version_info.version)return version_order
1
4
1
24
1
197
201
197
version_info
['version_order']
Returns
{"Assign": 1, "Return": 1}
1
5
1
["VersionOrder"]
0
[]
The function (version_key) defined within the public class called public.The function start at line 197 and ends at 201. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declare 1.0 function, and It has 1.0 function cal...
Sema4AI_actions
public
public
0
0
sort_conda_version_infos
def sort_conda_version_infos(versions: Sequence[CondaVersionInfo] | set[CondaVersionInfo],) -> list[CondaVersionInfo]:return list(sorted(versions, key=version_key))
1
4
1
33
0
204
207
204
versions
[]
list[CondaVersionInfo]
{"Return": 1}
2
4
2
["list", "sorted"]
0
[]
The function (sort_conda_version_infos) defined within the public class called public.The function start at line 204 and ends at 207. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 functions, and It has 2.0 f...
Sema4AI_actions
public
public
0
0
version_str_key
def version_str_key(version: str):from .conda_impl.conda_version import VersionOrderversion_order = VersionOrder(version)return version_order
1
4
1
22
1
210
214
210
version
['version_order']
Returns
{"Assign": 1, "Return": 1}
1
5
1
["VersionOrder"]
0
[]
The function (version_str_key) defined within the public class called public.The function start at line 210 and ends at 214. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declare 1.0 function, and It has 1.0 function...
Sema4AI_actions
public
public
0
0
sort_conda_versions
def sort_conda_versions(versions: Sequence[str] | set[str],) -> list[str]:return list(sorted(versions, key=version_str_key))
1
4
1
33
0
217
220
217
versions
[]
list[str]
{"Return": 1}
2
4
2
["list", "sorted"]
2
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server.vendored_deps.package_deps.analyzer_py.BaseAnalyzer.iter_conda_issues", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.common....
The function (sort_conda_versions) defined within the public class called public.The function start at line 217 and ends at 220. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 functions, It has 2.0 functions c...
Sema4AI_actions
public
public
0
0
index_conda_info
def index_conda_info(json_file: Path, target_sqlite_file: Path):import sqlite3# Using msgspec cuts the time in half (from 1 second to 0.5 seconds# for the full process in one use case).# Not only the decoding is faster (from 0.44 to 0.28), but accessing# things from the structure it provides is faster than accessing fr...
14
72
2
407
14
227
341
227
json_file,target_sqlite_file
['rows', 'timestamp', 'default_subdir', 'package_id', 'build', 'lastrowid', 'subdir', 'bytes_read', 'db_cursor', 'version', 'db_connection', 'name', 'data', 'depends']
None
{"AnnAssign": 11, "Assign": 15, "Expr": 10, "For": 2, "If": 5, "Try": 3, "With": 1}
20
115
20
["msgspec.field", "open", "stream.read", "msgspec.json.decode", "sqlite3.connect", "db_connection.cursor", "db_cursor.execute", "db_cursor.execute", "db_cursor.execute", "itertools.chain", "items", "items", "db_cursor.execute", "msgspec.json.encode", "log.info", "rows.append", "db_cursor.executemany", "db_cursor.close"...
2
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server.vendored_deps.package_deps.conda_cloud_py._AfterDownloadMakeSqlite._convert_to_sqlite", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI...
The function (index_conda_info) defined within the public class called public.The function start at line 227 and ends at 341. It contains 72 lines of code and it has a cyclomatic complexity of 14. It takes 2 parameters, represented as [227.0] and does not return any value. It declares 20.0 functions, It has 20.0 functi...
Sema4AI_actions
SqliteQueries
public
0
0
__init__
def __init__(self):self._callbacks = []
1
2
1
11
0
354
355
354
self,sqlite_file
[]
None
{"AnnAssign": 2, "Assign": 2, "If": 1}
1
7
1
["isinstance"]
6,243
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.AlertCollector_py.AlertCollector.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.ClusterAlertCollector_py.ClusterAlertCollec...
The function (__init__) defined within the public class called SqliteQueries.The function start at line 354 and ends at 355. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, It has 1.0 function called i...
Sema4AI_actions
_Callback
protected
0
0
register
def register(self, callback):new_callbacks = self._callbacks[:]new_callbacks.append(callback)self._callbacks = new_callbacks
1
4
2
26
0
357
360
357
self,callback
[]
None
{"Assign": 2, "Expr": 1}
1
4
1
["new_callbacks.append"]
904
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3625043_uber_tchannel_python.tests.integration.json.test_json_server_py.json_server", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3625043_uber_tchannel_python.tests.integration.test_error_handling_py.mock_server",...
The function (register) defined within the protected class called _Callback.The function start at line 357 and ends at 360. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [357.0] and does not return any value. It declare 1.0 function, It has 1.0 function calle...
Sema4AI_actions
_Callback
protected
0
0
unregister
def unregister(self, callback):new_callbacks = [x for x in self._callbacks if x != callback]self._callbacks = new_callbacks
3
3
2
27
0
362
364
362
self,callback
[]
None
{"Assign": 2}
0
3
0
[]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema4ai.actions._hooks_py.SessionCallback.unregister"]
The function (unregister) defined within the protected class called _Callback.The function start at line 362 and ends at 364. It contains 3 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [362.0] and does not return any value. It has 1.0 function calling this function which ...
Sema4AI_actions
_Callback
protected
0
0
__call__
def __call__(self, *args, **kwargs):for c in self._callbacks:try:c(*args, **kwargs)except Exception:log.exception("Error in callback.")
3
6
3
37
0
366
371
366
self,*args,**kwargs
[]
None
{"Expr": 2, "For": 1, "Try": 1}
2
6
2
["c", "log.exception"]
50
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3561509_collective_solgema_fullcalendar.Solgema.fullcalendar.browser.views_py.SolgemaFullcalendarEventJS.__call__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3598540_saltstack_salt_testing.salttesting.runtests_p...
The function (__call__) defined within the protected class called _Callback.The function start at line 366 and ends at 371. It contains 6 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [366.0] and does not return any value. It declares 2.0 functions, It has 2.0 functions ca...
Sema4AI_actions
_Callback
protected
0
0
__len__
def __len__(self):return len(self._callbacks)
1
2
1
12
0
373
374
373
self
[]
Returns
{"Return": 1}
1
2
1
["len"]
3
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3987994_yoshiko2_av_data_capture.number_parser_py.get_number", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69765524_openshift_elliott.elliottlib.model_py.ListModel.__getitem__", "_.content.gdrive.MyDrive.Phd_Thesi...
The function (__len__) defined within the protected class called _Callback.The function start at line 373 and ends at 374. 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...
Sema4AI_actions
_Callback
protected
0
0
clear
def clear(self):self._callbacks = []
1
2
1
11
0
376
377
376
self
[]
None
{"Assign": 1}
0
2
0
[]
61
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3511986_dart_archive_pub_dartlang.third_party.cherrypy.test.test_caching_py.CacheTest.setup_server", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3537748_rainerf_ricodebug.src.datagraph.datagraphview_py.DataGraphVi...
The function (clear) defined within the protected class called _Callback.The function start at line 376 and ends at 377. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It has 61.0 functions calling this function which are ["_...
Sema4AI_actions
SqliteQueries
public
0
0
__init__
def __init__(self, available_arch: list[Arch], cache_dir: Path, index_cache_dir: Path):self._available_arch = available_archself._lock = threading.Lock()self._count = 0self._call_on_finished = _Callback()self._finished = Falseself._arch_to_sqlite: dict[str, Path] = {}self._index_cache_dir = index_cache_dirself._cache_d...
1
11
4
74
0
381
391
381
self,sqlite_file
[]
None
{"AnnAssign": 2, "Assign": 2, "If": 1}
1
7
1
["isinstance"]
6,243
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.AlertCollector_py.AlertCollector.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.ClusterAlertCollector_py.ClusterAlertCollec...
The function (__init__) defined within the public class called SqliteQueries.The function start at line 381 and ends at 391. It contains 11 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [381.0] and does not return any value. It declare 1.0 function, It has 1.0 function cal...
Sema4AI_actions
_AfterDownloadMakeSqlite
protected
0
0
_convert_to_sqlite
def _convert_to_sqlite(self, json_file: Path, arch: Arch) -> Path:target_sqlite_file = self._index_cache_dir / f"{arch}.db"index_conda_info(json_file, target_sqlite_file)return target_sqlite_file
1
4
3
31
0
393
396
393
self,json_file,arch
[]
Path
{"Assign": 1, "Expr": 1, "Return": 1}
1
4
1
["index_conda_info"]
0
[]
The function (_convert_to_sqlite) defined within the protected class called _AfterDownloadMakeSqlite.The function start at line 393 and ends at 396. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [393.0] and does not return any value. It declare 1.0 function, ...
Sema4AI_actions
_Callback
protected
0
0
__call__
def __call__(self, download_future: "Future[tuple[Path, Arch]]"):json_file = Nonetry:json_file, arch = download_future.result()self._arch_to_sqlite[arch] = self._convert_to_sqlite(json_file, arch)except BaseException:# Handle all exceptions (because the on_finished calls# must always be called).log.exception("Error whe...
5
28
2
160
0
398
435
398
self,*args,**kwargs
[]
None
{"Expr": 2, "For": 1, "Try": 1}
2
6
2
["c", "log.exception"]
50
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3561509_collective_solgema_fullcalendar.Solgema.fullcalendar.browser.views_py.SolgemaFullcalendarEventJS.__call__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3598540_saltstack_salt_testing.salttesting.runtests_p...
The function (__call__) defined within the protected class called _Callback.The function start at line 398 and ends at 435. It contains 28 lines of code and it has a cyclomatic complexity of 5. It takes 2 parameters, represented as [398.0] and does not return any value. It declares 2.0 functions, It has 2.0 functions c...
Sema4AI_actions
_AfterDownloadMakeSqlite
protected
0
0
register_on_finished
def register_on_finished(self, on_finished: IOnFinished):with self._lock:if self._finished:on_finished()else:self._call_on_finished.register(on_finished)
2
6
2
32
0
437
442
437
self,on_finished
[]
None
{"Expr": 2, "If": 1, "With": 1}
2
6
2
["on_finished", "self._call_on_finished.register"]
0
[]
The function (register_on_finished) defined within the protected class called _AfterDownloadMakeSqlite.The function start at line 437 and ends at 442. It contains 6 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [437.0] and does not return any value. It declares 2.0 functio...
Sema4AI_actions
public
public
0
0
_extract_dir_number
def _extract_dir_number(dirname) -> int:try:_n, number = dirname.split("_")return int(number)except Exception:# Return zero if not what we expected.return 0
2
6
1
29
0
445
451
445
dirname
[]
int
{"Assign": 1, "Return": 2, "Try": 1}
2
7
2
["dirname.split", "int"]
2
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server.vendored_deps.package_deps.conda_cloud_py.CondaCloud.schedule_update", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.common.s...
The function (_extract_dir_number) defined within the public class called public.The function start at line 445 and ends at 451. It contains 6 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 2.0 functions, It has 2.0 functions c...
Sema4AI_actions
SqliteQueries
public
0
0
__init__
def __init__(self, cache_dir: Path, reindex_if_old: bool = True) -> None:self._base_url = "https://conda.anaconda.org/conda-forge"self._available_arch = ["noarch","win-64","linux-64","osx-64",]self._json_name = "current_repodata.json"self._cache_dir = cache_dircache_dir.mkdir(parents=True, exist_ok=True)self._lock = th...
5
24
3
155
0
470
499
470
self,sqlite_file
[]
None
{"AnnAssign": 2, "Assign": 2, "If": 1}
1
7
1
["isinstance"]
6,243
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.AlertCollector_py.AlertCollector.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.ClusterAlertCollector_py.ClusterAlertCollec...
The function (__init__) defined within the public class called SqliteQueries.The function start at line 470 and ends at 499. It contains 24 lines of code and it has a cyclomatic complexity of 5. It takes 3 parameters, represented as [470.0] and does not return any value. It declare 1.0 function, It has 1.0 function cal...
Sema4AI_actions
CondaCloud
public
0
0
_download
def _download(self, url: str, target_json: Path, arch: str) -> tuple[Path, Arch]:import urllib.requestCHUNK_SIZE = 32768with target_json.open("wb") as stream:request = urllib.request.urlopen(urllib.request.Request(url, headers={"User-Agent": "Mozilla"}))if request.status != 200:raise RuntimeError(f"HTTP error (unable t...
4
16
4
113
0
501
520
501
self,url,target_json,arch
[]
tuple[Path, Arch]
{"Assign": 2, "Expr": 1, "For": 1, "If": 2, "Return": 1, "With": 2}
7
20
7
["target_json.open", "urllib.request.urlopen", "urllib.request.Request", "RuntimeError", "iter", "request.read", "stream.write"]
8
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3915655_s2e_s2e_env.s2e_env.utils.google_py.download", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3915655_s2e_s2e_env.s2e_env.utils.images_py.ImageDownloader._download_image", "_.content.gdrive.MyDrive.Phd_Thesis...
The function (_download) defined within the public class called CondaCloud.The function start at line 501 and ends at 520. It contains 16 lines of code and it has a cyclomatic complexity of 4. It takes 4 parameters, represented as [501.0] and does not return any value. It declares 7.0 functions, It has 7.0 functions ca...
Sema4AI_actions
CondaCloud
public
0
0
_call_on_finished_callbacks
def _call_on_finished_callbacks(self):for on_finished in self._call_on_finished:try:on_finished()except Exception:log.exception("Unexpected exception.")del self._call_on_finished[:]
3
7
1
33
0
522
528
522
self
[]
None
{"Expr": 2, "For": 1, "Try": 1}
2
7
2
["on_finished", "log.exception"]
0
[]
The function (_call_on_finished_callbacks) defined within the public class called CondaCloud.The function start at line 522 and ends at 528. It contains 7 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 2.0 functions, and It ha...
Sema4AI_actions
public
public
0
0
schedule_update.mark_as_done
def mark_as_done(*args, **kwargs):with self._lock:self._state = State.done# Now, remove stale dirs.for directory in stale_dirs:try:shutil.rmtree(directory, ignore_errors=False)except Exception:log.exception(f"Error removing old conda cloud dirs from: {directory}")self._call_on_finished_callbacks()
3
11
2
53
0
608
621
608
null
[]
None
null
0
0
0
null
0
null
The function (schedule_update.mark_as_done) defined within the public class called public.The function start at line 608 and ends at 621. It contains 11 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [608.0] and does not return any value..
Sema4AI_actions
CondaCloud
public
0
0
schedule_update
def schedule_update(self, on_finished: IOnFinished | None = None, wait=False, force=False) -> None:"""This can be called at any time (in any thread). It schedules the downloadof the information we need.If it's currently downloading already it'll not do a new request and if itwas already downloaded it'll only redownload...
18
59
4
400
0
530
639
530
self,on_finished,wait,force
[]
None
{"AnnAssign": 2, "Assign": 14, "AugAssign": 1, "Expr": 14, "For": 5, "If": 10, "Return": 2, "Try": 2, "With": 2}
27
110
27
["self._call_on_finished.append", "self._call_on_finished_callbacks", "os.listdir", "range", "dir_name.startswith", "dir_name.startswith", "max", "_extract_dir_number", "dir_name.startswith", "dir_name.startswith", "_extract_dir_number", "stale_dirs.append", "tmp_cache_dir.mkdir", "index_cache_dir.mkdir", "time.sleep",...
0
[]
The function (schedule_update) defined within the public class called CondaCloud.The function start at line 530 and ends at 639. It contains 59 lines of code and it has a cyclomatic complexity of 18. It takes 4 parameters, represented as [530.0] and does not return any value. It declares 27.0 functions, and It has 27....
Sema4AI_actions
CondaCloud
public
0
0
load_latest_index_info
def load_latest_index_info(self) -> LatestIndexInfoTypedDict | None:try:latest_dir_info = self._cache_dir / "latest_index_info.json"with latest_dir_info.open("rb") as stream:info = json.load(stream)# index_dir is relative to the .json.index_dir_info: LatestIndexInfoTypedDict = {"index_dir": str(self._cache_dir / info["...
2
12
1
77
0
641
654
641
self
[]
LatestIndexInfoTypedDict | None
{"AnnAssign": 1, "Assign": 2, "Return": 2, "Try": 1, "With": 1}
4
14
4
["latest_dir_info.open", "json.load", "str", "datetime.datetime.fromisoformat"]
0
[]
The function (load_latest_index_info) defined within the public class called CondaCloud.The function start at line 641 and ends at 654. It contains 12 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 4.0 functions, and It has 4....
Sema4AI_actions
CondaCloud
public
0
0
_load_latest_index_dir_location
def _load_latest_index_dir_location(self) -> Path | None:latest_dir_info = self.load_latest_index_info()if not latest_dir_info:return Nonetry:index_dir_location = latest_dir_info["index_dir"]except Exception:return Noneindex_dir_path = Path(index_dir_location)return index_dir_path
3
10
1
43
0
656
667
656
self
[]
Path | None
{"Assign": 3, "If": 1, "Return": 3, "Try": 1}
2
12
2
["self.load_latest_index_info", "Path"]
0
[]
The function (_load_latest_index_dir_location) defined within the public class called CondaCloud.The function start at line 656 and ends at 667. It contains 10 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 2.0 functions, and ...
Sema4AI_actions
CondaCloud
public
0
0
_iter_index_files
def _iter_index_files(self) -> Iterator[Path]:"""Returns:An iterator which provides the paths to the sqlite fileswhich contain the indexed conda informations (one for each arch)."""index_dir_path = self._load_latest_index_dir_location()if not index_dir_path or not index_dir_path.exists():returnfor arch in self._availab...
5
8
1
52
0
669
682
669
self
[]
Iterator[Path]
{"Assign": 2, "Expr": 2, "For": 1, "If": 2, "Return": 1}
3
14
3
["self._load_latest_index_dir_location", "index_dir_path.exists", "f.exists"]
0
[]
The function (_iter_index_files) defined within the public class called CondaCloud.The function start at line 669 and ends at 682. It contains 8 lines of code and it has a cyclomatic complexity of 5. The function does not take any parameters and does not return any value. It declares 3.0 functions, and It has 3.0 func...
Sema4AI_actions
CondaCloud
public
0
0
is_information_cached
def is_information_cached(self) -> bool:index_dir_path = self._load_latest_index_dir_location()if not index_dir_path or not index_dir_path.exists():return Falsefor arch in self._available_arch:if not (index_dir_path / f"{arch}.db").exists():return Falsereturn True
5
8
1
51
0
684
693
684
self
[]
bool
{"Assign": 1, "For": 1, "If": 2, "Return": 3}
3
10
3
["self._load_latest_index_dir_location", "index_dir_path.exists", "exists"]
0
[]
The function (is_information_cached) defined within the public class called CondaCloud.The function start at line 684 and ends at 693. It contains 8 lines of code and it has a cyclomatic complexity of 5. The function does not take any parameters and does not return any value. It declares 3.0 functions, and It has 3.0 ...
Sema4AI_actions
CondaCloud
public
0
0
sqlite_queries
def sqlite_queries(self) -> SqliteQueries | None:index_dir_files = tuple(self._iter_index_files())if not index_dir_files:return Nonereturn SqliteQueries(index_dir_files)
2
5
1
30
0
695
699
695
self
[]
SqliteQueries | None
{"Assign": 1, "If": 1, "Return": 2}
3
5
3
["tuple", "self._iter_index_files", "SqliteQueries"]
0
[]
The function (sqlite_queries) defined within the public class called CondaCloud.The function start at line 695 and ends at 699. It contains 5 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 3.0 functions, and It has 3.0 functio...
Sema4AI_actions
PackageData
public
0
0
__init__
def __init__(self, package_name: str, info: PyPiInfoTypedDict) -> None:self.package_name = package_nameself._info: PyPiInfoTypedDict = infoself._releases: dict[str, ReleaseData] = {}
1
4
3
40
0
16
20
16
self,package_name,info
[]
None
{"AnnAssign": 2, "Assign": 1}
0
5
0
[]
6,243
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.AlertCollector_py.AlertCollector.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.ClusterAlertCollector_py.ClusterAlertCollec...
The function (__init__) defined within the public class called PackageData.The function start at line 16 and ends at 20. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [16.0] and does not return any value. It has 6243.0 functions calling this function which ar...
Sema4AI_actions
PackageData
public
0
0
add_release
def add_release(self, version_str: VersionStr, release_info: list[dict]) -> None:"""Args:version_str: The version we have info on.release_info: For each release we may have a list of files available."""from .pip_impl import pip_packaging_versionversion = pip_packaging_version.parse(version_str)upload_time: str | None =...
3
9
3
71
0
22
37
22
self,version_str,release_info
[]
None
{"AnnAssign": 1, "Assign": 3, "Expr": 1, "For": 1, "If": 1}
3
16
3
["pip_packaging_version.parse", "dct.get", "ReleaseData"]
2
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94655678_flathub_infra_flatpak_external_data_checker.src.lib.appdata_py.add_release_to_file", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94655678_flathub_infra_flatpak_external_data_checker.tests.test_appdata_py....
The function (add_release) defined within the public class called PackageData.The function start at line 22 and ends at 37. It contains 9 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [22.0] and does not return any value. It declares 3.0 functions, It has 3.0 functions cal...
Sema4AI_actions
PackageData
public
0
0
latest_version
def latest_version(self) -> VersionStr:return self._info["version"]
1
2
1
14
0
40
41
40
self
[]
VersionStr
{"Return": 1}
0
2
0
[]
0
[]
The function (latest_version) defined within the public class called PackageData.The function start at line 40 and ends at 41. 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..
Sema4AI_actions
PackageData
public
0
0
get_release_data
def get_release_data(self, version: VersionStr) -> ReleaseData | None:if not self._releases:return Nonetry:return self._releases[version]except KeyError:return None
3
7
2
35
0
43
49
43
self,version
[]
ReleaseData | None
{"If": 1, "Return": 3, "Try": 1}
0
7
0
[]
0
[]
The function (get_release_data) defined within the public class called PackageData.The function start at line 43 and ends at 49. It contains 7 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [43.0] and does not return any value..
Sema4AI_actions
PackageData
public
0
0
get_last_release_data
def get_last_release_data(self) -> ReleaseData | None:"""Provides the last release data (if there's any release)."""return self.get_release_data(self.latest_version)
1
2
1
19
0
51
55
51
self
[]
ReleaseData | None
{"Expr": 1, "Return": 1}
1
5
1
["self.get_release_data"]
0
[]
The function (get_last_release_data) defined within the public class called PackageData.The function start at line 51 and ends at 55. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, and It has 1.0 fun...
Sema4AI_actions
PackageData
public
0
0
iter_versions_released_after
def iter_versions_released_after(self, after_datetime: datetime.datetime | None) -> Iterator[ReleaseData]:"""Args:after_datetime: if none all releases (except pre-releases) willbe provided."""last_release_data = self.get_last_release_data()latest_upload_datetime: datetime.datetime | None = Noneif last_release_data and ...
9
19
2
106
0
57
85
57
self,after_datetime
[]
Iterator[ReleaseData]
{"AnnAssign": 1, "Assign": 3, "Expr": 2, "For": 1, "If": 5}
4
29
4
["self.get_last_release_data", "datetime.datetime.strptime", "self._releases.values", "datetime.datetime.strptime"]
0
[]
The function (iter_versions_released_after) defined within the public class called PackageData.The function start at line 57 and ends at 85. It contains 19 lines of code and it has a cyclomatic complexity of 9. It takes 2 parameters, represented as [57.0] and does not return any value. It declares 4.0 functions, and I...
Sema4AI_actions
PackageData
public
0
0
iter_versions_newer_than
def iter_versions_newer_than(self, version: Versions) -> Iterator[ReleaseData]:for release_data in self.iter_versions_released_after(None):if release_data.version > version:yield release_data
3
4
2
33
0
87
90
87
self,version
[]
Iterator[ReleaseData]
{"Expr": 1, "For": 1, "If": 1}
1
4
1
["self.iter_versions_released_after"]
0
[]
The function (iter_versions_newer_than) defined within the public class called PackageData.The function start at line 87 and ends at 90. It contains 4 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [87.0] and does not return any value. It declare 1.0 function, and It has 1...
Sema4AI_actions
PackageData
public
0
0
info
def info(self):return self._info
1
2
1
9
0
93
94
93
self
[]
Returns
{"Return": 1}
0
2
0
[]
207
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3575929_ministryofjustice_bootstrap_cfn.bootstrap_cfn.autoscale_py.Autoscale.set_autoscaling_desired_capacity", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3575929_ministryofjustice_bootstrap_cfn.bootstrap_cfn.aut...
The function (info) defined within the public class called PackageData.The function start at line 93 and ends at 94. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It has 207.0 functions calling this function which are ["...
Sema4AI_actions
public
public
0
0
__init__.__init__.get_weak.get_pypi_url
def get_pypi_url():return ("https://pypi.org",)
1
2
0
9
0
108
109
108
null
[]
None
null
0
0
0
null
0
null
The function (__init__.__init__.get_weak.get_pypi_url) defined within the public class called public.The function start at line 108 and ends at 109. 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..
Sema4AI_actions
public
public
0
0
__init__.get_weak
def get_weak():def get_pypi_url():return ("https://pypi.org",)return get_pypi_url
1
3
0
8
0
107
111
107
null
[]
None
null
0
0
0
null
0
null
The function (__init__.get_weak) defined within the public class called public.The function start at line 107 and ends at 111. 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..
Sema4AI_actions
PackageData
public
0
0
__init__
def __init__(self, get_base_urls_weak_method: weakref.WeakMethod | None = None) -> None:self._cached_package_data: dict[str, PackageData] = {}self._cached_cloud: dict[str, PackageData] = {}self._last_base_urls: Sequence[str] = ()if get_base_urls_weak_method is None:# use pypi.orgdef get_weak():def get_pypi_url():return...
2
11
2
73
0
98
115
98
self,package_name,info
[]
None
{"AnnAssign": 2, "Assign": 1}
0
5
0
[]
6,243
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.AlertCollector_py.AlertCollector.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.ClusterAlertCollector_py.ClusterAlertCollec...
The function (__init__) defined within the public class called PackageData.The function start at line 98 and ends at 115. It contains 11 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [98.0] and does not return any value. It has 6243.0 functions calling this function which ...
Sema4AI_actions
PyPiCloud
public
0
0
_get_json_from_cloud
def _get_json_from_cloud(self, url: str) -> dict | None:try:return typing.cast(dict, self._cached_cloud[url])except KeyError:passimport jsonimport urllib.requesttry:request = urllib.request.urlopen(urllib.request.Request(url, headers={"User-Agent": "Mozilla"}))if request.status == 200:with request:data = request.read()...
4
24
2
142
0
117
143
117
self,url
[]
dict | None
{"Assign": 3, "Expr": 2, "If": 1, "Return": 4, "Try": 2, "With": 1}
9
27
9
["typing.cast", "urllib.request.urlopen", "urllib.request.Request", "decode", "request.read", "json.loads", "log.info", "log.info", "typing.cast"]
0
[]
The function (_get_json_from_cloud) defined within the public class called PyPiCloud.The function start at line 117 and ends at 143. It contains 24 lines of code and it has a cyclomatic complexity of 4. It takes 2 parameters, represented as [117.0] and does not return any value. It declares 9.0 functions, and It has 9...
Sema4AI_actions
PyPiCloud
public
0
0
get_package_data
def get_package_data(self, package_name: str) -> PackageData | None:get_base_urls = self.get_base_urls_weak_method()if get_base_urls is None:return Nonebase_urls = get_base_urls()if base_urls != self._last_base_urls:# We need to clear packages if urls changed.self._last_base_urls = base_urlsself._cached_package_data.cl...
12
34
2
184
0
145
188
145
self,package_name
[]
PackageData | None
{"Assign": 9, "Expr": 3, "For": 2, "If": 5, "Return": 4, "Try": 3}
10
44
10
["self.get_base_urls_weak_method", "get_base_urls", "self._cached_package_data.clear", "self._cached_cloud.clear", "base_url.endswith", "self._get_json_from_cloud", "PackageData", "isinstance", "releases.items", "package_data.add_release"]
4
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95147348_aboutcode_org_python_inspector.etc.scripts.utils_dejacode_py.create_dejacode_package", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95147348_aboutcode_org_python_inspector.etc.scripts.utils_dejacode_py.fet...
The function (get_package_data) defined within the public class called PyPiCloud.The function start at line 145 and ends at 188. It contains 34 lines of code and it has a cyclomatic complexity of 12. It takes 2 parameters, represented as [145.0] and does not return any value. It declares 10.0 functions, It has 10.0 fun...
Sema4AI_actions
PyPiCloud
public
0
0
get_versions_newer_than
def get_versions_newer_than(self, package_name: str, version: Versions | VersionStr) -> list[VersionStr]:"""Args:package_name: The name of the packageversion: The minimum version (versions returned must be > than this one).Returns:A sorted list containing the versions > than the one passed (the lastentry is the latest ...
4
13
3
76
0
190
215
190
self,package_name,version
[]
list[VersionStr]
{"Assign": 2, "Expr": 1, "If": 2, "Return": 2}
5
26
5
["isinstance", "pip_packaging_version.parse", "self.get_package_data", "sorted", "package_data.iter_versions_newer_than"]
0
[]
The function (get_versions_newer_than) defined within the public class called PyPiCloud.The function start at line 190 and ends at 215. It contains 13 lines of code and it has a cyclomatic complexity of 4. It takes 3 parameters, represented as [190.0] and does not return any value. It declares 5.0 functions, and It ha...
Sema4AI_actions
Channel
public
0
0
__init__
def __init__(self,scheme=None,auth=None,location=None,token=None,name=None,platform=None,package_filename=None,):self.scheme = schemeself.auth = authself.location = locationself.token = tokenself.name = name or ""self.platform = platformself.package_filename = package_filename
2
17
8
71
0
11
27
11
self,scheme,auth,location,token,name,platform,package_filename
[]
None
{"Assign": 7}
0
17
0
[]
6,243
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.AlertCollector_py.AlertCollector.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.ClusterAlertCollector_py.ClusterAlertCollec...
The function (__init__) defined within the public class called Channel.The function start at line 11 and ends at 27. It contains 17 lines of code and it has a cyclomatic complexity of 2. It takes 8 parameters, represented as [11.0] and does not return any value. It has 6243.0 functions calling this function which are [...
Sema4AI_actions
Channel
public
0
0
channel_location
def channel_location(self):return self.location
1
2
1
9
0
30
31
30
self
[]
Returns
{"Return": 1}
0
2
0
[]
0
[]
The function (channel_location) defined within the public class called Channel.The function start at line 30 and ends at 31. 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..
Sema4AI_actions
Channel
public
0
0
channel_name
def channel_name(self):return self.name
1
2
1
9
0
34
35
34
self
[]
Returns
{"Return": 1}
0
2
0
[]
0
[]
The function (channel_name) defined within the public class called Channel.The function start at line 34 and ends at 35. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value..
Sema4AI_actions
Channel
public
0
0
subdir
def subdir(self):return self.platform
1
2
1
9
0
38
39
38
self
[]
Returns
{"Return": 1}
0
2
0
[]
0
[]
The function (subdir) defined within the public class called Channel.The function start at line 38 and ends at 39. 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..
Sema4AI_actions
public
public
0
0
_parse_version_plus_build
def _parse_version_plus_build(v_plus_b):"""This should reliably pull the build string out of a version + build string combo.Examples:>>> _parse_version_plus_build("=1.2.3 0")('=1.2.3', '0')>>> _parse_version_plus_build("1.2.3=0")('1.2.3', '0')>>> _parse_version_plus_build(">=1.0 , < 2.0 py34_0")('>=1.0,<2.0', 'py34_0')...
4
10
1
60
2
45
73
45
v_plus_b
['parts', 'build']
Returns
{"Assign": 4, "Expr": 1, "If": 1, "Return": 1}
4
29
4
["re.search", "parts.groups", "build.strip", "version.replace"]
2
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server.vendored_deps.package_deps.conda_impl.conda_match_spec_py.parse_spec_str", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.comm...
The function (_parse_version_plus_build) defined within the public class called public.The function start at line 45 and ends at 73. It contains 10 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters, and this function return a value. It declares 4.0 functions, It has 4.0 fu...
Sema4AI_actions
public
public
0
0
_parse_legacy_dist
def _parse_legacy_dist(dist_str):"""Examples:>>> _parse_legacy_dist("_license-1.1-py27_1.tar.bz2")('_license', '1.1', 'py27_1')>>> _parse_legacy_dist("_license-1.1-py27_1")('_license', '1.1', 'py27_1')"""from .conda_path import strip_pkg_extensiondist_str, _ = strip_pkg_extension(dist_str)name, version, build = dist_st...
1
5
1
39
0
76
88
76
dist_str
[]
Returns
{"Assign": 2, "Expr": 1, "Return": 1}
2
13
2
["strip_pkg_extension", "dist_str.rsplit"]
2
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server.vendored_deps.package_deps.conda_impl.conda_match_spec_py.parse_spec_str", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.comm...
The function (_parse_legacy_dist) defined within the public class called public.The function start at line 76 and ends at 88. 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 declares 2.0 functions, It has 2.0 functions ...
Sema4AI_actions
public
public
0
0
_parse_channel
def _parse_channel(channel_val):from .conda_channel import Channelif not channel_val:return None, Nonechn = Channel(channel_val)channel_name = chn.name or chn.base_urlreturn channel_name, chn.subdir
3
7
1
39
2
91
98
91
channel_val
['channel_name', 'chn']
Returns
{"Assign": 2, "If": 1, "Return": 2}
1
8
1
["Channel"]
2
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server.vendored_deps.package_deps.conda_impl.conda_match_spec_py.parse_spec_str", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.comm...
The function (_parse_channel) defined within the public class called public.The function start at line 91 and ends at 98. It contains 7 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters, and this function return a value. It declare 1.0 function, It has 1.0 function called ...
Sema4AI_actions
public
public
0
0
parse_spec_str
def parse_spec_str(spec_str):cached_result = _PARSE_CACHE.get(spec_str)if cached_result:return cached_resultimport warningsfrom .conda_channel import Channelfrom .conda_path import expand, is_package_file, url_to_pathfrom .conda_url import is_urloriginal_spec_str = spec_str# pre-step for ugly backward compatif spec_str...
45
151
1
852
24
104
311
104
spec_str
['channel', 'spec_str', 'spec_split', 'feature_name', 'components', 'brackets_str', 'parens', 'm4', 'brackets', 'test_str', 'parens_str', 'cached_result', 'm4b', 'ndx', 'path_or_url', 'result', 'm5', 'original_spec_str', 'subdir', 'version', 'm3', 'm5_len', 'm3b', 'channel_str']
Returns
{"Assign": 59, "Expr": 4, "For": 2, "If": 34, "Return": 5}
45
208
45
["_PARSE_CACHE.get", "spec_str.endswith", "spec_str.index", "spec_str.strip", "spec_str.split", "len", "log.debug", "is_package_file", "is_url", "conda_url.unquote", "conda_url.path_to_url", "expand", "Channel", "_parse_legacy_dist", "spec_str.startswith", "url_to_path", "os.path.basename", "re.match", "m3.groups", "sp...
0
[]
The function (parse_spec_str) defined within the public class called public.The function start at line 104 and ends at 311. It contains 151 lines of code and it has a cyclomatic complexity of 45. The function does not take any parameters, and this function return a value. It declares 45.0 functions, and It has 45.0 fu...
Sema4AI_actions
public
public
0
0
is_path
def is_path(value):if "://" in value:return Falsereturn re.match(PATH_MATCH_REGEX, value)
2
4
1
21
0
40
43
40
value
[]
Returns
{"If": 1, "Return": 2}
1
4
1
["re.match"]
2
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server.vendored_deps.package_deps.conda_impl.conda_path_py.url_to_path", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.common.src.se...
The function (is_path) defined within the public class called public.The function start at line 40 and ends at 43. 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 inside ...
Sema4AI_actions
public
public
0
0
expand
def expand(path):return abspath(expanduser(expandvars(path)))
1
2
1
16
0
46
47
46
path
[]
Returns
{"Return": 1}
3
2
3
["abspath", "expanduser", "expandvars"]
59
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3929039_addok_addok.addok.shell_py.Cmd.do_GEOHASHTOGEOJSON", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3956384_mlbench_mlbench_core.mlbench_core.models.pytorch.gnmt.attention_py.BahdanauAttention.calc_score", "_...
The function (expand) defined within the public class called public.The function start at line 46 and ends at 47. 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 declares 3.0 functions, It has 3.0 functions called insid...
Sema4AI_actions
public
public
0
0
paths_equal
def paths_equal(path1, path2):"""Examples:>>> paths_equal('/a/b/c', '/a/b/c/d/..')True"""if on_win:return normcase(abspath(path1)) == normcase(abspath(path2))else:return abspath(path1) == abspath(path2)
2
5
2
39
0
50
60
50
path1,path2
[]
Returns
{"Expr": 1, "If": 1, "Return": 2}
6
11
6
["normcase", "abspath", "normcase", "abspath", "abspath", "abspath"]
0
[]
The function (paths_equal) defined within the public class called public.The function start at line 50 and ends at 60. It contains 5 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [50.0], and this function return a value. It declares 6.0 functions, and It has 6.0 functions...
Sema4AI_actions
public
public
0
0
url_to_path
def url_to_path(url):"""Convert a file:// URL to a path.Relative file URLs (i.e. `file:relative/path`) are not supported."""if is_path(url):return urlif not url.startswith("file://"):# pragma: no coverraise RuntimeError("You can only turn absolute file: urls into paths (not %s)" % url)_, netloc, path, _, _ = urlsplit(u...
6
18
1
120
2
64
88
64
url
['path', 'netloc']
Returns
{"Assign": 5, "Expr": 1, "If": 5, "Return": 2}
8
25
8
["is_path", "url.startswith", "RuntimeError", "urlsplit", "percent_decode", "netloc.startswith", "re.match", "lru_cache"]
7
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3931678_tschellenbach_django_facebook.docs.docs_env.Lib.site_packages.pip_1_0_py2_5_egg.pip.download_py.unpack_file_url", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3931678_tschellenbach_django_facebook.docs.docs...
The function (url_to_path) defined within the public class called public.The function start at line 64 and ends at 88. It contains 18 lines of code and it has a cyclomatic complexity of 6. The function does not take any parameters, and this function return a value. It declares 8.0 functions, It has 8.0 functions called...
Sema4AI_actions
public
public
0
0
tokenized_startswith
def tokenized_startswith(test_iterable, startswith_iterable):return all(t == sw for t, sw in zip(test_iterable, startswith_iterable))
2
2
2
25
0
91
92
91
test_iterable,startswith_iterable
[]
Returns
{"Return": 1}
2
2
2
["all", "zip"]
0
[]
The function (tokenized_startswith) defined within the public class called public.The function start at line 91 and ends at 92. It contains 2 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [91.0], and this function return a value. It declares 2.0 functions, and It has 2.0 ...
Sema4AI_actions
public
public
0
0
pyc_path
def pyc_path(py_path, python_major_minor_version):"""This must not return backslashes on Windows as that will breaktests and leads to an eventual need to make url_to_path returnbackslashes too and that may end up changing files on disc orto the result of comparisons with the contents of them."""pyver_string = python_ma...
3
11
2
73
2
95
111
95
py_path,python_major_minor_version
['pyc_file', 'pyver_string']
Returns
{"Assign": 4, "Expr": 1, "If": 1, "Return": 2}
5
17
5
["python_major_minor_version.replace", "pyver_string.startswith", "split", "splitext", "format"]
2
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server.vendored_deps.package_deps.conda_impl.conda_path_py.missing_pyc_files", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.common....
The function (pyc_path) defined within the public class called public.The function start at line 95 and ends at 111. It contains 11 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [95.0], and this function return a value. It declares 5.0 functions, It has 5.0 functions calle...
Sema4AI_actions
public
public
0
0
missing_pyc_files
def missing_pyc_files(python_major_minor_version, files):# returns a tuple of tuples, with the inner tuple being the .py file and the missing .pyc filepy_files = (f for f in files if f.endswith(".py"))pyc_matches = ((py_file, pyc_path(py_file, python_major_minor_version)) for py_file in py_files)result = tuple(match fo...
6
7
2
61
3
114
121
114
python_major_minor_version,files
['result', 'pyc_matches', 'py_files']
Returns
{"Assign": 3, "Return": 1}
3
8
3
["f.endswith", "pyc_path", "tuple"]
0
[]
The function (missing_pyc_files) defined within the public class called public.The function start at line 114 and ends at 121. It contains 7 lines of code and it has a cyclomatic complexity of 6. It takes 2 parameters, represented as [114.0], and this function return a value. It declares 3.0 functions, and It has 3.0 ...
Sema4AI_actions
public
public
0
0
parse_entry_point_def
def parse_entry_point_def(ep_definition):cmd_mod, func = ep_definition.rsplit(":", 1)command, module = cmd_mod.rsplit("=", 1)command, module, func = command.strip(), module.strip(), func.strip()return command, module, func
1
5
1
58
0
124
128
124
ep_definition
[]
Returns
{"Assign": 3, "Return": 1}
5
5
5
["ep_definition.rsplit", "cmd_mod.rsplit", "command.strip", "module.strip", "func.strip"]
0
[]
The function (parse_entry_point_def) defined within the public class called public.The function start at line 124 and ends at 128. 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 declares 5.0 functions, and It has 5.0 ...