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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
etianen_django-reversion | Revision | public | 0 | 1 | get_comment | def get_comment(self):try:LogEntry = apps.get_model('admin.LogEntry')return LogEntry(change_message=self.comment).get_change_message()except LookupError:return self.comment | 2 | 6 | 1 | 35 | 0 | 71 | 76 | 71 | self | [] | Returns | {"Assign": 1, "Return": 2, "Try": 1} | 3 | 6 | 3 | ["apps.get_model", "get_change_message", "LogEntry"] | 3 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69993433_splitgraph_sgr.splitgraph.cloud.project.generation_py._get_object_example", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69993433_splitgraph_sgr.splitgraph.cloud.project.generation_py._get_oneof_example", ... | The function (get_comment) defined within the public class called Revision, that inherit another class.The function start at line 71 and ends at 76. It contains 6 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters, and this function return a value. It declares 3.0 functions... |
etianen_django-reversion | Revision | public | 0 | 1 | revert | def revert(self, delete=False):# Group the models by the database of the serialized model.versions_by_db = defaultdict(list)for version in self.version_set.iterator():versions_by_db[version.db].append(version)# For each db, perform a separate atomic revert.for version_db, versions in versions_by_db.items():with transac... | 10 | 25 | 2 | 175 | 0 | 78 | 110 | 78 | self,delete | [] | None | {"Assign": 6, "Expr": 5, "For": 4, "If": 1, "Try": 1, "With": 1} | 17 | 33 | 17 | ["defaultdict", "self.version_set.iterator", "append", "versions_by_db.items", "transaction.atomic", "set", "old_revision.add", "get", "model._default_manager.using", "chain.from_iterable", "_follow_relations_recursive", "Collector", "groupby", "collector.collect", "list", "collector.delete", "_safe_revert"] | 3 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.tests.test_app.tests.test_models_py.RevertTest.testRevert", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.tests.test_app.tests.test_models_py.RevertT... | The function (revert) defined within the public class called Revision, that inherit another class.The function start at line 78 and ends at 110. It contains 25 lines of code and it has a cyclomatic complexity of 10. It takes 2 parameters, represented as [78.0] and does not return any value. It declares 17.0 functions, ... |
etianen_django-reversion | Revision | public | 0 | 1 | __str__ | def __str__(self):return ", ".join(force_str(version) for version in self.version_set.all()) | 2 | 2 | 1 | 25 | 0 | 112 | 113 | 112 | self | [] | Returns | {"Return": 1} | 3 | 2 | 3 | ["join", "force_str", "self.version_set.all"] | 8 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.dockertest.output.validate_py.OutputGoodBase.__str__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3646959_kristianoellegaard_django_hvad.hvad.test_utils.project.app.models_py.Norm... | The function (__str__) defined within the public class called Revision, that inherit another class.The function start at line 112 and ends at 113. It contains 2 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters, and this function return a value. It declares 3.0 functions, ... |
etianen_django-reversion | VersionQuerySet | public | 0 | 1 | get_for_model | def get_for_model(self, model, model_db=None):model_db = model_db or router.db_for_write(model)content_type = _get_content_type(model, self.db)return self.filter(content_type=content_type,db=model_db,) | 2 | 7 | 3 | 45 | 0 | 124 | 130 | 124 | self,model,model_db | [] | Returns | {"Assign": 2, "Return": 1} | 3 | 7 | 3 | ["router.db_for_write", "_get_content_type", "self.filter"] | 5 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.reversion.management.commands.createinitialrevisions_py.Command.handle", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.reversion.management.commands.... | The function (get_for_model) defined within the public class called VersionQuerySet, that inherit another class.The function start at line 124 and ends at 130. It contains 7 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [124.0], and this function return a value. It declare... |
etianen_django-reversion | VersionQuerySet | public | 0 | 1 | get_for_object_reference | def get_for_object_reference(self, model, object_id, model_db=None):return self.get_for_model(model, model_db=model_db).filter(object_id=object_id,) | 1 | 4 | 4 | 32 | 0 | 132 | 135 | 132 | self,model,object_id,model_db | [] | Returns | {"Return": 1} | 2 | 4 | 2 | ["filter", "self.get_for_model"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.reversion.management.commands.deleterevisions_py.Command.handle", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.tests.test_app.tests.test_models_py.G... | The function (get_for_object_reference) defined within the public class called VersionQuerySet, that inherit another class.The function start at line 132 and ends at 135. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [132.0], and this function return a value.... |
etianen_django-reversion | VersionQuerySet | public | 0 | 1 | get_for_object | def get_for_object(self, obj, model_db=None):return self.get_for_object_reference(obj.__class__, obj.pk, model_db=model_db) | 1 | 2 | 3 | 28 | 0 | 137 | 138 | 137 | self,obj,model_db | [] | Returns | {"Return": 1} | 1 | 2 | 1 | ["self.get_for_object_reference"] | 4 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.reversion.revisions_py._add_to_revision", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.tests.test_app.tests.base_py.TestBaseMixin.assertSingleRevisi... | The function (get_for_object) defined within the public class called VersionQuerySet, that inherit another class.The function start at line 137 and ends at 138. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [137.0], and this function return a value. It declar... |
etianen_django-reversion | VersionQuerySet | public | 0 | 1 | get_deleted | def get_deleted(self, model, model_db=None):model_db = model_db or router.db_for_write(model)connection = connections[self.db]if self.db == model_db and connection.vendor in ("sqlite", "postgresql", "oracle"):pk_field_name = model._meta.pk.nameobject_id_cast_target = model._meta.get_field(pk_field_name)if django.VERSIO... | 8 | 51 | 3 | 414 | 0 | 140 | 200 | 140 | self,model,model_db | [] | Returns | {"Assign": 11, "If": 4, "Return": 1} | 43 | 61 | 43 | ["router.db_for_write", "model._meta.get_field", "get", "models.IntegerField", "models.BigIntegerField", "Cast", "models.OuterRef", "filter", "model._default_manager.using", "filter", "annotate", "model._default_manager.using", "Cast", "Version._meta.get_field", "models.OuterRef", "values", "distinct", "order_by", "fil... | 4 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.tests.test_app.tests.test_models_py.GetDeletedDbTest.testGetDeletedDb", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.tests.test_app.tests.test_model... | The function (get_deleted) defined within the public class called VersionQuerySet, that inherit another class.The function start at line 140 and ends at 200. It contains 51 lines of code and it has a cyclomatic complexity of 8. It takes 3 parameters, represented as [140.0], and this function return a value. It declares... |
etianen_django-reversion | VersionQuerySet | public | 0 | 1 | get_unique | def get_unique(self):last_key = Nonefor version in self.iterator():key = (version.object_id, version.content_type_id, version.db, version._local_field_dict)if last_key != key:yield versionlast_key = key | 3 | 7 | 1 | 46 | 0 | 202 | 208 | 202 | self | [] | None | {"Assign": 3, "Expr": 1, "For": 1, "If": 1} | 1 | 7 | 1 | ["self.iterator"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.tests.test_app.tests.test_models_py.GetForObjectUniqueTest.testGetForObjectUnique", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.tests.test_app.test... | The function (get_unique) defined within the public class called VersionQuerySet, that inherit another class.The function start at line 202 and ends at 208. 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 declare 1.0 functi... |
etianen_django-reversion | Version | public | 0 | 1 | _content_type | def _content_type(self):return ContentType.objects.db_manager(self._state.db).get_for_id(self.content_type_id) | 1 | 2 | 1 | 25 | 0 | 235 | 236 | 235 | self | [] | Returns | {"Return": 1} | 2 | 2 | 2 | ["get_for_id", "ContentType.objects.db_manager"] | 0 | [] | The function (_content_type) defined within the public class called Version, that inherit another class.The function start at line 235 and ends at 236. 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 2.0 functi... |
etianen_django-reversion | Version | public | 0 | 1 | _model | def _model(self):return self._content_type.model_class() | 1 | 2 | 1 | 13 | 0 | 239 | 240 | 239 | self | [] | Returns | {"Return": 1} | 1 | 2 | 1 | ["self._content_type.model_class"] | 0 | [] | The function (_model) defined within the public class called Version, that inherit another class.The function start at line 239 and ends at 240. 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, and ... |
etianen_django-reversion | Version | public | 0 | 1 | _object_version | def _object_version(self):version_options = _get_options(self._model)data = self.serialized_datadata = force_str(data.encode("utf8"))try:return list(serializers.deserialize(self.format, data, ignorenonexistent=True,use_natural_foreign_keys=version_options.use_natural_foreign_keys))[0]except DeserializationError:raise R... | 3 | 16 | 1 | 106 | 0 | 267 | 282 | 267 | self | [] | Returns | {"Assign": 3, "Return": 1, "Try": 1} | 9 | 16 | 9 | ["_get_options", "force_str", "data.encode", "list", "serializers.deserialize", "RevertError", "gettext", "RevertError", "gettext"] | 0 | [] | The function (_object_version) defined within the public class called Version, that inherit another class.The function start at line 267 and ends at 282. It contains 16 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters, and this function return a value. It declares 9.0 fun... |
etianen_django-reversion | Version | public | 0 | 1 | _local_field_dict | def _local_field_dict(self):"""A dictionary mapping field names to field values in this versionof the model.Parent links of inherited multi-table models will not be followed."""version_options = _get_options(self._model)object_version = self._object_versionobj = object_version.objectmodel = self._modelfield_dict = {}fo... | 5 | 14 | 1 | 107 | 0 | 285 | 305 | 285 | self | [] | Returns | {"Assign": 8, "Expr": 1, "For": 1, "If": 2, "Return": 1} | 4 | 21 | 4 | ["_get_options", "model._meta.get_field", "isinstance", "getattr"] | 0 | [] | The function (_local_field_dict) defined within the public class called Version, that inherit another class.The function start at line 285 and ends at 305. It contains 14 lines of code and it has a cyclomatic complexity of 5. The function does not take any parameters, and this function return a value. It declares 4.0 f... |
etianen_django-reversion | Version | public | 0 | 1 | field_dict | def field_dict(self):"""A dictionary mapping field names to field values in this versionof the model.This method will follow parent links, if present."""field_dict = self._local_field_dict# Add parent data.for parent_model, field in self._model._meta.concrete_model._meta.parents.items():content_type = _get_content_type... | 2 | 12 | 1 | 87 | 0 | 308 | 326 | 308 | self | [] | Returns | {"Assign": 4, "Expr": 2, "For": 1, "Return": 1} | 4 | 19 | 4 | ["self._model._meta.concrete_model._meta.parents.items", "_get_content_type", "self.revision.version_set.get", "field_dict.update"] | 0 | [] | The function (field_dict) defined within the public class called Version, that inherit another class.The function start at line 308 and ends at 326. It contains 12 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters, and this function return a value. It declares 4.0 function... |
etianen_django-reversion | Revision | public | 0 | 1 | revert | def revert(self):self._object_version.save(using=self.db) | 1 | 2 | 1 | 17 | 0 | 328 | 329 | 328 | self,delete | [] | None | {"Assign": 6, "Expr": 5, "For": 4, "If": 1, "Try": 1, "With": 1} | 17 | 33 | 17 | ["defaultdict", "self.version_set.iterator", "append", "versions_by_db.items", "transaction.atomic", "set", "old_revision.add", "get", "model._default_manager.using", "chain.from_iterable", "_follow_relations_recursive", "Collector", "groupby", "collector.collect", "list", "collector.delete", "_safe_revert"] | 3 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.tests.test_app.tests.test_models_py.RevertTest.testRevert", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.tests.test_app.tests.test_models_py.RevertT... | The function (revert) defined within the public class called Revision, that inherit another class.The function start at line 328 and ends at 329. 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 17.0 functions, It h... |
etianen_django-reversion | Revision | public | 0 | 1 | __str__ | def __str__(self):return self.object_repr | 1 | 2 | 1 | 9 | 0 | 331 | 332 | 331 | self | [] | Returns | {"Return": 1} | 3 | 2 | 3 | ["join", "force_str", "self.version_set.all"] | 8 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.dockertest.output.validate_py.OutputGoodBase.__str__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3646959_kristianoellegaard_django_hvad.hvad.test_utils.project.app.models_py.Norm... | The function (__str__) defined within the public class called Revision, that inherit another class.The function start at line 331 and ends at 332. 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, ... |
etianen_django-reversion | _Str | protected | 0 | 1 | __init__ | def __init__(self, expression):super().__init__(expression, output_field=models.TextField()) | 1 | 2 | 2 | 23 | 0 | 356 | 357 | 356 | self,expression | [] | None | {"Expr": 1} | 3 | 2 | 3 | ["__init__", "super", "models.TextField"] | 4,993 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16379211_lorcalhost_btb_manager_telegram.btb_manager_telegram.logging_py.LoggerHandler.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16379211_lorcalhost_btb_manager_telegram.btb_manager_telegram.schedule_... | The function (__init__) defined within the protected class called _Str, that inherit another class.The function start at line 356 and ends at 357. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [356.0] and does not return any value. It declares 3.0 functions, ... |
etianen_django-reversion | _Str | protected | 0 | 1 | as_sql | def as_sql(self, compiler, connection):self.extra["db_type"] = self.output_field.db_type(connection)return super().as_sql(compiler, connection) | 1 | 3 | 3 | 35 | 0 | 359 | 361 | 359 | self,compiler,connection | [] | Returns | {"Assign": 1, "Return": 1} | 3 | 3 | 3 | ["self.output_field.db_type", "as_sql", "super"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.reversion.models_py._Str.as_sql"] | The function (as_sql) defined within the protected class called _Str, that inherit another class.The function start at line 359 and ends at 361. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [359.0], and this function return a value. It declares 3.0 functions... |
etianen_django-reversion | public | public | 0 | 0 | _safe_subquery | def _safe_subquery(method, left_query, left_field_name, right_subquery, right_field_name):right_subquery = right_subquery.order_by().values_list(right_field_name, flat=True)left_field = left_query.model._meta.get_field(left_field_name)right_field = right_subquery.model._meta.get_field(right_field_name)# If the database... | 6 | 31 | 5 | 266 | 9 | 364 | 399 | 364 | method,left_query,left_field_name,right_subquery,right_field_name | ['right_field', 'left_query', 'exist_annotation_name', 'right_subquery', 'right_field_name_str', 'left_field', 'right_field_name', 'left_field_name_str', 'left_field_name'] | Returns | {"Assign": 12, "If": 3, "Return": 2} | 21 | 36 | 21 | ["values_list", "right_subquery.order_by", "left_query.model._meta.get_field", "right_subquery.model._meta.get_field", "left_field.get_internal_type", "right_field.get_internal_type", "getattr", "list", "right_subquery.iterator", "isinstance", "left_query.annotate", "_Str", "isinstance", "values_list", "right_subquery.... | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.reversion.management.commands.createinitialrevisions_py.Command.handle"] | The function (_safe_subquery) defined within the public class called public.The function start at line 364 and ends at 399. It contains 31 lines of code and it has a cyclomatic complexity of 6. It takes 5 parameters, represented as [364.0], and this function return a value. It declares 21.0 functions, It has 21.0 funct... |
etianen_django-reversion | public | public | 0 | 0 | is_active | def is_active():return bool(_stack.get()) | 1 | 2 | 0 | 13 | 0 | 40 | 41 | 40 | [] | Returns | {"Return": 1} | 2 | 2 | 2 | ["bool", "_stack.get"] | 7 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.reversion.admin_py.VersionAdmin.log_addition", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.reversion.admin_py.VersionAdmin.log_change", "_.content.... | The function (is_active) defined within the public class called public.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 this function return a value. It declares 2.0 functions, It has 2.0 functions called in... | |
etianen_django-reversion | public | public | 0 | 0 | _current_frame | def _current_frame():if not is_active():raise RevisionManagementError("There is no active revision for this thread")return _stack.get()[-1] | 2 | 4 | 0 | 25 | 0 | 44 | 47 | 44 | [] | Returns | {"If": 1, "Return": 1} | 3 | 4 | 3 | ["is_active", "RevisionManagementError", "_stack.get"] | 11 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.reversion.revisions_py._add_to_revision", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.reversion.revisions_py._create_revision_context", "_.content.... | The function (_current_frame) defined within the public class called public.The function start at line 44 and ends at 47. It contains 4 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters, and this function return a value. It declares 3.0 functions, It has 3.0 functions call... | |
etianen_django-reversion | public | public | 0 | 0 | _copy_db_versions | def _copy_db_versions(db_versions):return {db: versions.copy()for db, versionsin db_versions.items()} | 2 | 6 | 1 | 25 | 0 | 50 | 55 | 50 | db_versions | [] | Returns | {"Return": 1} | 2 | 6 | 2 | ["versions.copy", "db_versions.items"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.reversion.revisions_py._add_to_revision", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.reversion.revisions_py._push_frame"] | The function (_copy_db_versions) defined within the public class called public.The function start at line 50 and ends at 55. It contains 6 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters, and this function return a value. It declares 2.0 functions, It has 2.0 functions c... |
etianen_django-reversion | public | public | 0 | 0 | _push_frame | def _push_frame(manage_manually, using):if is_active():current_frame = _current_frame()db_versions = _copy_db_versions(current_frame.db_versions)db_versions.setdefault(using, {})stack_frame = current_frame._replace(manage_manually=manage_manually,db_versions=db_versions,)else:stack_frame = _StackFrame(manage_manually=m... | 2 | 19 | 2 | 104 | 3 | 58 | 76 | 58 | manage_manually,using | ['db_versions', 'current_frame', 'stack_frame'] | None | {"Assign": 4, "Expr": 2, "If": 1} | 9 | 19 | 9 | ["is_active", "_current_frame", "_copy_db_versions", "db_versions.setdefault", "current_frame._replace", "_StackFrame", "timezone.now", "_stack.set", "_stack.get"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.reversion.revisions_py._create_revision_context"] | The function (_push_frame) defined within the public class called public.The function start at line 58 and ends at 76. It contains 19 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [58.0] and does not return any value. It declares 9.0 functions, It has 9.0 functions called ... |
etianen_django-reversion | public | public | 0 | 0 | _update_frame | def _update_frame(**kwargs):_stack.get()[-1] = _current_frame()._replace(**kwargs) | 1 | 2 | 1 | 25 | 0 | 79 | 80 | 79 | **kwargs | [] | None | {"Assign": 1} | 3 | 2 | 3 | ["_stack.get", "_replace", "_current_frame"] | 6 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.reversion.revisions_py._add_to_revision", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.reversion.revisions_py._pop_frame", "_.content.gdrive.MyDrive... | The function (_update_frame) defined within the public class called public.The function start at line 79 and ends at 80. 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 3.0 functions, It has 3.0 functions called in... |
etianen_django-reversion | public | public | 0 | 0 | _pop_frame | def _pop_frame():prev_frame = _current_frame()stack = _stack.get()del stack[-1]if is_active():current_frame = _current_frame()db_versions = {db: prev_frame.db_versions[db]for dbin current_frame.db_versions.keys()}_update_frame(user=prev_frame.user,comment=prev_frame.comment,date_created=prev_frame.date_created,db_versi... | 3 | 18 | 0 | 85 | 4 | 83 | 100 | 83 | ['db_versions', 'stack', 'current_frame', 'prev_frame'] | None | {"Assign": 4, "Expr": 1, "If": 1} | 6 | 18 | 6 | ["_current_frame", "_stack.get", "is_active", "_current_frame", "current_frame.db_versions.keys", "_update_frame"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.reversion.revisions_py._create_revision_context"] | The function (_pop_frame) defined within the public class called public.The function start at line 83 and ends at 100. It contains 18 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 6.0 functions, It has 6.0 functions called ins... | |
etianen_django-reversion | public | public | 0 | 0 | is_manage_manually | def is_manage_manually():return _current_frame().manage_manually | 1 | 2 | 0 | 10 | 0 | 103 | 104 | 103 | [] | Returns | {"Return": 1} | 1 | 2 | 1 | ["_current_frame"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.reversion.revisions_py._m2m_changed_receiver", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.reversion.revisions_py._post_save_receiver"] | The function (is_manage_manually) defined within the public class called public.The function start at line 103 and ends at 104. 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 c... | |
etianen_django-reversion | public | public | 0 | 0 | set_user | def set_user(user):_update_frame(user=user) | 1 | 2 | 1 | 11 | 0 | 107 | 108 | 107 | user | [] | None | {"Expr": 1} | 1 | 2 | 1 | ["_update_frame"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.reversion.admin_py.VersionAdmin.create_revision", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.reversion.views_py._set_user_from_request"] | The function (set_user) defined within the public class called public.The function start at line 107 and ends at 108. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, It has 1.0 function called inside w... |
etianen_django-reversion | public | public | 0 | 0 | get_user | def get_user():return _current_frame().user | 1 | 2 | 0 | 10 | 0 | 111 | 112 | 111 | [] | Returns | {"Return": 1} | 1 | 2 | 1 | ["_current_frame"] | 5 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.reversion.views_py._set_user_from_request", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3953407_raphielgang_telegram_paperplane.userbot.modules.whois_py.who", "_.content.gdrive.MyD... | The function (get_user) defined within the public class called public.The function start at line 111 and ends at 112. 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 insi... | |
etianen_django-reversion | public | public | 0 | 0 | set_comment | def set_comment(comment):_update_frame(comment=comment) | 1 | 2 | 1 | 11 | 0 | 115 | 116 | 115 | comment | [] | None | {"Expr": 1} | 1 | 2 | 1 | ["_update_frame"] | 4 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.reversion.admin_py.VersionAdmin._reversion_revisionform_view", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.reversion.admin_py.VersionAdmin.log_addi... | The function (set_comment) defined within the public class called public.The function start at line 115 and ends at 116. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, It has 1.0 function called insid... |
etianen_django-reversion | public | public | 0 | 0 | get_comment | def get_comment():return _current_frame().comment | 1 | 2 | 0 | 10 | 0 | 119 | 120 | 119 | [] | Returns | {"Return": 1} | 1 | 2 | 1 | ["_current_frame"] | 3 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69993433_splitgraph_sgr.splitgraph.cloud.project.generation_py._get_object_example", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69993433_splitgraph_sgr.splitgraph.cloud.project.generation_py._get_oneof_example", ... | The function (get_comment) defined within the public class called public.The function start at line 119 and ends at 120. 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 i... | |
etianen_django-reversion | public | public | 0 | 0 | set_date_created | def set_date_created(date_created):_update_frame(date_created=date_created) | 1 | 2 | 1 | 11 | 0 | 123 | 124 | 123 | date_created | [] | None | {"Expr": 1} | 1 | 2 | 1 | ["_update_frame"] | 0 | [] | The function (set_date_created) defined within the public class called public.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 declare 1.0 function, and It has 1.0 function ca... |
etianen_django-reversion | public | public | 0 | 0 | get_date_created | def get_date_created():return _current_frame().date_created | 1 | 2 | 0 | 10 | 0 | 127 | 128 | 127 | [] | Returns | {"Return": 1} | 1 | 2 | 1 | ["_current_frame"] | 0 | [] | The function (get_date_created) defined within the public class called public.The function start at line 127 and ends at 128. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declare 1.0 function, and It has 1.0 functio... | |
etianen_django-reversion | public | public | 0 | 0 | add_meta | def add_meta(model, **values):_update_frame(meta=_current_frame().meta + ((model, values),)) | 1 | 2 | 2 | 27 | 0 | 131 | 132 | 131 | model,**values | [] | None | {"Expr": 1} | 2 | 2 | 2 | ["_update_frame", "_current_frame"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.reversion.management.commands.createinitialrevisions_py.Command.create_revision"] | The function (add_meta) defined within the public class called public.The function start at line 131 and ends at 132. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [131.0] and does not return any value. It declares 2.0 functions, It has 2.0 functions called i... |
etianen_django-reversion | public | public | 0 | 0 | _follow_relations | def _follow_relations(obj):version_options = _get_options(obj.__class__)for follow_name in version_options.follow:try:follow_obj = getattr(obj, follow_name)except ObjectDoesNotExist:continueif isinstance(follow_obj, models.Model):yield follow_objelif isinstance(follow_obj, (models.Manager, QuerySet)):yield from follow_... | 6 | 16 | 1 | 94 | 2 | 135 | 150 | 135 | obj | ['follow_obj', 'version_options'] | None | {"Assign": 2, "Expr": 2, "For": 1, "If": 3, "Try": 1} | 7 | 16 | 7 | ["_get_options", "getattr", "isinstance", "isinstance", "follow_obj.all", "RegistrationError", "format"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.reversion.revisions_py._add_to_revision", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.reversion.revisions_py._follow_relations_recursive"] | The function (_follow_relations) defined within the public class called public.The function start at line 135 and ends at 150. It contains 16 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 7.0 functions, It has 7.0 functions ca... |
etianen_django-reversion | public | public | 0 | 0 | _follow_relations_recursive.do_follow | def do_follow(obj):if obj not in relations:relations.add(obj)for related in _follow_relations(obj):do_follow(related) | 3 | 5 | 1 | 29 | 0 | 154 | 158 | 154 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (_follow_relations_recursive.do_follow) defined within the public class called public.The function start at line 154 and ends at 158. 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.. |
etianen_django-reversion | public | public | 0 | 0 | _follow_relations_recursive | def _follow_relations_recursive(obj):def do_follow(obj):if obj not in relations:relations.add(obj)for related in _follow_relations(obj):do_follow(related)relations = set()do_follow(obj)return relations | 1 | 5 | 1 | 18 | 1 | 153 | 161 | 153 | obj | ['relations'] | Returns | {"Assign": 1, "Expr": 3, "For": 1, "If": 1, "Return": 1} | 5 | 9 | 5 | ["relations.add", "_follow_relations", "do_follow", "set", "do_follow"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.reversion.models_py.Revision.revert"] | The function (_follow_relations_recursive) defined within the public class called public.The function start at line 153 and ends at 161. 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, It has 5.0... |
etianen_django-reversion | public | public | 0 | 0 | _add_to_revision | def _add_to_revision(obj, using, model_db, explicit):from reversion.models import Version# Exit early if the object is not fully-formed.if obj.pk is None:returnversion_options = _get_options(obj.__class__)content_type = _get_content_type(obj.__class__, using)object_id = force_str(obj.pk)version_key = (content_type, obj... | 9 | 34 | 4 | 220 | 8 | 164 | 203 | 164 | obj,using,model_db,explicit | ['content_type', 'db_versions', 'version_key', 'version_options', 'previous_version', 'object_id', 'versions', 'version'] | None | {"Assign": 10, "Expr": 2, "For": 1, "If": 4, "Return": 3} | 14 | 40 | 14 | ["_get_options", "_get_content_type", "force_str", "_current_frame", "Version", "serializers.serialize", "force_str", "first", "get_for_object", "Version.objects.using", "_copy_db_versions", "_update_frame", "_follow_relations", "_add_to_revision"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.reversion.revisions_py._add_to_revision", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.reversion.revisions_py.add_to_revision"] | The function (_add_to_revision) defined within the public class called public.The function start at line 164 and ends at 203. It contains 34 lines of code and it has a cyclomatic complexity of 9. It takes 4 parameters, represented as [164.0] and does not return any value. It declares 14.0 functions, It has 14.0 functio... |
etianen_django-reversion | public | public | 0 | 0 | add_to_revision | def add_to_revision(obj, model_db=None):model_db = model_db or router.db_for_write(obj.__class__, instance=obj)for db in _current_frame().db_versions.keys():_add_to_revision(obj, db, model_db, True) | 3 | 4 | 2 | 48 | 1 | 206 | 209 | 206 | obj,model_db | ['model_db'] | None | {"Assign": 1, "Expr": 1, "For": 1} | 4 | 4 | 4 | ["router.db_for_write", "db_versions.keys", "_current_frame", "_add_to_revision"] | 3 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.reversion.management.commands.createinitialrevisions_py.Command.create_revision", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.reversion.revisions_p... | The function (add_to_revision) defined within the public class called public.The function start at line 206 and ends at 209. It contains 4 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [206.0] and does not return any value. It declares 4.0 functions, It has 4.0 functions c... |
etianen_django-reversion | public | public | 0 | 0 | _save_revision | def _save_revision(versions, user=None, comment="", meta=(), date_created=None, using=None):from reversion.models import Revisionfrom reversion.models import Version# Only save versions that exist in the database.# Use _base_manager so we don't have problems when _default_manager is overridenmodel_db_pks = defaultdict(... | 11 | 50 | 4 | 299 | 5 | 212 | 274 | 212 | versions,user,comment,meta,date_created,using | ['versions', 'revision', 'can_use_bulk_create', 'model_db_existing_pks', 'model_db_pks'] | None | {"Assign": 6, "Expr": 7, "For": 3, "If": 3, "Return": 1} | 19 | 63 | 19 | ["defaultdict", "defaultdict", "add", "frozenset", "map", "values_list", "filter", "model._base_manager.using", "db_pks.items", "model_db_pks.items", "Revision", "pre_revision_commit.send", "revision.save", "version.save", "bulk_create", "Version.objects.using", "create", "meta_model._base_manager.db_manager", "post_re... | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.reversion.revisions_py._create_revision_context"] | The function (_save_revision) defined within the public class called public.The function start at line 212 and ends at 274. It contains 50 lines of code and it has a cyclomatic complexity of 11. It takes 4 parameters, represented as [212.0] and does not return any value. It declares 19.0 functions, It has 19.0 function... |
etianen_django-reversion | public | public | 0 | 0 | _dummy_context | def _dummy_context():yield | 1 | 2 | 0 | 5 | 0 | 278 | 279 | 278 | [] | None | {"Expr": 1} | 0 | 2 | 0 | [] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.reversion.revisions_py._create_revision_context"] | The function (_dummy_context) defined within the public class called public.The function start at line 278 and ends at 279. 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 ["_... | |
etianen_django-reversion | public | public | 0 | 0 | _create_revision_context | def _create_revision_context(manage_manually, using, atomic):context = transaction.atomic(using=using) if atomic else _dummy_context()with context:_push_frame(manage_manually, using)try:yieldif transaction.get_connection(using).in_atomic_block and transaction.get_rollback(using):# Transaction is in invalid state due to... | 7 | 20 | 3 | 133 | 2 | 283 | 308 | 283 | manage_manually,using,atomic | ['current_frame', 'context'] | None | {"Assign": 2, "Expr": 4, "If": 2, "Return": 1, "Try": 1, "With": 1} | 11 | 26 | 11 | ["transaction.atomic", "_dummy_context", "_push_frame", "transaction.get_connection", "transaction.get_rollback", "any", "_stack.get", "_current_frame", "_save_revision", "values", "_pop_frame"] | 0 | [] | The function (_create_revision_context) defined within the public class called public.The function start at line 283 and ends at 308. It contains 20 lines of code and it has a cyclomatic complexity of 7. It takes 3 parameters, represented as [283.0] and does not return any value. It declares 11.0 functions, and It has... |
etianen_django-reversion | public | public | 0 | 0 | create_revision | def create_revision(manage_manually=False, using=None, atomic=True):from reversion.models import Revisionusing = using or router.db_for_write(Revision)return _ContextWrapper(_create_revision_context, (manage_manually, using, atomic)) | 2 | 4 | 3 | 44 | 1 | 311 | 314 | 311 | manage_manually,using,atomic | ['using'] | Returns | {"Assign": 1, "Return": 1} | 2 | 4 | 2 | ["router.db_for_write", "_ContextWrapper"] | 5 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.reversion.admin_py.VersionAdmin.create_revision", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.reversion.management.commands.createinitialrevisions_... | The function (create_revision) defined within the public class called public.The function start at line 311 and ends at 314. It contains 4 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [311.0], and this function return a value. It declares 2.0 functions, It has 2.0 functio... |
etianen_django-reversion | _ContextWrapper | protected | 0 | 0 | __init__ | def __init__(self, func, args):self._func = funcself._args = argsself._context = func(*args) | 1 | 4 | 3 | 28 | 0 | 319 | 322 | 319 | self,func,args | [] | None | {"Assign": 3} | 1 | 4 | 1 | ["func"] | 4,993 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16379211_lorcalhost_btb_manager_telegram.btb_manager_telegram.logging_py.LoggerHandler.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16379211_lorcalhost_btb_manager_telegram.btb_manager_telegram.schedule_... | The function (__init__) defined within the protected class called _ContextWrapper.The function start at line 319 and ends at 322. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [319.0] and does not return any value. It declare 1.0 function, It has 1.0 function... |
etianen_django-reversion | _ContextWrapper | protected | 0 | 0 | __enter__ | def __enter__(self):return self._context.__enter__() | 1 | 2 | 1 | 13 | 0 | 324 | 325 | 324 | self | [] | Returns | {"Return": 1} | 1 | 2 | 1 | ["self._context.__enter__"] | 3 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3955847_kinto_kinto_http_py.tests.test_replication_py.test_new_records_are_sent_to_the_destination", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3955847_kinto_kinto_http_py.tests.test_replication_py.test_removed_r... | The function (__enter__) defined within the protected class called _ContextWrapper.The function start at line 324 and ends at 325. 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 functio... |
etianen_django-reversion | _ContextWrapper | protected | 0 | 0 | __exit__ | def __exit__(self, exc_type, exc_value, traceback):return self._context.__exit__(exc_type, exc_value, traceback) | 1 | 2 | 4 | 24 | 0 | 327 | 328 | 327 | self,exc_type,exc_value,traceback | [] | Returns | {"Return": 1} | 1 | 2 | 1 | ["self._context.__exit__"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.84022601_jaraco_jaraco_windows.jaraco.windows.tempfile_py.TemporaryDirectory.__exit__"] | The function (__exit__) defined within the protected class called _ContextWrapper.The function start at line 327 and ends at 328. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [327.0], and this function return a value. It declare 1.0 function, It has 1.0 func... |
etianen_django-reversion | public | public | 0 | 0 | __call__.do_revision_context | def do_revision_context(*args, **kwargs):with self._func(*self._args):return func(*args, **kwargs) | 1 | 3 | 2 | 29 | 0 | 332 | 334 | 332 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (__call__.do_revision_context) defined within the public class called public.The function start at line 332 and ends at 334. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [332.0] and does not return any value.. |
etianen_django-reversion | _ContextWrapper | protected | 0 | 0 | __call__ | def __call__(self, func):@wraps(func)def do_revision_context(*args, **kwargs):with self._func(*self._args):return func(*args, **kwargs)return do_revision_context | 1 | 4 | 2 | 16 | 0 | 330 | 335 | 330 | self,func | [] | Returns | {"Return": 2, "With": 1} | 3 | 6 | 3 | ["self._func", "func", "wraps"] | 25 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3657361_openstack_archive_syntribos.syntribos.utils.file_utils_py.ContentType.__call__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3695822_home_assistant_libs_aiohue.tests.v2.test_button_controller_py.CopyingMoc... | The function (__call__) defined within the protected class called _ContextWrapper.The function start at line 330 and ends at 335. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [330.0], and this function return a value. It declares 3.0 functions, It has 3.0 fu... |
etianen_django-reversion | public | public | 0 | 0 | _post_save_receiver | def _post_save_receiver(sender, instance, using, **kwargs):if is_registered(sender) and is_active() and not is_manage_manually():add_to_revision(instance, model_db=using) | 4 | 3 | 4 | 35 | 0 | 338 | 340 | 338 | sender,instance,using,**kwargs | [] | None | {"Expr": 1, "If": 1} | 4 | 3 | 4 | ["is_registered", "is_active", "is_manage_manually", "add_to_revision"] | 0 | [] | The function (_post_save_receiver) defined within the public class called public.The function start at line 338 and ends at 340. It contains 3 lines of code and it has a cyclomatic complexity of 4. It takes 4 parameters, represented as [338.0] and does not return any value. It declares 4.0 functions, and It has 4.0 fu... |
etianen_django-reversion | public | public | 0 | 0 | _m2m_changed_receiver | def _m2m_changed_receiver(instance, using, action, model, reverse, **kwargs):if action.startswith("post_") and not reverse:if is_registered(instance) and is_active() and not is_manage_manually():add_to_revision(instance, model_db=using) | 6 | 4 | 6 | 50 | 0 | 343 | 346 | 343 | instance,using,action,model,reverse,**kwargs | [] | None | {"Expr": 1, "If": 2} | 5 | 4 | 5 | ["action.startswith", "is_registered", "is_active", "is_manage_manually", "add_to_revision"] | 0 | [] | The function (_m2m_changed_receiver) defined within the public class called public.The function start at line 343 and ends at 346. It contains 4 lines of code and it has a cyclomatic complexity of 6. It takes 6 parameters, represented as [343.0] and does not return any value. It declares 5.0 functions, and It has 5.0 ... |
etianen_django-reversion | public | public | 0 | 0 | _get_registration_key | def _get_registration_key(model):return (model._meta.app_label, model._meta.model_name) | 1 | 2 | 1 | 19 | 0 | 349 | 350 | 349 | model | [] | Returns | {"Return": 1} | 0 | 2 | 0 | [] | 4 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.reversion.revisions_py._get_options", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.reversion.revisions_py.is_registered", "_.content.gdrive.MyDrive.... | The function (_get_registration_key) defined within the public class called public.The function start at line 349 and ends at 350. 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 4.0 functions calling this function ... |
etianen_django-reversion | public | public | 0 | 0 | is_registered | def is_registered(model):return _get_registration_key(model) in _registered_models | 1 | 2 | 1 | 12 | 0 | 356 | 357 | 356 | model | [] | Returns | {"Return": 1} | 1 | 2 | 1 | ["_get_registration_key"] | 7 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.reversion.admin_py.VersionAdmin.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.reversion.admin_py.VersionAdmin._reversion_autoregister", "_... | The function (is_registered) defined within the public class called public.The function start at line 356 and ends at 357. 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... |
etianen_django-reversion | public | public | 0 | 0 | get_registered_models | def get_registered_models():return (apps.get_model(*key) for key in _registered_models.keys()) | 2 | 2 | 0 | 22 | 0 | 360 | 361 | 360 | [] | Returns | {"Return": 1} | 2 | 2 | 2 | ["apps.get_model", "_registered_models.keys"] | 0 | [] | The function (get_registered_models) defined within the public class called public.The function start at line 360 and ends at 361. It contains 2 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters, and this function return a value. It declares 2.0 functions, and It has 2.0 ... | |
etianen_django-reversion | public | public | 0 | 0 | _get_senders_and_signals | def _get_senders_and_signals(model):yield model, post_save, _post_save_receiveropts = model._meta.concrete_model._metafor field in opts.local_many_to_many:m2m_model = field.remote_field.throughif isinstance(m2m_model, str):if "." not in m2m_model:m2m_model = "{app_label}.{m2m_model}".format(app_label=opts.app_label,m2m... | 4 | 12 | 1 | 70 | 2 | 364 | 375 | 364 | model | ['m2m_model', 'opts'] | None | {"Assign": 3, "Expr": 2, "For": 1, "If": 2} | 2 | 12 | 2 | ["isinstance", "format"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.reversion.revisions_py.register", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.reversion.revisions_py.unregister"] | The function (_get_senders_and_signals) defined within the public class called public.The function start at line 364 and ends at 375. It contains 12 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters and does not return any value. It declares 2.0 functions, It has 2.0 funct... |
etianen_django-reversion | public | public | 0 | 0 | register | def register(model=None, fields=None, exclude=(), follow=(), format="json", for_concrete_model=True, ignore_duplicates=False, use_natural_foreign_keys=False): | 1 | 2 | 3 | 37 | 0 | 378 | 379 | 378 | model,fields,exclude,follow,format,for_concrete_model,ignore_duplicates,use_natural_foreign_keys | [] | Returns | {"Assign": 3, "Expr": 1, "For": 1, "If": 2, "Return": 3} | 10 | 39 | 10 | ["is_registered", "RegistrationError", "format", "_VersionOptions", "tuple", "tuple", "_get_registration_key", "_get_senders_and_signals", "signal.connect", "register"] | 221 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3657361_openstack_archive_syntribos.syntribos.signal_py.SignalHolder.compare", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3688162_zalando_incubator_kopf.kopf.reactor.registries_py.OperatorRegistry.register_resour... | The function (register) defined within the public class called public.The function start at line 378 and ends at 379. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [378.0], and this function return a value. It declares 10.0 functions, It has 10.0 functions ca... |
etianen_django-reversion | public | public | 0 | 0 | register | def register(model):# Prevent multiple registration.if is_registered(model):raise RegistrationError("{model} has already been registered with django-reversion".format(model=model,))# Parse fields.opts = model._meta.concrete_model._metaversion_options = _VersionOptions(fields=tuple(field_namefor field_namein ([field.nam... | 7 | 27 | 1 | 132 | 0 | 380 | 411 | 380 | model,fields,exclude,follow,format,for_concrete_model,ignore_duplicates,use_natural_foreign_keys | [] | Returns | {"Assign": 3, "Expr": 1, "For": 1, "If": 2, "Return": 3} | 10 | 39 | 10 | ["is_registered", "RegistrationError", "format", "_VersionOptions", "tuple", "tuple", "_get_registration_key", "_get_senders_and_signals", "signal.connect", "register"] | 221 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3657361_openstack_archive_syntribos.syntribos.signal_py.SignalHolder.compare", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3688162_zalando_incubator_kopf.kopf.reactor.registries_py.OperatorRegistry.register_resour... | The function (register) defined within the public class called public.The function start at line 380 and ends at 411. It contains 27 lines of code and it has a cyclomatic complexity of 7. The function does not take any parameters, and this function return a value. It declares 10.0 functions, It has 10.0 functions calle... |
etianen_django-reversion | public | public | 0 | 0 | _assert_registered | def _assert_registered(model):if not is_registered(model):raise RegistrationError("{model} has not been registered with django-reversion".format(model=model,)) | 2 | 5 | 1 | 25 | 0 | 419 | 423 | 419 | model | [] | None | {"If": 1} | 3 | 5 | 3 | ["is_registered", "RegistrationError", "format"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.reversion.revisions_py._get_options", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.reversion.revisions_py.unregister"] | The function (_assert_registered) defined within the public class called public.The function start at line 419 and ends at 423. 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, It has 3.0 functions ca... |
etianen_django-reversion | public | public | 0 | 0 | _get_options | def _get_options(model):_assert_registered(model)return _registered_models[_get_registration_key(model)] | 1 | 3 | 1 | 17 | 0 | 426 | 428 | 426 | model | [] | Returns | {"Expr": 1, "Return": 1} | 2 | 3 | 2 | ["_assert_registered", "_get_registration_key"] | 5 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.reversion.models_py.Version._local_field_dict", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.reversion.models_py.Version._object_version", "_.conten... | The function (_get_options) defined within the public class called public.The function start at line 426 and ends at 428. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declares 2.0 functions, It has 2.0 functions call... |
etianen_django-reversion | public | public | 0 | 0 | unregister | def unregister(model):_assert_registered(model)del _registered_models[_get_registration_key(model)]# Disconnect signals.for sender, signal, signal_receiver in _get_senders_and_signals(model):signal.disconnect(signal_receiver, sender=sender) | 2 | 5 | 1 | 39 | 0 | 431 | 436 | 431 | model | [] | None | {"Expr": 2, "For": 1} | 4 | 6 | 4 | ["_assert_registered", "_get_registration_key", "_get_senders_and_signals", "signal.disconnect"] | 0 | [] | The function (unregister) defined within the public class called public.The function start at line 431 and ends at 436. 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 4.0 functions, and It has 4.0 functions calle... |
etianen_django-reversion | public | public | 0 | 0 | _get_content_type | def _get_content_type(model, using):from django.contrib.contenttypes.models import ContentTypeversion_options = _get_options(model)return ContentType.objects.db_manager(using).get_for_model(model,for_concrete_model=version_options.for_concrete_model,) | 1 | 7 | 2 | 44 | 1 | 439 | 445 | 439 | model,using | ['version_options'] | Returns | {"Assign": 1, "Return": 1} | 3 | 7 | 3 | ["_get_options", "get_for_model", "ContentType.objects.db_manager"] | 3 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.reversion.models_py.Version.field_dict", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.reversion.models_py.VersionQuerySet.get_for_model", "_.content... | The function (_get_content_type) defined within the public class called public.The function start at line 439 and ends at 445. It contains 7 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [439.0], and this function return a value. It declares 3.0 functions, It has 3.0 funct... |
etianen_django-reversion | public | public | 0 | 0 | mute_signals | def mute_signals(*signals):"""Context manager that temporarily disables and then restores Django signals.This is useful when performing operations that shouldn't trigger signal handlers,such as viewing historical revisions where the signals were already fired whenthe data was originally saved.Args:*signals (django.disp... | 4 | 14 | 1 | 82 | 1 | 8 | 47 | 8 | *signals | ['paused'] | None | {"Assign": 4, "Expr": 4, "For": 2, "Try": 1, "With": 2} | 3 | 40 | 3 | ["signal.sender_receivers_cache.clear", "paused.items", "signal.sender_receivers_cache.clear"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.reversion.admin_py.VersionAdmin._reversion_revisionform_view"] | The function (mute_signals) defined within the public class called public.The function start at line 8 and ends at 47. It contains 14 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 3.0 functions, It has 3.0 functions called ins... |
etianen_django-reversion | public | public | 0 | 0 | _request_creates_revision | def _request_creates_revision(request):return request.method not in ("OPTIONS", "GET", "HEAD") | 1 | 2 | 1 | 18 | 0 | 6 | 7 | 6 | request | [] | Returns | {"Return": 1} | 0 | 2 | 0 | [] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.reversion.middleware_py.RevisionMiddleware.request_creates_revision", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.reversion.views_py.RevisionMixin.... | The function (_request_creates_revision) defined within the public class called public.The function start at line 6 and ends at 7. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It has 2.0 functions calling this function ... |
etianen_django-reversion | public | public | 0 | 0 | _set_user_from_request | def _set_user_from_request(request):if getattr(request, "user", None) and request.user.is_authenticated and get_user() is None:set_user(request.user) | 4 | 3 | 1 | 33 | 0 | 10 | 12 | 10 | request | [] | None | {"Expr": 1, "If": 1} | 3 | 3 | 3 | ["getattr", "get_user", "set_user"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.reversion.views_py.create_revision"] | The function (_set_user_from_request) defined within the public class called public.The function start at line 10 and ends at 12. It contains 3 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 3.0 functions, It has 3.0 functions ... |
etianen_django-reversion | public | public | 0 | 0 | create_revision.create_revision.decorator.do_revision_view | def do_revision_view(request, *args, **kwargs):if request_creates_revision(request):with create_revision_base(manage_manually=manage_manually, using=using, atomic=atomic):response = func(request, *args, **kwargs)_set_user_from_request(request)return responsereturn func(request, *args, **kwargs) | 2 | 7 | 3 | 62 | 0 | 25 | 31 | 25 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (create_revision.create_revision.decorator.do_revision_view) defined within the public class called public.The function start at line 25 and ends at 31. It contains 7 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [25.0] and does not return any value.. |
etianen_django-reversion | public | public | 0 | 0 | create_revision.decorator | def decorator(func):@wraps(func)def do_revision_view(request, *args, **kwargs):if request_creates_revision(request):with create_revision_base(manage_manually=manage_manually, using=using, atomic=atomic):response = func(request, *args, **kwargs)_set_user_from_request(request)return responsereturn func(request, *args, **... | 1 | 4 | 1 | 14 | 0 | 23 | 32 | 23 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (create_revision.decorator) defined within the public class called public.The function start at line 23 and ends at 32. 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.. |
etianen_django-reversion | public | public | 0 | 0 | create_revision | def create_revision(manage_manually=False, using=None, atomic=True, request_creates_revision=None):"""View decorator that wraps the request in a revision.The revision will have it's user set from the request automatically."""request_creates_revision = request_creates_revision or _request_creates_revisiondef decorator(f... | 2 | 4 | 4 | 29 | 2 | 15 | 33 | 15 | manage_manually,using,atomic,request_creates_revision | ['request_creates_revision', 'response'] | Returns | {"Assign": 2, "Expr": 2, "If": 1, "Return": 4, "With": 1} | 6 | 19 | 6 | ["request_creates_revision", "create_revision_base", "func", "_set_user_from_request", "func", "wraps"] | 5 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.reversion.admin_py.VersionAdmin.create_revision", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.reversion.management.commands.createinitialrevisions_... | The function (create_revision) defined within the public class called public.The function start at line 15 and ends at 33. It contains 4 lines of code and it has a cyclomatic complexity of 2. It takes 4 parameters, represented as [15.0], and this function return a value. It declares 6.0 functions, It has 6.0 functions ... |
etianen_django-reversion | RevisionMixin | public | 0 | 0 | __init__ | def __init__(self, *args, **kwargs):super().__init__(*args, **kwargs)self.dispatch = create_revision(manage_manually=self.revision_manage_manually,using=self.revision_using,atomic=self.revision_atomic,request_creates_revision=self.revision_request_creates_revision)(self.dispatch) | 1 | 8 | 3 | 58 | 0 | 50 | 57 | 50 | self,*args,**kwargs | [] | None | {"Assign": 1, "Expr": 1} | 3 | 8 | 3 | ["__init__", "super", "create_revision"] | 4,993 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16379211_lorcalhost_btb_manager_telegram.btb_manager_telegram.logging_py.LoggerHandler.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16379211_lorcalhost_btb_manager_telegram.btb_manager_telegram.schedule_... | The function (__init__) defined within the public class called RevisionMixin.The function start at line 50 and ends at 57. It contains 8 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [50.0] and does not return any value. It declares 3.0 functions, It has 3.0 functions call... |
etianen_django-reversion | RevisionMixin | public | 0 | 0 | revision_request_creates_revision | def revision_request_creates_revision(self, request):return _request_creates_revision(request) | 1 | 2 | 2 | 12 | 0 | 59 | 60 | 59 | self,request | [] | Returns | {"Return": 1} | 1 | 2 | 1 | ["_request_creates_revision"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.tests.test_app.views_py.RevisionMixinView.revision_request_creates_revision"] | The function (revision_request_creates_revision) defined within the public class called RevisionMixin.The function start at line 59 and ends at 60. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [59.0], and this function return a value. It declare 1.0 function... |
etianen_django-reversion | BaseRevisionCommand | public | 0 | 1 | add_arguments | def add_arguments(self, parser):super().add_arguments(parser)parser.add_argument("app_label",metavar="app_label",nargs="*",help="Optional app_label or app_label.model_name list.",)parser.add_argument("--using",default=None,help="The database to query for revision data.",)parser.add_argument("--model-db",default=None,he... | 1 | 18 | 2 | 64 | 0 | 10 | 27 | 10 | self,parser | [] | None | {"Expr": 4} | 5 | 18 | 5 | ["add_arguments", "super", "parser.add_argument", "parser.add_argument", "parser.add_argument"] | 6 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.reversion.management.commands.__init___py.BaseRevisionCommand.add_arguments", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.reversion.management.comm... | The function (add_arguments) defined within the public class called BaseRevisionCommand, that inherit another class.The function start at line 10 and ends at 27. It contains 18 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [10.0] and does not return any value. It declares ... |
etianen_django-reversion | BaseRevisionCommand | public | 0 | 1 | get_models | def get_models(self, options):# Load admin classes.if "django.contrib.admin" in settings.INSTALLED_APPS:admin.autodiscover()# Get options.app_labels = options["app_label"]# Parse model classes.if len(app_labels) == 0:selected_models = apps.get_models()else:selected_models = set()for label in app_labels:if "." in label:... | 9 | 25 | 2 | 129 | 0 | 29 | 58 | 29 | self,options | [] | None | {"Assign": 6, "Expr": 4, "For": 2, "If": 4, "Try": 2} | 12 | 30 | 12 | ["admin.autodiscover", "len", "apps.get_models", "set", "apps.get_model", "CommandError", "selected_models.add", "apps.get_app_config", "CommandError", "selected_models.update", "app.get_models", "is_registered"] | 4 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556496_BerriAI_litellm.litellm.llms.litellm_proxy.chat.transformation_py.LiteLLMProxyChatConfig.get_models", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556496_BerriAI_litellm.tests.test_models_py.test_get_mod... | The function (get_models) defined within the public class called BaseRevisionCommand, that inherit another class.The function start at line 29 and ends at 58. It contains 25 lines of code and it has a cyclomatic complexity of 9. It takes 2 parameters, represented as [29.0] and does not return any value. It declares 12.... |
etianen_django-reversion | Command | public | 0 | 1 | add_arguments | def add_arguments(self, parser):super().add_arguments(parser)parser.add_argument("--comment",action="store",default="Initial version.",help="Specify the comment to add to the revisions. Defaults to 'Initial version'.")parser.add_argument("--batch-size",action="store",type=int,default=500,help="For large sets of data, r... | 1 | 22 | 2 | 85 | 0 | 15 | 36 | 15 | self,parser | [] | None | {"Expr": 4} | 5 | 22 | 5 | ["add_arguments", "super", "parser.add_argument", "parser.add_argument", "parser.add_argument"] | 6 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.reversion.management.commands.__init___py.BaseRevisionCommand.add_arguments", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.reversion.management.comm... | The function (add_arguments) defined within the public class called Command, that inherit another class.The function start at line 15 and ends at 36. It contains 22 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [15.0] and does not return any value. It declares 5.0 function... |
etianen_django-reversion | Command | public | 0 | 1 | handle | def handle(self, *app_labels, **options):verbosity = options["verbosity"]using = options["using"]model_db = options["model_db"]comment = options["comment"]batch_size = options["batch_size"]meta = options["meta"]meta_models = []for label in meta.keys():try:model = apps.get_model(label)meta_models.append(model)except Loo... | 14 | 58 | 3 | 405 | 0 | 38 | 104 | 38 | self,*app_labels,**options | [] | None | {"Assign": 20, "AugAssign": 2, "Expr": 7, "For": 5, "If": 5, "Try": 1, "With": 1} | 30 | 67 | 30 | ["meta.keys", "apps.get_model", "meta_models.append", "CommandError", "meta.values", "router.db_for_write", "settings_dict.get", "transaction.atomic", "self.get_models", "self.stdout.write", "format", "_safe_subquery", "model._default_manager.using", "get_for_model", "Version.objects.using", "live_objs.order_by", "live... | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3964858_zephyrproject_rtos_west.src.west.app.project_py.Update.init_state"] | The function (handle) defined within the public class called Command, that inherit another class.The function start at line 38 and ends at 104. It contains 58 lines of code and it has a cyclomatic complexity of 14. It takes 3 parameters, represented as [38.0] and does not return any value. It declares 30.0 functions, I... |
etianen_django-reversion | Command | public | 0 | 1 | create_revision | def create_revision(self, obj, using, meta, meta_models, meta_values, comment, model_db):with create_revision(using=using):if meta:for model, values in zip(meta_models, meta_values):add_meta(model, **values)set_comment(comment)add_to_revision(obj, model_db=model_db) | 3 | 7 | 8 | 61 | 0 | 106 | 112 | 106 | self,obj,using,meta,meta_models,meta_values,comment,model_db | [] | None | {"Expr": 3, "For": 1, "If": 1, "With": 1} | 5 | 7 | 5 | ["create_revision", "zip", "add_meta", "set_comment", "add_to_revision"] | 5 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.reversion.admin_py.VersionAdmin.create_revision", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.reversion.management.commands.createinitialrevisions_... | The function (create_revision) defined within the public class called Command, that inherit another class.The function start at line 106 and ends at 112. It contains 7 lines of code and it has a cyclomatic complexity of 3. It takes 8 parameters, represented as [106.0] and does not return any value. It declares 5.0 func... |
etianen_django-reversion | Command | public | 0 | 1 | batch_complete | def batch_complete(self, verbosity, created_count, total):reset_queries()if verbosity >= 2:self.stdout.write("- Created {created_count} / {total}".format(created_count=created_count,total=total,)) | 2 | 7 | 4 | 39 | 0 | 114 | 120 | 114 | self,verbosity,created_count,total | [] | None | {"Expr": 2, "If": 1} | 3 | 7 | 3 | ["reset_queries", "self.stdout.write", "format"] | 0 | [] | The function (batch_complete) defined within the public class called Command, that inherit another class.The function start at line 114 and ends at 120. It contains 7 lines of code and it has a cyclomatic complexity of 2. It takes 4 parameters, represented as [114.0] and does not return any value. It declares 3.0 funct... |
etianen_django-reversion | Command | public | 0 | 1 | add_arguments | def add_arguments(self, parser):super().add_arguments(parser)parser.add_argument("--days",default=0,type=int,help="Delete only revisions older than the specified number of days.",)parser.add_argument("--keep",default=0,type=int,help="Keep the specified number of revisions (most recent) for each object.",) | 1 | 14 | 2 | 53 | 0 | 12 | 25 | 12 | self,parser | [] | None | {"Expr": 3} | 4 | 14 | 4 | ["add_arguments", "super", "parser.add_argument", "parser.add_argument"] | 6 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.reversion.management.commands.__init___py.BaseRevisionCommand.add_arguments", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.reversion.management.comm... | The function (add_arguments) defined within the public class called Command, that inherit another class.The function start at line 12 and ends at 25. It contains 14 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [12.0] and does not return any value. It declares 4.0 function... |
etianen_django-reversion | Command | public | 0 | 1 | handle | def handle(self, *app_labels, **options):verbosity = options["verbosity"]using = options["using"]model_db = options["model_db"]days = options["days"]keep = options["keep"]# Delete revisions.using = using or router.db_for_write(Revision)with transaction.atomic(using=using):revision_query = models.Q()keep_revision_ids = ... | 9 | 59 | 3 | 403 | 0 | 27 | 94 | 27 | self,*app_labels,**options | [] | None | {"Assign": 15, "AugAssign": 1, "Expr": 5, "For": 2, "If": 5, "With": 1} | 42 | 68 | 42 | ["router.db_for_write", "transaction.atomic", "models.Q", "set", "self.get_models", "self.stdout.write", "format", "get_for_model", "Version.objects.using", "list", "iterator", "values_list", "filter", "annotate", "values_list", "order_by", "get_for_model", "Version.objects.using", "models.Count", "model_query.filter",... | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3964858_zephyrproject_rtos_west.src.west.app.project_py.Update.init_state"] | The function (handle) defined within the public class called Command, that inherit another class.The function start at line 27 and ends at 94. It contains 59 lines of code and it has a cyclomatic complexity of 9. It takes 3 parameters, represented as [27.0] and does not return any value. It declares 42.0 functions, It ... |
etianen_django-reversion | TestModelWithNaturalKeyManager | public | 0 | 1 | get_by_natural_key | def get_by_natural_key(self, name):return self.get(name=name) | 1 | 2 | 2 | 16 | 0 | 124 | 125 | 124 | self,name | [] | Returns | {"Return": 1} | 1 | 2 | 1 | ["self.get"] | 0 | [] | The function (get_by_natural_key) defined within the public class called TestModelWithNaturalKeyManager, that inherit another class.The function start at line 124 and ends at 125. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [124.0], and this function return... |
etianen_django-reversion | TestModelWithNaturalKey | public | 0 | 1 | natural_key | def natural_key(self):return (self.name,) | 1 | 2 | 1 | 12 | 0 | 136 | 137 | 136 | self | [] | Returns | {"Return": 1} | 0 | 2 | 0 | [] | 0 | [] | The function (natural_key) defined within the public class called TestModelWithNaturalKey, that inherit another class.The function start at line 136 and ends at 137. 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.. |
etianen_django-reversion | public | public | 0 | 0 | save_obj_view | def save_obj_view(request):return HttpResponse(TestModel.objects.create().id) | 1 | 2 | 1 | 18 | 0 | 8 | 9 | 8 | request | [] | Returns | {"Return": 1} | 2 | 2 | 2 | ["HttpResponse", "TestModel.objects.create"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.tests.test_app.views_py.RevisionMixinView.dispatch", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.tests.test_app.views_py.create_revision_view"] | The function (save_obj_view) defined within the public class called public.The function start at line 8 and ends at 9. 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 2.0 functions, It has 2.0 functions called ... |
etianen_django-reversion | public | public | 0 | 0 | save_obj_error_view | def save_obj_error_view(request):with transaction.atomic():TestModel.objects.create()raise Exception("Boom!") | 1 | 4 | 1 | 24 | 0 | 12 | 15 | 12 | request | [] | None | {"Expr": 1, "With": 1} | 3 | 4 | 3 | ["transaction.atomic", "TestModel.objects.create", "Exception"] | 0 | [] | The function (save_obj_error_view) defined within the public class called public.The function start at line 12 and ends at 15. 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 3.0 functions, and It has 3.0 function... |
etianen_django-reversion | public | public | 0 | 0 | create_revision_view | def create_revision_view(request):return save_obj_view(request) | 1 | 2 | 1 | 10 | 0 | 19 | 20 | 19 | request | [] | Returns | {"Return": 1} | 2 | 2 | 2 | ["save_obj_view", "create_revision"] | 0 | [] | The function (create_revision_view) 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 this function return a value. It declares 2.0 functions, and It has 2.0 fun... |
etianen_django-reversion | RevisionMixinView | public | 0 | 1 | revision_request_creates_revision | def revision_request_creates_revision(self, request):silent = request.headers.get('X-Norevision', "false") == "true"return super().revision_request_creates_revision(request) and not silent | 2 | 3 | 2 | 33 | 0 | 25 | 27 | 25 | self,request | [] | Returns | {"Assign": 1, "Return": 1} | 3 | 3 | 3 | ["request.headers.get", "revision_request_creates_revision", "super"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3700918_etianen_django_reversion.tests.test_app.views_py.RevisionMixinView.revision_request_creates_revision"] | The function (revision_request_creates_revision) defined within the public class called RevisionMixinView, that inherit another class.The function start at line 25 and ends at 27. It contains 3 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [25.0], and this function return ... |
etianen_django-reversion | RevisionMixinView | public | 0 | 1 | dispatch | def dispatch(self, request):return save_obj_view(request) | 1 | 2 | 2 | 12 | 0 | 29 | 30 | 29 | self,request | [] | Returns | {"Return": 1} | 1 | 2 | 1 | ["save_obj_view"] | 12 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3527343_frigg_frigg_hq.frigg.webhooks.views_py.WebhookView.dispatch", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.57092491_pinax_pinax_stripe_light.pinax.stripe.views_py.Webhook.dispatch", "_.content.gdrive.MyDriv... | The function (dispatch) defined within the public class called RevisionMixinView, that inherit another class.The function start at line 29 and ends at 30. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [29.0], and this function return a value. It declare 1.0 f... |
etianen_django-reversion | TestBaseMixin | public | 0 | 0 | reloadUrls | def reloadUrls(self):reload(import_module(settings.ROOT_URLCONF))clear_url_caches() | 1 | 3 | 1 | 17 | 0 | 24 | 26 | 24 | self | [] | None | {"Expr": 2} | 3 | 3 | 3 | ["reload", "import_module", "clear_url_caches"] | 0 | [] | The function (reloadUrls) defined within the public class called TestBaseMixin.The function start at line 24 and ends at 26. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 3.0 functions, and It has 3.0 functions ... |
etianen_django-reversion | TestBaseMixin | public | 0 | 0 | setUp | def setUp(self):super().setUp()for model in list(reversion.get_registered_models()):reversion.unregister(model) | 2 | 4 | 1 | 30 | 0 | 28 | 31 | 28 | self | [] | None | {"Expr": 2, "For": 1} | 5 | 4 | 5 | ["setUp", "super", "list", "reversion.get_registered_models", "reversion.unregister"] | 180 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3527343_frigg_frigg_hq.tests.api.test_views_py.BuildAPITestCase.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3527343_frigg_frigg_hq.tests.api.test_views_py.ProjectAPITestCase.setUp", "_.content.gdrive.MyDri... | The function (setUp) defined within the public class called TestBaseMixin.The function start at line 28 and ends at 31. It contains 4 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 5.0 functions, It has 5.0 functions called ins... |
etianen_django-reversion | TestBaseMixin | public | 0 | 0 | tearDown | def tearDown(self):super().tearDown()for model in list(reversion.get_registered_models()):reversion.unregister(model) | 2 | 4 | 1 | 30 | 0 | 33 | 36 | 33 | self | [] | None | {"Expr": 2, "For": 1} | 5 | 4 | 5 | ["tearDown", "super", "list", "reversion.get_registered_models", "reversion.unregister"] | 30 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3574420_guillermooo_vintageous.tests.commands.test_all_cmds_py.AllCommandsTester.tearDown", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3574420_guillermooo_vintageous.tests.ex.test_location_py.TestSearchHelpers.te... | The function (tearDown) defined within the public class called TestBaseMixin.The function start at line 33 and ends at 36. It contains 4 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 5.0 functions, It has 5.0 functions called ... |
etianen_django-reversion | TestBaseMixin | public | 0 | 0 | callCommand | def callCommand(self, command, *args, **kwargs):kwargs.setdefault("stdout", StringIO())kwargs.setdefault("stderr", StringIO())kwargs.setdefault("verbosity", 2)return call_command(command, *args, **kwargs) | 1 | 5 | 4 | 52 | 0 | 38 | 42 | 38 | self,command,*args,**kwargs | [] | Returns | {"Expr": 3, "Return": 1} | 6 | 5 | 6 | ["kwargs.setdefault", "StringIO", "kwargs.setdefault", "StringIO", "kwargs.setdefault", "call_command"] | 0 | [] | The function (callCommand) defined within the public class called TestBaseMixin.The function start at line 38 and ends at 42. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [38.0], and this function return a value. It declares 6.0 functions, and It has 6.0 fu... |
etianen_django-reversion | TestBaseMixin | public | 0 | 0 | assertSingleRevision | def assertSingleRevision(self, objects, user=None, comment="", meta_names=(), date_created=None, using=None, model_db=None): | 1 | 2 | 5 | 32 | 0 | 44 | 45 | 44 | self,objects,user,comment,meta_names,date_created,using,model_db | [] | None | {"Assign": 1, "Expr": 8, "For": 2, "If": 2} | 26 | 22 | 26 | ["get", "get_for_object", "Version.objects.using", "self.assertEqual", "hasattr", "self.assertRegex", "revision.get_comment", "self.assertEqual", "revision.get_comment", "self.assertAlmostEqual", "timezone.now", "timedelta", "self.assertEqual", "revision.testmeta_set.count", "len", "self.assertTrue", "exists", "revisio... | 0 | [] | The function (assertSingleRevision) defined within the public class called TestBaseMixin.The function start at line 44 and ends at 45. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [44.0] and does not return any value. It declares 26.0 functions, and It has ... |
etianen_django-reversion | TestBaseMixin | public | 0 | 0 | assertNoRevision | def assertNoRevision(self, using=None):self.assertEqual(Revision.objects.using(using).all().count(), 0) | 1 | 2 | 2 | 32 | 0 | 67 | 68 | 67 | self,using | [] | None | {"Expr": 1} | 4 | 2 | 4 | ["self.assertEqual", "count", "all", "Revision.objects.using"] | 0 | [] | The function (assertNoRevision) defined within the public class called TestBaseMixin.The function start at line 67 and ends at 68. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [67.0] and does not return any value. It declares 4.0 functions, and It has 4.0 f... |
etianen_django-reversion | TestBaseMixin | public | 0 | 0 | setUp | def setUp(self):super().setUp()reversion.register(TestModel) | 1 | 3 | 1 | 18 | 0 | 81 | 83 | 81 | self | [] | None | {"Expr": 2, "For": 1} | 5 | 4 | 5 | ["setUp", "super", "list", "reversion.get_registered_models", "reversion.unregister"] | 180 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3527343_frigg_frigg_hq.tests.api.test_views_py.BuildAPITestCase.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3527343_frigg_frigg_hq.tests.api.test_views_py.ProjectAPITestCase.setUp", "_.content.gdrive.MyDri... | The function (setUp) defined within the public class called TestBaseMixin.The function start at line 81 and ends at 83. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 5.0 functions, It has 5.0 functions called ins... |
etianen_django-reversion | TestBaseMixin | public | 0 | 0 | setUp | def setUp(self):super().setUp()reversion.register(TestModelParent, follow=("testmodel_ptr",)) | 1 | 3 | 1 | 25 | 0 | 88 | 90 | 88 | self | [] | None | {"Expr": 2, "For": 1} | 5 | 4 | 5 | ["setUp", "super", "list", "reversion.get_registered_models", "reversion.unregister"] | 180 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3527343_frigg_frigg_hq.tests.api.test_views_py.BuildAPITestCase.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3527343_frigg_frigg_hq.tests.api.test_views_py.ProjectAPITestCase.setUp", "_.content.gdrive.MyDri... | The function (setUp) defined within the public class called TestBaseMixin.The function start at line 88 and ends at 90. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 5.0 functions, It has 5.0 functions called ins... |
etianen_django-reversion | TestBaseMixin | public | 0 | 0 | setUp | def setUp(self):super().setUp()self.user = User(username="test", is_staff=True, is_superuser=True)self.user.set_password("password")self.user.save() | 1 | 5 | 1 | 45 | 0 | 96 | 100 | 96 | self | [] | None | {"Expr": 2, "For": 1} | 5 | 4 | 5 | ["setUp", "super", "list", "reversion.get_registered_models", "reversion.unregister"] | 180 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3527343_frigg_frigg_hq.tests.api.test_views_py.BuildAPITestCase.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3527343_frigg_frigg_hq.tests.api.test_views_py.ProjectAPITestCase.setUp", "_.content.gdrive.MyDri... | The function (setUp) defined within the public class called TestBaseMixin.The function start at line 96 and ends at 100. It contains 5 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 5.0 functions, It has 5.0 functions called in... |
etianen_django-reversion | TestBaseMixin | public | 0 | 0 | setUp | def setUp(self):super().setUp()self.client.login(username="test", password="password") | 1 | 3 | 1 | 26 | 0 | 105 | 107 | 105 | self | [] | None | {"Expr": 2, "For": 1} | 5 | 4 | 5 | ["setUp", "super", "list", "reversion.get_registered_models", "reversion.unregister"] | 180 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3527343_frigg_frigg_hq.tests.api.test_views_py.BuildAPITestCase.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3527343_frigg_frigg_hq.tests.api.test_views_py.ProjectAPITestCase.setUp", "_.content.gdrive.MyDri... | The function (setUp) defined within the public class called TestBaseMixin.The function start at line 105 and ends at 107. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 5.0 functions, It has 5.0 functions called i... |
etianen_django-reversion | AdminMixin | public | 0 | 1 | setUp | def setUp(self):super().setUp()admin.site.register(TestModelParent, VersionAdmin)self.reloadUrls() | 1 | 4 | 1 | 27 | 0 | 15 | 18 | 15 | self | [] | None | {"Expr": 3} | 4 | 4 | 4 | ["setUp", "super", "admin.site.register", "self.reloadUrls"] | 180 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3527343_frigg_frigg_hq.tests.api.test_views_py.BuildAPITestCase.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3527343_frigg_frigg_hq.tests.api.test_views_py.ProjectAPITestCase.setUp", "_.content.gdrive.MyDri... | The function (setUp) defined within the public class called AdminMixin, that inherit another class.The function start at line 15 and ends at 18. 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 4.0 functions, It has... |
etianen_django-reversion | AdminMixin | public | 0 | 1 | tearDown | def tearDown(self):super().tearDown()admin.site.unregister(TestModelParent)self.reloadUrls() | 1 | 4 | 1 | 25 | 0 | 20 | 23 | 20 | self | [] | None | {"Expr": 3} | 4 | 4 | 4 | ["tearDown", "super", "admin.site.unregister", "self.reloadUrls"] | 30 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3574420_guillermooo_vintageous.tests.commands.test_all_cmds_py.AllCommandsTester.tearDown", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3574420_guillermooo_vintageous.tests.ex.test_location_py.TestSearchHelpers.te... | The function (tearDown) defined within the public class called AdminMixin, that inherit another class.The function start at line 20 and ends at 23. 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 4.0 functions, It ... |
etianen_django-reversion | AdminRegisterTest | public | 0 | 1 | setAutoRegister | def setAutoRegister(self):self.assertTrue(reversion.is_registered(TestModelParent)) | 1 | 2 | 1 | 16 | 0 | 28 | 29 | 28 | self | [] | None | {"Expr": 1} | 2 | 2 | 2 | ["self.assertTrue", "reversion.is_registered"] | 0 | [] | The function (setAutoRegister) defined within the public class called AdminRegisterTest, that inherit another class.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 declares 2.0 ... |
etianen_django-reversion | AdminRegisterTest | public | 0 | 1 | setAutoRegisterFollowsParent | def setAutoRegisterFollowsParent(self):self.assertTrue(reversion.is_registered(TestModel)) | 1 | 2 | 1 | 16 | 0 | 31 | 32 | 31 | self | [] | None | {"Expr": 1} | 2 | 2 | 2 | ["self.assertTrue", "reversion.is_registered"] | 0 | [] | The function (setAutoRegisterFollowsParent) defined within the public class called AdminRegisterTest, that inherit another class.The function start at line 31 and ends at 32. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It ... |
etianen_django-reversion | AdminAddViewTest | public | 0 | 1 | testAddView | def testAddView(self):self.client.post(resolve_url("admin:test_app_testmodelparent_add"), {"name": "v1","parent_name": "parent_v1",})obj = TestModelParent.objects.get()self.assertSingleRevision((obj, obj.testmodel_ptr), user=self.user, comment="Added.") | 1 | 9 | 1 | 58 | 0 | 37 | 45 | 37 | self | [] | None | {"Assign": 1, "Expr": 2} | 4 | 9 | 4 | ["self.client.post", "resolve_url", "TestModelParent.objects.get", "self.assertSingleRevision"] | 0 | [] | The function (testAddView) defined within the public class called AdminAddViewTest, that inherit another class.The function start at line 37 and ends at 45. It contains 9 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 4.0 funct... |
etianen_django-reversion | AdminUpdateViewTest | public | 0 | 1 | testUpdateView | def testUpdateView(self):obj = TestModelParent.objects.create()self.client.post(resolve_url("admin:test_app_testmodelparent_change", obj.pk), {"name": "v2","parent_name": "parent v2",})self.assertSingleRevision((obj, obj.testmodel_ptr), user=self.user,# Django 3.0 changed formatting a bit.comment=re.compile(r"Changed [... | 1 | 10 | 1 | 68 | 0 | 50 | 60 | 50 | self | [] | None | {"Assign": 1, "Expr": 2} | 5 | 11 | 5 | ["TestModelParent.objects.create", "self.client.post", "resolve_url", "self.assertSingleRevision", "re.compile"] | 0 | [] | The function (testUpdateView) defined within the public class called AdminUpdateViewTest, that inherit another class.The function start at line 50 and ends at 60. 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 5.... |
etianen_django-reversion | AdminChangelistView | public | 0 | 1 | testChangelistView | def testChangelistView(self):obj = TestModelParent.objects.create()response = self.client.get(resolve_url("admin:test_app_testmodelparent_changelist"))self.assertContains(response, resolve_url("admin:test_app_testmodelparent_change", obj.pk)) | 1 | 4 | 1 | 42 | 0 | 65 | 68 | 65 | self | [] | None | {"Assign": 2, "Expr": 1} | 5 | 4 | 5 | ["TestModelParent.objects.create", "self.client.get", "resolve_url", "self.assertContains", "resolve_url"] | 0 | [] | The function (testChangelistView) defined within the public class called AdminChangelistView, that inherit another class.The function start at line 65 and ends at 68. 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... |
etianen_django-reversion | AdminMixin | public | 0 | 1 | setUp | def setUp(self):super().setUp()with reversion.create_revision():self.obj = TestModelParent.objects.create()with reversion.create_revision():self.obj.name = "v2"self.obj.parent_name = "parent v2"self.obj.save() | 1 | 8 | 1 | 58 | 0 | 73 | 80 | 73 | self | [] | None | {"Expr": 3} | 4 | 4 | 4 | ["setUp", "super", "admin.site.register", "self.reloadUrls"] | 180 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3527343_frigg_frigg_hq.tests.api.test_views_py.BuildAPITestCase.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3527343_frigg_frigg_hq.tests.api.test_views_py.ProjectAPITestCase.setUp", "_.content.gdrive.MyDri... | The function (setUp) defined within the public class called AdminMixin, that inherit another class.The function start at line 73 and ends at 80. It contains 8 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 4.0 functions, It has... |
etianen_django-reversion | AdminRevisionViewTest | public | 0 | 1 | testRevisionView | def testRevisionView(self):response = self.client.get(resolve_url("admin:test_app_testmodelparent_revision",self.obj.pk,Version.objects.get_for_object(self.obj)[1].pk,))self.assertContains(response, 'value="v1"')self.assertContains(response, 'value="parent v1"')# Test that the changes were rolled back.self.obj.refresh_... | 1 | 13 | 1 | 109 | 0 | 82 | 95 | 82 | self | [] | None | {"Assign": 1, "Expr": 7} | 10 | 14 | 10 | ["self.client.get", "resolve_url", "Version.objects.get_for_object", "self.assertContains", "self.assertContains", "self.obj.refresh_from_db", "self.assertEqual", "self.assertEqual", "self.assertIn", "self.assertTrue"] | 0 | [] | The function (testRevisionView) defined within the public class called AdminRevisionViewTest, that inherit another class.The function start at line 82 and ends at 95. 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 declare... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.