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
InfinityType
public
0
0
__eq__
def __eq__(self, other: object) -> bool:return isinstance(other, self.__class__)
1
2
2
20
0
19
20
19
self,other
[]
bool
{"Return": 1}
1
2
1
["isinstance"]
48
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3544475_chromium_web_page_replay.third_party.dns.rdataset_py.Rdataset.__eq__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3544475_chromium_web_page_replay.third_party.dns.rrset_py.RRset.__eq__", "_.content.gdrive...
The function (__eq__) defined within the public class called InfinityType.The function start at line 19 and ends at 20. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [19.0] and does not return any value. It declare 1.0 function, It has 1.0 function called ins...
Sema4AI_actions
InfinityType
public
0
0
__gt__
def __gt__(self, other: object) -> bool:return True
1
2
2
13
0
22
23
22
self,other
[]
bool
{"Return": 1}
0
2
0
[]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95100531_dfxml_working_group_dfxml_python.dfxml.__init___py.dftime.__gt__"]
The function (__gt__) defined within the public class called InfinityType.The function start at line 22 and ends at 23. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [22.0] and does not return any value. It has 1.0 function calling this function which is ["_....
Sema4AI_actions
InfinityType
public
0
0
__ge__
def __ge__(self, other: object) -> bool:return True
1
2
2
13
0
25
26
25
self,other
[]
bool
{"Return": 1}
0
2
0
[]
0
[]
The function (__ge__) defined within the public class called InfinityType.The function start at line 25 and ends at 26. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [25.0] and does not return any value..
Sema4AI_actions
InfinityType
public
0
0
__neg__
def __neg__(self: object) -> "NegativeInfinityType":return NegativeInfinity
1
2
1
11
0
28
29
28
self
[]
'NegativeInfinityType'
{"Return": 1}
0
2
0
[]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3962662_django_money_django_money.djmoney.money_py.Money.__neg__"]
The function (__neg__) defined within the public class called InfinityType.The function start at line 28 and ends at 29. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It has 1.0 function calling this function which is ["_.co...
Sema4AI_actions
InfinityType
public
0
0
__repr__
def __repr__(self) -> str:return "Infinity"
1
2
1
9
0
36
37
7
self
[]
str
{"Return": 1}
0
2
0
[]
54
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3581153_zetaops_pyoko.pyoko.listnode_py.ListNode.__repr__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3585282_geier_pycarddav.pycarddav.model_py.VCard.serialize", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Cre...
The function (__repr__) defined within the public class called InfinityType.The function start at line 36 and ends at 37. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It has 54.0 functions calling this function which are ["...
Sema4AI_actions
InfinityType
public
0
0
__hash__
def __hash__(self) -> int:return hash(repr(self))
1
2
1
15
0
39
40
10
self
[]
int
{"Return": 1}
2
2
2
["hash", "repr"]
5
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.target_postgres.json_schema_py.Cachable.__hash__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3955243_msiemens_tinydb.tinydb.queries_py.Query.__hash__", "_.content.gdrive.MyDri...
The function (__hash__) defined within the public class called InfinityType.The function start at line 39 and ends at 40. 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 declares 2.0 functions, It has 2.0 functions called i...
Sema4AI_actions
InfinityType
public
0
0
__lt__
def __lt__(self, other: object) -> bool:return False
1
2
2
13
0
42
43
13
self,other
[]
bool
{"Return": 1}
0
2
0
[]
0
[]
The function (__lt__) defined within the public class called InfinityType.The function start at line 42 and ends at 43. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [13.0] and does not return any value..
Sema4AI_actions
InfinityType
public
0
0
__le__
def __le__(self, other: object) -> bool:return False
1
2
2
13
0
45
46
16
self,other
[]
bool
{"Return": 1}
0
2
0
[]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95100531_dfxml_working_group_dfxml_python.dfxml.__init___py.dftime.__le__"]
The function (__le__) defined within the public class called InfinityType.The function start at line 45 and ends at 46. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [16.0] and does not return any value. It has 1.0 function calling this function which is ["_....
Sema4AI_actions
InfinityType
public
0
0
__eq__
def __eq__(self, other: object) -> bool:return isinstance(other, self.__class__)
1
2
2
20
0
48
49
19
self,other
[]
bool
{"Return": 1}
1
2
1
["isinstance"]
48
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3544475_chromium_web_page_replay.third_party.dns.rdataset_py.Rdataset.__eq__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3544475_chromium_web_page_replay.third_party.dns.rrset_py.RRset.__eq__", "_.content.gdrive...
The function (__eq__) defined within the public class called InfinityType.The function start at line 48 and ends at 49. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [19.0] and does not return any value. It declare 1.0 function, It has 1.0 function called ins...
Sema4AI_actions
InfinityType
public
0
0
__gt__
def __gt__(self, other: object) -> bool:return True
1
2
2
13
0
51
52
22
self,other
[]
bool
{"Return": 1}
0
2
0
[]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95100531_dfxml_working_group_dfxml_python.dfxml.__init___py.dftime.__gt__"]
The function (__gt__) defined within the public class called InfinityType.The function start at line 51 and ends at 52. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [22.0] and does not return any value. It has 1.0 function calling this function which is ["_....
Sema4AI_actions
InfinityType
public
0
0
__ge__
def __ge__(self, other: object) -> bool:return True
1
2
2
13
0
54
55
25
self,other
[]
bool
{"Return": 1}
0
2
0
[]
0
[]
The function (__ge__) defined within the public class called InfinityType.The function start at line 54 and ends at 55. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [25.0] and does not return any value..
Sema4AI_actions
InfinityType
public
0
0
__neg__
def __neg__(self: object) -> "NegativeInfinityType":return NegativeInfinity
1
2
1
11
0
57
58
28
self
[]
'NegativeInfinityType'
{"Return": 1}
0
2
0
[]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3962662_django_money_django_money.djmoney.money_py.Money.__neg__"]
The function (__neg__) defined within the public class called InfinityType.The function start at line 57 and ends at 58. 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 1.0 function calling this function which is ["_.co...
Sema4AI_actions
public
public
0
0
parse
def parse(version: str) -> Union["LegacyVersion", "Version"]:"""Parse the given version string and return either a :class:`Version` objector a :class:`LegacyVersion` object depending on if the given version isa valid PEP 440 version or a legacy version."""try:return Version(version)except InvalidVersion:return LegacyVe...
2
5
1
30
0
48
57
48
version
[]
Union['LegacyVersion', 'Version']
{"Expr": 1, "Return": 2, "Try": 1}
2
10
2
["Version", "LegacyVersion"]
255
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3511986_dart_archive_pub_dartlang.app.dateutil.parser_py.parse", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3535344_amarian12_e_pool_net.p2pool.bitcoin.script_py.get_sigop_count", "_.content.gdrive.MyDrive.Phd_Th...
The function (parse) defined within the public class called public.The function start at line 48 and ends at 57. It contains 5 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 2.0 functions, It has 2.0 functions called inside whi...
Sema4AI_actions
_BaseVersion
protected
0
0
__hash__
def __hash__(self) -> int:return hash(self._key)
1
2
1
14
0
69
70
69
self
[]
int
{"Return": 1}
1
2
1
["hash"]
5
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3683022_datamill_co_target_postgres.target_postgres.json_schema_py.Cachable.__hash__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3955243_msiemens_tinydb.tinydb.queries_py.Query.__hash__", "_.content.gdrive.MyDri...
The function (__hash__) defined within the protected class called _BaseVersion.The function start at line 69 and ends at 70. 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
_BaseVersion
protected
0
0
__lt__
def __lt__(self, other: "_BaseVersion") -> bool:if not isinstance(other, _BaseVersion):return NotImplementedreturn self._key < other._key
2
4
2
30
0
75
79
75
self,other
[]
bool
{"If": 1, "Return": 2}
1
5
1
["isinstance"]
0
[]
The function (__lt__) defined within the protected class called _BaseVersion.The function start at line 75 and ends at 79. It contains 4 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [75.0] and does not return any value. It declare 1.0 function, and It has 1.0 function ca...
Sema4AI_actions
_BaseVersion
protected
0
0
__le__
def __le__(self, other: "_BaseVersion") -> bool:if not isinstance(other, _BaseVersion):return NotImplementedreturn self._key <= other._key
2
4
2
30
0
81
85
81
self,other
[]
bool
{"If": 1, "Return": 2}
1
5
1
["isinstance"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95100531_dfxml_working_group_dfxml_python.dfxml.__init___py.dftime.__le__"]
The function (__le__) defined within the protected class called _BaseVersion.The function start at line 81 and ends at 85. It contains 4 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [81.0] and does not return any value. It declare 1.0 function, It has 1.0 function called ...
Sema4AI_actions
_BaseVersion
protected
0
0
__eq__
def __eq__(self, other: object) -> bool:if not isinstance(other, _BaseVersion):return NotImplementedreturn self._key == other._key
2
4
2
30
0
87
91
87
self,other
[]
bool
{"If": 1, "Return": 2}
1
5
1
["isinstance"]
48
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3544475_chromium_web_page_replay.third_party.dns.rdataset_py.Rdataset.__eq__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3544475_chromium_web_page_replay.third_party.dns.rrset_py.RRset.__eq__", "_.content.gdrive...
The function (__eq__) defined within the protected class called _BaseVersion.The function start at line 87 and ends at 91. It contains 4 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [87.0] and does not return any value. It declare 1.0 function, It has 1.0 function called ...
Sema4AI_actions
_BaseVersion
protected
0
0
__ge__
def __ge__(self, other: "_BaseVersion") -> bool:if not isinstance(other, _BaseVersion):return NotImplementedreturn self._key >= other._key
2
4
2
30
0
93
97
93
self,other
[]
bool
{"If": 1, "Return": 2}
1
5
1
["isinstance"]
0
[]
The function (__ge__) defined within the protected class called _BaseVersion.The function start at line 93 and ends at 97. It contains 4 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [93.0] and does not return any value. It declare 1.0 function, and It has 1.0 function ca...
Sema4AI_actions
_BaseVersion
protected
0
0
__gt__
def __gt__(self, other: "_BaseVersion") -> bool:if not isinstance(other, _BaseVersion):return NotImplementedreturn self._key > other._key
2
4
2
30
0
99
103
99
self,other
[]
bool
{"If": 1, "Return": 2}
1
5
1
["isinstance"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95100531_dfxml_working_group_dfxml_python.dfxml.__init___py.dftime.__gt__"]
The function (__gt__) defined within the protected class called _BaseVersion.The function start at line 99 and ends at 103. It contains 4 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [99.0] and does not return any value. It declare 1.0 function, It has 1.0 function called...
Sema4AI_actions
_BaseVersion
protected
0
0
__ne__
def __ne__(self, other: object) -> bool:if not isinstance(other, _BaseVersion):return NotImplementedreturn self._key != other._key
2
4
2
30
0
105
109
105
self,other
[]
bool
{"If": 1, "Return": 2}
1
5
1
["isinstance"]
6
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3561619_pymysql_tornado_mysql.tornado_mysql.__init___py.DBAPISet.__ne__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3630821_adamlwgriffiths_pyrr.pyrr.objects.matrix33_py.Matrix33.__ne__", "_.content.gdrive.MyDri...
The function (__ne__) defined within the protected class called _BaseVersion.The function start at line 105 and ends at 109. It contains 4 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [105.0] and does not return any value. It declare 1.0 function, It has 1.0 function call...
Sema4AI_actions
LegacyVersion
public
0
1
__init__
def __init__(self, version: str) -> None:self._version = str(version)self._key = _legacy_cmpkey(self._version)warnings.warn("Creating a LegacyVersion has been deprecated and will be ""removed in the next major release",DeprecationWarning,)
1
8
2
39
0
113
121
113
self,version
[]
None
{"Assign": 2, "Expr": 1}
3
9
3
["str", "_legacy_cmpkey", "warnings.warn"]
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 LegacyVersion, that inherit another class.The function start at line 113 and ends at 121. It contains 8 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [113.0] and does not return any value. It declares 3.0 funct...
Sema4AI_actions
LegacyVersion
public
0
1
__str__
def __str__(self) -> str:return self._version
1
2
1
11
0
123
124
123
self
[]
str
{"Return": 1}
0
2
0
[]
83
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3675814_usyd_blockchain_vandal.src.evm_cfg_py.EVMBasicBlock.__str__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3675814_usyd_blockchain_vandal.src.tac_cfg_py.TACBasicBlock.__str__", "_.content.gdrive.MyDrive.Phd...
The function (__str__) defined within the public class called LegacyVersion, that inherit another class.The function start at line 123 and ends at 124. 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 83.0 functions call...
Sema4AI_actions
LegacyVersion
public
0
1
__repr__
def __repr__(self) -> str:return f"<LegacyVersion('{self}')>"
1
2
1
10
0
126
127
126
self
[]
str
{"Return": 1}
0
2
0
[]
54
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3581153_zetaops_pyoko.pyoko.listnode_py.ListNode.__repr__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3585282_geier_pycarddav.pycarddav.model_py.VCard.serialize", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Cre...
The function (__repr__) defined within the public class called LegacyVersion, that inherit another class.The function start at line 126 and ends at 127. 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 54.0 functions cal...
Sema4AI_actions
LegacyVersion
public
0
1
public
def public(self) -> str:return self._version
1
2
1
11
0
130
131
130
self
[]
str
{"Return": 1}
0
2
0
[]
16
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69965341_torchbox_wagtail_grapple.grapple.helpers_py.register_paginated_query_field", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69965341_torchbox_wagtail_grapple.grapple.helpers_py.register_query_field", "_.cont...
The function (public) defined within the public class called LegacyVersion, that inherit another class.The function start at line 130 and ends at 131. 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 16.0 functions calli...
Sema4AI_actions
LegacyVersion
public
0
1
base_version
def base_version(self) -> str:return self._version
1
2
1
11
0
134
135
134
self
[]
str
{"Return": 1}
0
2
0
[]
0
[]
The function (base_version) defined within the public class called LegacyVersion, that inherit another class.The function start at line 134 and ends at 135. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
Sema4AI_actions
LegacyVersion
public
0
1
epoch
def epoch(self) -> int:return -1
1
2
1
10
0
138
139
138
self
[]
int
{"Return": 1}
0
2
0
[]
0
[]
The function (epoch) defined within the public class called LegacyVersion, that inherit another class.The function start at line 138 and ends at 139. 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
LegacyVersion
public
0
1
release
def release(self) -> None:return None
1
2
1
9
0
142
143
142
self
[]
None
{"Return": 1}
0
2
0
[]
12
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3511986_dart_archive_pub_dartlang.app.dateutil.rrule_py.rrulebase._iter_cached", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3511986_dart_archive_pub_dartlang.third_party.cherrypy.lib.sessions_py.MemcachedSession....
The function (release) defined within the public class called LegacyVersion, that inherit another class.The function start at line 142 and ends at 143. 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 12.0 functions call...
Sema4AI_actions
LegacyVersion
public
0
1
pre
def pre(self) -> None:return None
1
2
1
9
0
146
147
146
self
[]
None
{"Return": 1}
0
2
0
[]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69411822_minjunkimkr_154algoritm_5weeks.Eastar_DS.1_23_1_31.Graph_py.pre"]
The function (pre) defined within the public class called LegacyVersion, that inherit another class.The function start at line 146 and ends at 147. 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 1.0 function calling th...
Sema4AI_actions
LegacyVersion
public
0
1
post
def post(self) -> None:return None
1
2
1
9
0
150
151
150
self
[]
None
{"Return": 1}
0
2
0
[]
37
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3572820_fusionbox_django_argonauts.test_argonauts_py.TestJsonResponseMixin.test_decode", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3650710_avinashreddy3108_paperplaneextended.userbot.modules.dogbin_py.paste", "_...
The function (post) defined within the public class called LegacyVersion, that inherit another class.The function start at line 150 and ends at 151. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It has 37.0 functions calling...
Sema4AI_actions
LegacyVersion
public
0
1
dev
def dev(self) -> None:return None
1
2
1
9
0
154
155
154
self
[]
None
{"Return": 1}
0
2
0
[]
0
[]
The function (dev) defined within the public class called LegacyVersion, that inherit another class.The function start at line 154 and ends at 155. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
Sema4AI_actions
LegacyVersion
public
0
1
local
def local(self) -> None:return None
1
2
1
9
0
158
159
158
self
[]
None
{"Return": 1}
0
2
0
[]
5
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3931678_tschellenbach_django_facebook.fabfile_py.clean", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3931678_tschellenbach_django_facebook.fabfile_py.docs", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Ou...
The function (local) defined within the public class called LegacyVersion, that inherit another class.The function start at line 158 and ends at 159. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It has 5.0 functions calling...
Sema4AI_actions
LegacyVersion
public
0
1
is_prerelease
def is_prerelease(self) -> bool:return False
1
2
1
9
0
162
163
162
self
[]
bool
{"Return": 1}
0
2
0
[]
0
[]
The function (is_prerelease) defined within the public class called LegacyVersion, that inherit another class.The function start at line 162 and ends at 163. 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
LegacyVersion
public
0
1
is_postrelease
def is_postrelease(self) -> bool:return False
1
2
1
9
0
166
167
166
self
[]
bool
{"Return": 1}
0
2
0
[]
0
[]
The function (is_postrelease) defined within the public class called LegacyVersion, that inherit another class.The function start at line 166 and ends at 167. 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
LegacyVersion
public
0
1
is_devrelease
def is_devrelease(self) -> bool:return False
1
2
1
9
0
170
171
170
self
[]
bool
{"Return": 1}
0
2
0
[]
0
[]
The function (is_devrelease) defined within the public class called LegacyVersion, that inherit another class.The function start at line 170 and ends at 171. 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
_parse_version_parts
def _parse_version_parts(s: str) -> Iterator[str]:for part in _legacy_version_component_re.split(s):part = _legacy_version_replacement_map.get(part, part)if not part or part == ".":continueif part[:1] in "0123456789":# pad for numeric comparisonyield part.zfill(8)else:yield "*" + part# ensure that alpha/beta/candidate ...
5
10
1
65
1
185
199
185
s
['part']
Iterator[str]
{"Assign": 1, "Expr": 3, "For": 1, "If": 2}
3
15
3
["_legacy_version_component_re.split", "_legacy_version_replacement_map.get", "part.zfill"]
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.pip_impl.pip_packaging_version_py._legacy_cmpkey", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.c...
The function (_parse_version_parts) defined within the public class called public.The function start at line 185 and ends at 199. It contains 10 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, It has 3.0 functions...
Sema4AI_actions
public
public
0
0
_legacy_cmpkey
def _legacy_cmpkey(version: str) -> LegacyCmpKey:# We hardcode an epoch of -1 here. A PEP 440 version can only have a epoch# greater than or equal to 0. This will effectively put the LegacyVersion,# which uses the defacto standard originally implemented by setuptools,# as before all PEP 440 versions.epoch = -1# This sc...
8
12
1
92
1
202
225
202
version
['epoch']
LegacyCmpKey
{"AnnAssign": 1, "Assign": 1, "Expr": 3, "For": 1, "If": 2, "Return": 1, "While": 2}
7
24
7
["_parse_version_parts", "version.lower", "part.startswith", "parts.pop", "parts.pop", "parts.append", "tuple"]
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.pip_impl.pip_packaging_version_py.LegacyVersion.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_a...
The function (_legacy_cmpkey) defined within the public class called public.The function start at line 202 and ends at 225. It contains 12 lines of code and it has a cyclomatic complexity of 8. The function does not take any parameters and does not return any value. It declares 7.0 functions, It has 7.0 functions calle...
Sema4AI_actions
LegacyVersion
public
0
1
__init__
def __init__(self, version: str) -> None:# Validate the version and parse it into piecesmatch = self._regex.search(version)if not match:raise InvalidVersion(f"Invalid version: '{version}'")# Store the parsed out pieces of the versionself._version = _Version(epoch=int(match.group("epoch")) if match.group("epoch") else 0...
5
22
2
202
0
265
291
265
self,version
[]
None
{"Assign": 2, "Expr": 1}
3
9
3
["str", "_legacy_cmpkey", "warnings.warn"]
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 LegacyVersion, that inherit another class.The function start at line 265 and ends at 291. It contains 22 lines of code and it has a cyclomatic complexity of 5. It takes 2 parameters, represented as [265.0] and does not return any value. It declares 3.0 func...
Sema4AI_actions
LegacyVersion
public
0
1
__repr__
def __repr__(self) -> str:return f"<LegacyVersion('{self}')>"
1
2
1
10
0
293
294
126
self
[]
str
{"Return": 1}
0
2
0
[]
54
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3581153_zetaops_pyoko.pyoko.listnode_py.ListNode.__repr__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3585282_geier_pycarddav.pycarddav.model_py.VCard.serialize", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Cre...
The function (__repr__) defined within the public class called LegacyVersion, that inherit another class.The function start at line 293 and ends at 294. 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 54.0 functions cal...
Sema4AI_actions
LegacyVersion
public
0
1
__str__
def __str__(self) -> str:parts = []# Epochif self.epoch != 0:parts.append(f"{self.epoch}!")# Release segmentparts.append(".".join(str(x) for x in self.release))# Pre-releaseif self.pre is not None:parts.append("".join(str(x) for x in self.pre))# Post-releaseif self.post is not None:parts.append(f".post{self.post}")# De...
8
14
1
125
0
296
322
296
self
[]
str
{"Return": 1}
0
2
0
[]
83
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3675814_usyd_blockchain_vandal.src.evm_cfg_py.EVMBasicBlock.__str__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3675814_usyd_blockchain_vandal.src.tac_cfg_py.TACBasicBlock.__str__", "_.content.gdrive.MyDrive.Phd...
The function (__str__) defined within the public class called LegacyVersion, that inherit another class.The function start at line 296 and ends at 322. It contains 14 lines of code and it has a cyclomatic complexity of 8. The function does not take any parameters and does not return any value. It has 83.0 functions cal...
Sema4AI_actions
LegacyVersion
public
0
1
epoch
def epoch(self) -> int:_epoch: int = self._version.epochreturn _epoch
1
3
1
18
0
325
327
325
self
[]
int
{"Return": 1}
0
2
0
[]
0
[]
The function (epoch) defined within the public class called LegacyVersion, that inherit another class.The function start at line 325 and ends at 327. 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
LegacyVersion
public
0
1
release
def release(self) -> tuple[int, ...]:_release: tuple[int, ...] = self._version.releasereturn _release
1
3
1
28
0
330
332
330
self
[]
None
{"Return": 1}
0
2
0
[]
12
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3511986_dart_archive_pub_dartlang.app.dateutil.rrule_py.rrulebase._iter_cached", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3511986_dart_archive_pub_dartlang.third_party.cherrypy.lib.sessions_py.MemcachedSession....
The function (release) defined within the public class called LegacyVersion, that inherit another class.The function start at line 330 and ends at 332. 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 has 12.0 functions call...
Sema4AI_actions
LegacyVersion
public
0
1
pre
def pre(self) -> tuple[str, int] | None:_pre: tuple[str, int] | None = self._version.prereturn _pre
1
3
1
32
0
335
337
335
self
[]
None
{"Return": 1}
0
2
0
[]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69411822_minjunkimkr_154algoritm_5weeks.Eastar_DS.1_23_1_31.Graph_py.pre"]
The function (pre) defined within the public class called LegacyVersion, that inherit another class.The function start at line 335 and ends at 337. 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 has 1.0 function calling th...
Sema4AI_actions
LegacyVersion
public
0
1
post
def post(self) -> int | None:return self._version.post[1] if self._version.post else None
2
2
1
26
0
340
341
340
self
[]
None
{"Return": 1}
0
2
0
[]
37
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3572820_fusionbox_django_argonauts.test_argonauts_py.TestJsonResponseMixin.test_decode", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3650710_avinashreddy3108_paperplaneextended.userbot.modules.dogbin_py.paste", "_...
The function (post) defined within the public class called LegacyVersion, that inherit another class.The function start at line 340 and ends at 341. It contains 2 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It has 37.0 functions calling...
Sema4AI_actions
LegacyVersion
public
0
1
dev
def dev(self) -> int | None:return self._version.dev[1] if self._version.dev else None
2
2
1
26
0
344
345
344
self
[]
None
{"Return": 1}
0
2
0
[]
0
[]
The function (dev) defined within the public class called LegacyVersion, that inherit another class.The function start at line 344 and ends at 345. It contains 2 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value..
Sema4AI_actions
LegacyVersion
public
0
1
local
def local(self) -> str | None:if self._version.local:return ".".join(str(x) for x in self._version.local)else:return None
3
5
1
38
0
348
352
348
self
[]
None
{"Return": 1}
0
2
0
[]
5
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3931678_tschellenbach_django_facebook.fabfile_py.clean", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3931678_tschellenbach_django_facebook.fabfile_py.docs", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Ou...
The function (local) defined within the public class called LegacyVersion, that inherit another class.The function start at line 348 and ends at 352. It contains 5 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 has 5.0 functions calling...
Sema4AI_actions
LegacyVersion
public
0
1
public
def public(self) -> str:return str(self).split("+", 1)[0]
1
2
1
22
0
355
356
355
self
[]
str
{"Return": 1}
0
2
0
[]
16
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69965341_torchbox_wagtail_grapple.grapple.helpers_py.register_paginated_query_field", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69965341_torchbox_wagtail_grapple.grapple.helpers_py.register_query_field", "_.cont...
The function (public) defined within the public class called LegacyVersion, that inherit another class.The function start at line 355 and ends at 356. 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 16.0 functions calli...
Sema4AI_actions
LegacyVersion
public
0
1
base_version
def base_version(self) -> str:parts = []# Epochif self.epoch != 0:parts.append(f"{self.epoch}!")# Release segmentparts.append(".".join(str(x) for x in self.release))return "".join(parts)
3
6
1
52
0
359
369
359
self
[]
str
{"Return": 1}
0
2
0
[]
0
[]
The function (base_version) defined within the public class called LegacyVersion, that inherit another class.The function start at line 359 and ends at 369. It contains 6 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value..
Sema4AI_actions
LegacyVersion
public
0
1
is_prerelease
def is_prerelease(self) -> bool:return self.dev is not None or self.pre is not None
2
2
1
21
0
372
373
372
self
[]
bool
{"Return": 1}
0
2
0
[]
0
[]
The function (is_prerelease) defined within the public class called LegacyVersion, that inherit another class.The function start at line 372 and ends at 373. It contains 2 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value..
Sema4AI_actions
LegacyVersion
public
0
1
is_postrelease
def is_postrelease(self) -> bool:return self.post is not None
1
2
1
14
0
376
377
376
self
[]
bool
{"Return": 1}
0
2
0
[]
0
[]
The function (is_postrelease) defined within the public class called LegacyVersion, that inherit another class.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..
Sema4AI_actions
LegacyVersion
public
0
1
is_devrelease
def is_devrelease(self) -> bool:return self.dev is not None
1
2
1
14
0
380
381
380
self
[]
bool
{"Return": 1}
0
2
0
[]
0
[]
The function (is_devrelease) defined within the public class called LegacyVersion, that inherit another class.The function start at line 380 and ends at 381. 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
Version
public
0
1
major
def major(self) -> int:return self.release[0] if len(self.release) >= 1 else 0
2
2
1
25
0
384
385
384
self
[]
int
{"Return": 1}
1
2
1
["len"]
0
[]
The function (major) defined within the public class called Version, that inherit another class.The function start at line 384 and ends at 385. It contains 2 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declare 1.0 function, and It h...
Sema4AI_actions
Version
public
0
1
minor
def minor(self) -> int:return self.release[1] if len(self.release) >= 2 else 0
2
2
1
25
0
388
389
388
self
[]
int
{"Return": 1}
1
2
1
["len"]
0
[]
The function (minor) defined within the public class called Version, that inherit another class.The function start at line 388 and ends at 389. It contains 2 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declare 1.0 function, and It h...
Sema4AI_actions
Version
public
0
1
micro
def micro(self) -> int:return self.release[2] if len(self.release) >= 3 else 0
2
2
1
25
0
392
393
392
self
[]
int
{"Return": 1}
1
2
1
["len"]
0
[]
The function (micro) defined within the public class called Version, that inherit another class.The function start at line 392 and ends at 393. It contains 2 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declare 1.0 function, and It h...
Sema4AI_actions
public
public
0
0
_parse_letter_version
def _parse_letter_version(letter: str, number: str | bytes | SupportsInt) -> tuple[str, int] | None:if letter:# We consider there to be an implicit 0 in a pre-release if there is# not a numeral associated with it.if number is None:number = 0# We normalize any letters to their lower case formletter = letter.lower()# We ...
9
20
2
109
2
396
428
396
letter,number
['letter', 'number']
tuple[str, int] | None
{"Assign": 7, "If": 7, "Return": 3}
3
33
3
["letter.lower", "int", "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.pip_impl.pip_packaging_version_py.Version.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions...
The function (_parse_letter_version) defined within the public class called public.The function start at line 396 and ends at 428. It contains 20 lines of code and it has a cyclomatic complexity of 9. It takes 2 parameters, represented as [396.0] and does not return any value. It declares 3.0 functions, It has 3.0 func...
Sema4AI_actions
public
public
0
0
_parse_local_version
def _parse_local_version(local: str) -> LocalType | None:"""Takes a string like abc.1.twelve and turns it into ("abc", 1, "twelve")."""if local is not None:return tuple(part.lower() if not part.isdigit() else int(part)for part in _local_version_separators.split(local))return None
4
7
1
50
0
434
443
434
local
[]
LocalType | None
{"Expr": 1, "If": 1, "Return": 2}
5
10
5
["tuple", "part.isdigit", "part.lower", "int", "_local_version_separators.split"]
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.pip_impl.pip_packaging_version_py.Version.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions...
The function (_parse_local_version) defined within the public class called public.The function start at line 434 and ends at 443. It contains 7 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 5.0 functions, It has 5.0 functions ...
Sema4AI_actions
public
public
0
0
_cmpkey
def _cmpkey(epoch: int,release: tuple[int, ...],pre: tuple[str, int] | None,post: tuple[str, int] | None,dev: tuple[str, int] | None,local: tuple[SubLocalType] | None,) -> CmpKey:# When we compare a release version, we want to compare it with all of the# trailing zeros removed. So we'll use a reverse the list, drop all...
10
32
6
201
5
446
505
446
epoch,release,pre,post,dev,local
['_local', '_post', '_dev', '_release', '_pre']
CmpKey
{"AnnAssign": 4, "Assign": 6, "If": 5, "Return": 1}
7
60
7
["tuple", "reversed", "list", "itertools.dropwhile", "reversed", "tuple", "isinstance"]
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.pip_impl.pip_packaging_version_py.Version.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions...
The function (_cmpkey) defined within the public class called public.The function start at line 446 and ends at 505. It contains 32 lines of code and it has a cyclomatic complexity of 10. It takes 6 parameters, represented as [446.0] and does not return any value. It declares 7.0 functions, It has 7.0 functions called ...
Sema4AI_actions
public
public
0
0
_noop
def _noop(msg):return msg
1
2
1
7
0
5
6
5
null
[]
None
null
0
0
0
null
0
null
The function (_noop) defined within the public class called public.The function start at line 5 and ends at 6. 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
bold_yellow
def bold_yellow(msg):return colored(msg, color="yellow", attrs=["bold"])
1
2
1
20
0
13
14
13
null
[]
None
null
0
0
0
null
0
null
The function (bold_yellow) defined within the public class called public.The function start at line 13 and ends at 14. 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
bold_red
def bold_red(msg):return colored(msg, color="red", attrs=["bold"])
1
2
1
20
0
16
17
16
null
[]
None
null
0
0
0
null
0
null
The function (bold_red) defined within the public class called public.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 does not return any value..
Sema4AI_actions
public
public
0
0
bold
def bold(msg):return colored(msg, attrs=["bold"])
1
2
1
16
0
19
20
19
null
[]
None
null
0
0
0
null
0
null
The function (bold) defined within the public class called public.The function start at line 19 and ends at 20. 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
test_obtain_app_mutex.on_output
def on_output(line):nonlocal pid_lineif line.startswith("Current process PID: "):pid_line = lineoutput.write(line)
2
5
1
24
0
72
76
72
null
[]
None
null
0
0
0
null
0
null
The function (test_obtain_app_mutex.on_output) defined within the public class called public.The function start at line 72 and ends at 76. 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..
Sema4AI_actions
public
public
0
0
test_obtain_app_mutex.other_process_has_mutex
def other_process_has_mutex():import osif pid_line is None:return "Waiting for PID line. Found output:\n" + output.getvalue()other_process_pid = int(pid_line.split(":")[1].strip())lock_file = Path(tmpdir) / lock_basenameif not lock_file.exists():return f"Lock file does not exist: {lock_file!r}"if not process_holding_lo...
5
14
0
85
0
82
100
82
null
[]
None
null
0
0
0
null
0
null
The function (test_obtain_app_mutex.other_process_has_mutex) defined within the public class called public.The function start at line 82 and ends at 100. It contains 14 lines of code and it has a cyclomatic complexity of 5. The function does not take any parameters and does not return any value..
Sema4AI_actions
public
public
0
0
test_obtain_app_mutex
def test_obtain_app_mutex(tmpdir):import sysfrom pathlib import Pathfrom sema4ai.common.app_mutex import obtain_app_mutexfrom sema4ai.common.process import Processfrom sema4ai.common.wait_for import wait_for_expected_func_returnlock_basename = "test_app_locked_startup.lock"mutex = obtain_app_mutex(kill_lock_holder=True...
2
62
1
295
11
1
120
1
tmpdir
['output', 'lock_file', 'pid_line', 'code', 'mutex2', 'cmdline', 'lock_basename', 'mutex', 'other_process_pid', 'process_holding_lock', 'contents']
Returns
{"Assign": 14, "Expr": 6, "If": 5, "Return": 5, "Try": 1}
30
120
30
["obtain_app_mutex", "Path", "obtain_app_mutex", "Path", "obtain_app_mutex", "Path", "str", "str", "Process", "io.StringIO", "line.startswith", "output.write", "process_holding_lock.on_stdout.register", "process_holding_lock.on_stderr.register", "process_holding_lock.start", "output.getvalue", "int", "strip", "pid_line...
0
[]
The function (test_obtain_app_mutex) defined within the public class called public.The function start at line 1 and ends at 120. It contains 62 lines of code and it has a cyclomatic complexity of 2. It take 1 parameter, represented as [1.0], and this function return a value. It declares 30.0 functions, and It has 30.0...
Sema4AI_actions
public
public
0
0
test_exit_when_pid_exists
def test_exit_when_pid_exists():import sysimport timefrom sema4ai.common.process import Processfrom sema4ai.common.wait_for import wait_for_condition# Create the first process that will run indefinitelytarget_process = Process(["python", "-c", "import time; time.sleep(100000)"])target_process.start()wait_for_condition(...
5
36
0
204
4
1
52
1
['stream', 'args', 'target_process', 'watcher_process']
None
{"Assign": 4, "Expr": 9, "For": 1, "If": 1, "Try": 1}
22
52
22
["Process", "target_process.start", "wait_for_condition", "target_process.is_alive", "Process", "io.StringIO", "watcher_process.stream_to", "watcher_process.start", "wait_for_condition", "watcher_process.is_alive", "stream.getvalue", "time.sleep", "target_process.is_alive", "watcher_process.is_alive", "target_process.s...
0
[]
The function (test_exit_when_pid_exists) defined within the public class called public.The function start at line 1 and ends at 52. It contains 36 lines of code and it has a cyclomatic complexity of 5. It take 0 parameter, represented as [1.0] and does not return any value. It declares 22.0 functions, and It has 22.0 ...
Sema4AI_actions
public
public
0
0
test_callback
def test_callback():from sema4ai.common.callback import Callbackcallback = Callback()called = []with callback.register(lambda x: called.append(x)):with callback.register(lambda x: called.append(x + 100)):callback(1)callback(2)callback(3)assert called == [1, 101, 2, 102, 3]
1
10
0
81
2
1
14
1
['called', 'callback']
None
{"Assign": 2, "Expr": 3, "With": 2}
8
14
8
["Callback", "callback.register", "called.append", "callback.register", "called.append", "callback", "callback", "callback"]
0
[]
The function (test_callback) defined within the public class called public.The function start at line 1 and ends at 14. It contains 10 lines of code and it has a cyclomatic complexity of 1. It take 0 parameter, represented as [1.0] and does not return any value. It declares 8.0 functions, and It has 8.0 functions call...
Sema4AI_actions
public
public
0
0
test_callback_reverse
def test_callback_reverse():from sema4ai.common.callback import Callbackcallback = Callback(reversed=True)called = []with callback.register(lambda x: called.append(x)):with callback.register(lambda x: called.append(x + 100)):callback(1)callback(2)callback(3)assert called == [101, 1, 102, 2, 3]
1
10
0
84
2
17
29
17
['called', 'callback']
None
{"Assign": 2, "Expr": 3, "With": 2}
8
13
8
["Callback", "callback.register", "called.append", "callback.register", "called.append", "callback", "callback", "callback"]
0
[]
The function (test_callback_reverse) defined within the public class called public.The function start at line 17 and ends at 29. It contains 10 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 8.0 functions, and It has 8.0 funct...
Sema4AI_actions
public
public
0
0
test_import_gallery_action_packages
def test_import_gallery_action_packages(data_regression, tmpdir):import osfrom pathlib import Pathfrom sema4ai.common.gallery import GalleryActionPackagesgallery_actions = GalleryActionPackages(example_metadata)found = gallery_actions.list_packages()data_regression.check(found.as_dict())assert "Google Docs 1.2.0" in fo...
1
23
2
131
5
62
88
62
data_regression,tmpdir
['target', 'found', 'extracted_to', 'result', 'gallery_actions']
None
{"Assign": 5, "Expr": 1}
12
27
12
["GalleryActionPackages", "gallery_actions.list_packages", "data_regression.check", "found.as_dict", "Path", "gallery_actions.extract_package", "extracted_to.samefile", "Path", "extracted_to.exists", "issubset", "set", "os.listdir"]
0
[]
The function (test_import_gallery_action_packages) defined within the public class called public.The function start at line 62 and ends at 88. It contains 23 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [62.0] and does not return any value. It declares 12.0 functions, and...
Sema4AI_actions
public
public
0
0
test_imports
def test_imports():# Simple test just to check that we can import all the modules in the common package.import sema4ai.commonpath = Path(sema4ai.common.__file__)assert path.exists()if not path.is_dir():path = path.parentimported_modules = 0for file in path.rglob("*.py"):relative_path = file.relative_to(path)p = relativ...
4
16
0
105
5
5
23
5
['imported_modules', 'module_name', 'relative_path', 'path', 'p']
None
{"Assign": 7, "AugAssign": 1, "Expr": 1, "For": 1, "If": 2}
9
19
9
["Path", "path.exists", "path.is_dir", "path.rglob", "file.relative_to", "replace", "relative_path.as_posix", "p.endswith", "importlib.import_module"]
0
[]
The function (test_imports) defined within the public class called public.The function start at line 5 and ends at 23. It contains 16 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 9.0 functions, and It has 9.0 functions calle...
Sema4AI_actions
public
public
0
0
test_process_is_process_alive
def test_process_is_process_alive():import osfrom sema4ai.common.process import is_process_aliveassert is_process_alive(os.getpid())
1
4
0
23
0
4
9
4
[]
None
{}
2
6
2
["is_process_alive", "os.getpid"]
0
[]
The function (test_process_is_process_alive) defined within the public class called public.The function start at line 4 and ends at 9. 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 ...
Sema4AI_actions
public
public
0
0
test_process_start
def test_process_start():import sysfrom sema4ai.common.process import Processfrom sema4ai.common.wait_for import wait_for_conditionp = Process([sys.executable, "-c", "import time; time.sleep(20);print(20)"])p.start()assert p.is_alive()assert p.returncode is Nonep.stop()wait_for_condition(lambda: not p.is_alive(), timeo...
1
11
0
80
1
12
24
12
['p']
None
{"Assign": 1, "Expr": 3}
6
13
6
["Process", "p.start", "p.is_alive", "p.stop", "wait_for_condition", "p.is_alive"]
0
[]
The function (test_process_start) defined within the public class called public.The function start at line 12 and ends at 24. It contains 11 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 6.0 functions, and It has 6.0 function...
Sema4AI_actions
public
public
0
0
test_launch_and_return_future
def test_launch_and_return_future(scenario):import sysfrom concurrent.futures import CancelledError, TimeoutErrorfrom sema4ai.common.monitor import Monitorfrom sema4ai.common.process import ProcessResultStatus, launch_and_return_futurefrom sema4ai.common.wait_for import wait_for_conditioncode = """import timewhile True...
6
38
1
221
5
35
77
35
scenario
['monitor', 'future', 'code', 'result', 'process']
None
{"Assign": 6, "Expr": 5, "If": 3, "With": 2}
15
43
15
["Monitor", "launch_and_return_future", "pytest.raises", "future.result", "monitor.cancel", "future.result", "future.cancel", "pytest.raises", "future.result", "future.result", "ValueError", "future._process_weak_ref", "wait_for_condition", "process.poll", "pytest.mark.parametrize"]
0
[]
The function (test_launch_and_return_future) defined within the public class called public.The function start at line 35 and ends at 77. It contains 38 lines of code and it has a cyclomatic complexity of 6. The function does not take any parameters and does not return any value. It declares 15.0 functions, and It has ...
Sema4AI_actions
public
public
0
0
test_system_mutex.__init__
def __init__(self):threading.Thread.__init__(self)self.worked = False
1
3
1
18
0
23
25
23
null
[]
None
null
0
0
0
null
0
null
The function (test_system_mutex.__init__) defined within the public class called public.The function start at line 23 and ends at 25. 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
public
public
0
0
test_system_mutex.run
def run(self):mutex2 = SystemMutex(mutex_name)assert not mutex2.get_mutex_aquired()self.worked = True
1
4
1
23
0
27
30
27
null
[]
None
null
0
0
0
null
0
null
The function (test_system_mutex.run) defined within the public class called public.The function start at line 27 and ends at 30. 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..
Sema4AI_actions
public
public
0
0
test_system_mutex.release_mutex
def release_mutex():time.sleep(time_to_release_mutex)released_mutex[0] = Truemutex4.release_mutex()
1
4
0
21
0
58
61
58
null
[]
None
null
0
0
0
null
0
null
The function (test_system_mutex.release_mutex) defined within the public class called public.The function start at line 58 and ends at 61. 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..
Sema4AI_actions
public
public
0
0
test_system_mutex.raise_assertion_info_if_prev_acquired_not_detected
def raise_assertion_info_if_prev_acquired_not_detected(mutex_name):prev_system_mutex = _mutex_name_to_info.get(mutex_name)if prev_system_mutex is None:found = []for e in _mutex_name_to_info.items():found.append(f"{e[0]}: {e[1]}")raise AssertionError(f"Did not find mutex name: {mutex_name} in {found}")raise AssertionErr...
3
14
1
58
0
66
81
66
null
[]
None
null
0
0
0
null
0
null
The function (test_system_mutex.raise_assertion_info_if_prev_acquired_not_detected) defined within the public class called public.The function start at line 66 and ends at 81. It contains 14 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value..
Sema4AI_actions
public
public
0
0
test_system_mutex
def test_system_mutex():import subprocessimport sysimport threadingimport timeimport weakrefimport pytestfrom _pytest.outcomes import Failedfrom sema4ai.common.system_mutex import (SystemMutex,_mutex_name_to_info,timed_acquire_mutex,)mutex_name = "mutex_name_test_system_mutex"system_mutex = SystemMutex(mutex_name)asser...
2
66
0
295
13
1
114
1
['time_to_release_mutex', 'acquired_time', 'mutex4', 'prev_system_mutex', 't', 'code', 'mutex_name', 'found', 'initial_time', 'mutex2', 'released_mutex', 'system_mutex', 'mutex3']
None
{"Assign": 18, "Expr": 12, "For": 1, "If": 1, "Try": 1, "With": 5}
37
114
37
["SystemMutex", "system_mutex.get_mutex_aquired", "threading.Thread.__init__", "SystemMutex", "mutex2.get_mutex_aquired", "Check2Thread", "t.start", "t.join", "system_mutex.release_mutex", "SystemMutex", "mutex3.get_mutex_aquired", "weakref.ref", "system_mutex.release_mutex", "SystemMutex", "mutex4.get_mutex_aquired", ...
0
[]
The function (test_system_mutex) defined within the public class called public.The function start at line 1 and ends at 114. It contains 66 lines of code and it has a cyclomatic complexity of 2. It take 0 parameter, represented as [1.0] and does not return any value. It declares 37.0 functions, and It has 37.0 functio...
Sema4AI_actions
public
public
0
0
test_gen_mutex_name_from_path
def test_gen_mutex_name_from_path():from sema4ai.common.system_mutex import generate_mutex_namemutex_name = "my/snth\\nsth"mutex_name = generate_mutex_name(mutex_name, prefix="my_")assert mutex_name == "my_f9c932bf450ef164"
1
5
0
29
1
117
122
117
['mutex_name']
None
{"Assign": 2}
1
6
1
["generate_mutex_name"]
0
[]
The function (test_gen_mutex_name_from_path) defined within the public class called public.The function start at line 117 and ends at 122. 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 declare 1.0 function, and It has 1....
Sema4AI_actions
public
public
0
0
test_system_mutex_error_on_timeout.thread
def thread():mutex2 = SystemMutex("test_system_mutex_error_on_timeout")assert not mutex2.get_mutex_aquired()mutex_creation_info[0] = mutex2.mutex_creation_info
1
4
0
25
0
135
138
135
null
[]
None
null
0
0
0
null
0
null
The function (test_system_mutex_error_on_timeout.thread) defined within the public class called public.The function start at line 135 and ends at 138. 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..
Sema4AI_actions
public
public
0
0
test_system_mutex_error_on_timeout
def test_system_mutex_error_on_timeout():import osimport threadingfrom sema4ai.common.system_mutex import SystemMutexmutex = SystemMutex("test_system_mutex_error_on_timeout")assert mutex.get_mutex_aquired()mutex_creation_info = [""]def thread():mutex2 = SystemMutex("test_system_mutex_error_on_timeout")assert not mutex2...
1
14
0
76
5
125
145
125
['mutex_creation_info', 't', 'info', 'mutex2', 'mutex']
None
{"Assign": 6, "Expr": 2}
9
21
9
["SystemMutex", "mutex.get_mutex_aquired", "SystemMutex", "mutex2.get_mutex_aquired", "threading.Thread", "t.start", "t.join", "str", "os.getpid"]
0
[]
The function (test_system_mutex_error_on_timeout) defined within the public class called public.The function start at line 125 and ends at 145. It contains 14 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 9.0 functions, and I...
Sema4AI_actions
public
public
0
0
test_system_mutex_timed_acquire_no_error_on_timeout.thread
def thread():mutex2 = SystemMutex("test_system_mutex_timed_acquire_no_error_on_timeout")assert mutex2.get_mutex_aquired()event_mutex_acquired.set()event_terminate_thread.wait()
1
5
0
26
0
156
160
156
null
[]
None
null
0
0
0
null
0
null
The function (test_system_mutex_timed_acquire_no_error_on_timeout.thread) defined within the public class called public.The function start at line 156 and ends at 160. 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..
Sema4AI_actions
public
public
0
0
test_system_mutex_timed_acquire_no_error_on_timeout.__init__
def __init__(self):super().__init__()self._msg = []
1
3
1
18
0
176
178
176
null
[]
None
null
0
0
0
null
0
null
The function (test_system_mutex_timed_acquire_no_error_on_timeout.__init__) defined within the public class called public.The function start at line 176 and ends at 178. 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
public
public
0
0
test_system_mutex_timed_acquire_no_error_on_timeout.emit
def emit(self, record):self._msg.append(self.format(record))if "acquired after 1 seconds" in "".join(self._msg):event_terminate_thread.set()
2
4
2
37
0
180
183
180
null
[]
None
null
0
0
0
null
0
null
The function (test_system_mutex_timed_acquire_no_error_on_timeout.emit) defined within the public class called public.The function start at line 180 and ends at 183. It contains 4 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [180.0] and does not return any value..
Sema4AI_actions
public
public
0
0
test_system_mutex_timed_acquire_no_error_on_timeout
def test_system_mutex_timed_acquire_no_error_on_timeout():import threadingfrom sema4ai.common.system_mutex import SystemMutex, timed_acquire_mutexevent_mutex_acquired = threading.Event()event_terminate_thread = threading.Event()def thread():mutex2 = SystemMutex("test_system_mutex_timed_acquire_no_error_on_timeout")asse...
2
26
0
133
7
148
197
148
['logger', 't', 'event_mutex_acquired', 'mutex2', 'mutex', 'handler', 'event_terminate_thread']
None
{"Assign": 8, "Expr": 9, "If": 1, "Try": 1, "With": 1}
23
50
23
["threading.Event", "threading.Event", "SystemMutex", "mutex2.get_mutex_aquired", "event_mutex_acquired.set", "event_terminate_thread.wait", "threading.Thread", "t.start", "event_mutex_acquired.wait", "SystemMutex", "mutex.get_mutex_aquired", "__init__", "super", "self._msg.append", "self.format", "join", "event_termin...
0
[]
The function (test_system_mutex_timed_acquire_no_error_on_timeout) defined within the public class called public.The function start at line 148 and ends at 197. It contains 26 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 23.0...
Sema4AI_actions
public
public
0
0
test_system_mutex_locked_on_subprocess.check_mutex_acquired
def check_mutex_acquired():line_read = p.stdout.readline().strip()lines_read.append(line_read)if line_read != b"acquired mutex":raise AssertionError("Mutex not acquired. Lines read: " + "\n".join(lines_read))return None
2
8
0
43
0
225
232
225
null
[]
None
null
0
0
0
null
0
null
The function (test_system_mutex_locked_on_subprocess.check_mutex_acquired) defined within the public class called public.The function start at line 225 and ends at 232. It contains 8 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value..
Sema4AI_actions
public
public
0
0
test_system_mutex_locked_on_subprocess.acquire_mutex
def acquire_mutex():mutex = SystemMutex("test_system_mutex_locked_on_subprocess")return mutex.get_mutex_aquired()
1
3
0
16
0
241
243
241
null
[]
None
null
0
0
0
null
0
null
The function (test_system_mutex_locked_on_subprocess.acquire_mutex) defined within the public class called public.The function start at line 241 and ends at 243. 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
public
public
0
0
test_system_mutex_locked_on_subprocess
def test_system_mutex_locked_on_subprocess():import subprocessimport sysfrom sema4ai.common.process import kill_process_and_subprocessesfrom sema4ai.common.system_mutex import SystemMutexfrom sema4ai.common.wait_for import wait_for_condition, wait_for_non_error_conditioncode = """import sysimport timeprint('initialized...
1
28
0
104
5
200
245
200
['line_read', 'code', 'lines_read', 'mutex', 'p']
Returns
{"Assign": 6, "Expr": 4, "If": 1, "Return": 2}
13
46
13
["subprocess.Popen", "strip", "p.stdout.readline", "lines_read.append", "AssertionError", "join", "wait_for_non_error_condition", "SystemMutex", "mutex.get_mutex_aquired", "kill_process_and_subprocesses", "SystemMutex", "mutex.get_mutex_aquired", "wait_for_condition"]
0
[]
The function (test_system_mutex_locked_on_subprocess) defined within the public class called public.The function start at line 200 and ends at 245. It contains 28 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 13.0 function...
Sema4AI_actions
public
public
0
0
test_custom_info_to_mutex
def test_custom_info_to_mutex(tmpdir):from sema4ai.common.system_mutex import SystemMutexmutex = SystemMutex("test_custom_info_to_mutex",write_to_mutex_file="custom-message",base_dir=str(tmpdir),)assert mutex.get_mutex_aquired()with open(tmpdir / "test_custom_info_to_mutex", "r") as f:assert f.read() == "custom-message...
1
19
1
106
2
248
270
248
tmpdir
['mutex2', 'mutex']
None
{"Assign": 2, "With": 2}
10
23
10
["SystemMutex", "str", "mutex.get_mutex_aquired", "open", "f.read", "SystemMutex", "str", "mutex2.get_mutex_aquired", "open", "f.read"]
0
[]
The function (test_custom_info_to_mutex) defined within the public class called public.The function start at line 248 and ends at 270. It contains 19 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 10.0 functions, and It has 10...
Sema4AI_actions
public
public
0
0
test_slugify
def test_slugify():from sema4ai.common.text import slugifyassert slugify("ação", allow_unicode=True) == "ação"assert slugify("ação", allow_unicode=False) == "acao"assert slugify("ação /?*Σ 22", allow_unicode=False) == "acao-22"
1
5
0
45
0
1
6
1
[]
None
{}
3
6
3
["slugify", "slugify", "slugify"]
0
[]
The function (test_slugify) defined within the public class called public.The function start at line 1 and ends at 6. It contains 5 lines of code and it has a cyclomatic complexity of 1. It take 0 parameter, represented as [1.0] and does not return any value. It declares 3.0 functions, and It has 3.0 functions called ...
Sema4AI_actions
public
public
0
0
test_action_server_tool
def test_action_server_tool(tmpdir):import sysfrom sema4ai.common.tools import ActionServerToolsuffix = ".exe" if sys.platform == "win32" else ""target = tmpdir / f"action_server{suffix}"# See: https://github.com/Sema4AI/actions/blob/master/action_server/docs/CHANGELOG.md for versionstool = ActionServerTool(target, "2....
2
19
1
123
4
9
34
9
tmpdir
['target', 'suffix', 'executable', 'tool']
None
{"Assign": 9, "Expr": 2}
10
26
10
["ActionServerTool", "tool.verify", "tool.download", "tool.verify", "ActionServerTool", "tool.download", "tool.verify", "ActionServerTool.get_default_executable", "executable.exists", "executable.is_file"]
0
[]
The function (test_action_server_tool) defined within the public class called public.The function start at line 9 and ends at 34. 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 10.0 functions, and It has 10.0 fu...
Sema4AI_actions
public
public
0
0
setup_logging
def setup_logging():import logginglogger = logging.getLogger("sema4ai.common.tools")logger.setLevel(logging.DEBUG)handler = logging.StreamHandler()handler.setLevel(logging.DEBUG)formatter = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s")handler.setFormatter(formatter)logger.addHandler(handler)...
1
13
0
64
3
38
51
38
['formatter', 'handler', 'logger']
None
{"Assign": 3, "Expr": 6}
9
14
9
["logging.getLogger", "logger.setLevel", "logging.StreamHandler", "handler.setLevel", "logging.Formatter", "handler.setFormatter", "logger.addHandler", "logger.removeHandler", "pytest.fixture"]
21
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3607851_andsens_bootstrap_vz.bootstrapvz.remote.server_py.main", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3687109_tuhiproject_tuhi.tuhi.base_py.main", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Outpu...
The function (setup_logging) defined within the public class called public.The function start at line 38 and ends at 51. It contains 13 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 9.0 functions, It has 9.0 functions called i...
Sema4AI_actions
public
public
0
0
test_agent_cli_tool
def test_agent_cli_tool(tmpdir):import sysfrom sema4ai.common.tools import AgentCliToolsuffix = ".exe" if sys.platform == "win32" else ""target = tmpdir / f"agent-cli{suffix}"# See: https://github.com/Sema4AI/agents-spec/blob/master/cli/common/version.go for versionstool = AgentCliTool(target, "v1.0.2")assert not tool....
2
12
1
84
4
54
71
54
tmpdir
['target', 'suffix', 'executable', 'tool']
None
{"Assign": 4, "Expr": 1}
7
18
7
["AgentCliTool", "tool.verify", "tool.download", "tool.verify", "AgentCliTool.get_default_executable", "executable.exists", "executable.is_file"]
0
[]
The function (test_agent_cli_tool) defined within the public class called public.The function start at line 54 and ends at 71. 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 7.0 functions, and It has 7.0 functio...
Sema4AI_actions
public
public
0
0
test_rcc_tool
def test_rcc_tool(tmpdir):import sysfrom sema4ai.common.tools import RccToolsuffix = ".exe" if sys.platform == "win32" else ""target = tmpdir / f"rcc{suffix}"# See: https://github.com/Sema4AI/rcc/blob/master/docs/changelog.md for versionstool = RccTool(target, "v19.0.2")assert not tool.verify()tool.download()assert too...
2
19
1
123
4
74
99
74
tmpdir
['target', 'suffix', 'executable', 'tool']
None
{"Assign": 9, "Expr": 2}
10
26
10
["RccTool", "tool.verify", "tool.download", "tool.verify", "RccTool", "tool.download", "tool.verify", "RccTool.get_default_executable", "executable.exists", "executable.is_file"]
0
[]
The function (test_rcc_tool) defined within the public class called public.The function start at line 74 and ends at 99. 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 10.0 functions, and It has 10.0 functions c...
Sema4AI_actions
public
public
0
0
test_data_server_tool
def test_data_server_tool(tmpdir):import sysfrom sema4ai.common.tools import DataServerToolsuffix = ".exe" if sys.platform == "win32" else ""target = tmpdir / f"data-server-cli{suffix}"tool = DataServerTool(target, "v1.0.2")assert not tool.verify()tool.download()assert tool.verify()target = tmpdir / "data_server-in_mac...
2
19
1
123
4
102
126
102
tmpdir
['target', 'suffix', 'executable', 'tool']
None
{"Assign": 9, "Expr": 2}
10
25
10
["DataServerTool", "tool.verify", "tool.download", "tool.verify", "DataServerTool", "tool.download", "tool.verify", "DataServerTool.get_default_executable", "executable.exists", "executable.is_file"]
0
[]
The function (test_data_server_tool) defined within the public class called public.The function start at line 102 and ends at 126. 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 10.0 functions, and It has 10.0 f...
Sema4AI_actions
public
public
0
0
test_to_fs_path
def test_to_fs_path(uri, path):assert uris.to_fs_path(uri) == path
1
2
2
16
0
36
37
36
uri,path
[]
None
{}
2
2
2
["uris.to_fs_path", "pytest.mark.parametrize"]
0
[]
The function (test_to_fs_path) defined within the public class called public.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. It declares 2.0 functions, and It has 2.0 functions...
Sema4AI_actions
public
public
0
0
test_normalize_uri
def test_normalize_uri():normalized = "file:///c:/far/space%20%3Fboo"assert uris.normalize_uri("file:///C%3A/far/space%20%3Fboo") == normalizedassert uris.from_fs_path(r"C:\far\space ?boo") == normalized
1
4
0
26
1
41
44
41
['normalized']
None
{"Assign": 1}
2
4
2
["uris.normalize_uri", "uris.from_fs_path"]
0
[]
The function (test_normalize_uri) defined within the public class called public.The function start at line 41 and ends at 44. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 functions, and It has 2.0 functions...
Sema4AI_actions
public
public
0
0
test_win_to_fs_path
def test_win_to_fs_path(uri, path):assert uris.to_fs_path(uri) == path
1
2
2
16
0
56
57
56
uri,path
[]
None
{}
2
2
2
["uris.to_fs_path", "pytest.mark.parametrize"]
0
[]
The function (test_win_to_fs_path) defined within the public class called public.The function start at line 56 and ends at 57. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [56.0] and does not return any value. It declares 2.0 functions, and It has 2.0 funct...
Sema4AI_actions
public
public
0
0
test_from_fs_path
def test_from_fs_path(path, uri):assert uris.from_fs_path(path) == uri
1
2
2
16
0
68
69
68
path,uri
[]
None
{}
2
2
2
["uris.from_fs_path", "pytest.mark.parametrize"]
0
[]
The function (test_from_fs_path) defined within the public class called public.The function start at line 68 and ends at 69. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [68.0] and does not return any value. It declares 2.0 functions, and It has 2.0 functio...
Sema4AI_actions
public
public
0
0
test_win_from_fs_path
def test_win_from_fs_path(path, uri):assert uris.from_fs_path(path) == uri
1
2
2
16
0
80
81
80
path,uri
[]
None
{}
2
2
2
["uris.from_fs_path", "pytest.mark.parametrize"]
0
[]
The function (test_win_from_fs_path) defined within the public class called public.The function start at line 80 and ends at 81. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [80.0] and does not return any value. It declares 2.0 functions, and It has 2.0 fun...
Sema4AI_actions
public
public
0
0
test_uri_with
def test_uri_with(uri, kwargs, new_uri):assert uris.uri_with(uri, **kwargs) == new_uri
1
2
3
21
0
95
96
95
uri,kwargs,new_uri
[]
None
{}
2
2
2
["uris.uri_with", "pytest.mark.parametrize"]
0
[]
The function (test_uri_with) defined within the public class called public.The function start at line 95 and ends at 96. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [95.0] and does not return any value. It declares 2.0 functions, and It has 2.0 functions c...
Sema4AI_actions
public
public
0
0
test_normalize_drive
def test_normalize_drive():from sema4ai.common.uris import normalize_driveif sys.platform == "win32":assert normalize_drive("c:/teMp") == "c:/teMp"assert normalize_drive("X:/Temp") == "x:/Temp"assert normalize_drive("temp") == "temp"assert normalize_drive("") == ""
2
7
0
47
0
99
106
99
[]
None
{"If": 1}
4
8
4
["normalize_drive", "normalize_drive", "normalize_drive", "normalize_drive"]
0
[]
The function (test_normalize_drive) defined within the public class called public.The function start at line 99 and ends at 106. It contains 7 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.0 functi...