Repository: OpenMined/PySyft

Issue:
Fix all darglint docs warnings
## Description
Currently there are 419 warnings:
```
$ flake8 src tests | wc -l
419
```

We can progressively improve this with multiple PRs.
If you are interested, please run the checker on the `src` and `tests` folders and try to fix the warnings until there are none.
Some will require adding docs that don't exist while others are just fixes.

This will likely require multiple PRs so if you are interested open a PR with a few fixes and we will go from there.

## Definition of Done
All docstring warnings are fixed and CI has the darglint checker turned on to fail the build.


Discussion:
@madhavajay I have opened a PR to fix darglint warnings for `src/syft/utils.py` . What I wish to know is whether you want a seperate PR for each file or just for `src/syft` or `tests/syft`

Resolving patch:
diff --git a/src/syft/core/common/object.py b/src/syft/core/common/object.py
--- a/src/syft/core/common/object.py
+++ b/src/syft/core/common/object.py
@@ -37,9 +37,8 @@ def __init__(self, id: Optional[UID] = None):
         primary purpose of this class. It also sets the 'as_wrapper' flag
         for the 'Serializable' superclass.
 
-        :param id: an override which can be used to set an ID for this object
-            manually. This is probably only used for deserialization.
-        :type id: UID
+        Args:
+            id: an override which can be used to set an ID for this object
 
         """
 
@@ -58,8 +57,8 @@ def id(self) -> UID:
         developers of Syft from modifying .id attributes after an object
         has been initialized.
 
-        :return: returns the unique id of the object
-        :rtype: UID
+        Returns:
+            returns the unique id of the object
         """
         return self._id
 
@@ -70,10 +69,11 @@ def __eq__(self, other: Any) -> bool:
         comparing whether they have the same .id objects. These objects
         come with their own __eq__ function which we assume to be correct.
 
-        :param other: this is the other ObjectWithIDs to be compared with
-        :type other: Any (note this must be Any or __eq__ fails on other types)
-        :return: returns True/False based on whether the objects are the same
-        :rtype: bool
+        Args:
+            other: this is the other ObjectWithIDs to be compared with
+
+        Returns:
+            True/False based on whether the objects are the same
         """
 
         try:
@@ -82,33 +82,39 @@ def __eq__(self, other: Any) -> bool:
             return False
 
     def __repr__(self) -> str:
-        """Returns a human-readable version of the ObjectWithID
-
+        """
         Return a human-readable representation of the ObjectWithID with brackets
         so that it can be easily spotted when nested inside of the human-
-        readable representations of other objects."""
+        readable representations of other objects.
+
+        Returns:
+            a human-readable version of the ObjectWithID
+
+        """
 
         no_dash = str(self.id.value).replace("-", "")
         return f"<{type(self).__name__}: {no_dash}>"
 
     def repr_short(self) -> str:
-        """Returns a SHORT human-readable version of SpecificLocation
-
+        """
         Return a SHORT human-readable version of the ID which
         makes it print nicer when embedded (often alongside other
-        UID objects) within other object __repr__ methods."""
+        UID objects) within other object __repr__ methods.
+
+        Returns:
+            a SHORT human-readable version of SpecificLocation
+        """
 
         return f"<{type(self).__name__}:{self.id.repr_short()}>"
 
     def _object2proto(self) -> ObjectWithID_PB:
-        """Returns a protobuf serialization of self.
-
+        """
         As a requirement of all objects which inherit from Serializable,
         this method transforms the current object into the corresponding
         Protobuf object so that it can be further serialized.
 
-        :return: returns a protobuf object
-        :rtype: ObjectWithID_PB
+        Returns:
+            a protobuf object that is the serialization of self.
 
         .. note::
             This method is purely an internal method. Please use object.serialize() or one of
@@ -124,8 +130,11 @@ def _proto2object(proto: ObjectWithID_PB) -> "ObjectWithID":
         As a requirement of all objects which inherit from Serializable,
         this method transforms a protobuf object into an instance of this class.
 
-        :return: returns an instance of ObjectWithID
-        :rtype: ObjectWithID
+        Args:
+            proto: a protobuf object that we wish to convert to instance of this class
+
+        Returns:
+            an instance of ObjectWithID
 
         .. note::
             This method is purely an internal method. Please use syft.deserialize()
@@ -147,8 +156,8 @@ def get_protobuf_schema() -> GeneratedProtocolMessageType:
         it takes whatever type is returned from this method and adds an attribute to it
         with the type of this class attached to it. See the MetaSerializable class for details.
 
-        :return: the type of protobuf object which corresponds to this class.
-        :rtype: GeneratedProtocolMessageType
+        Returns:
+            the type of protobuf object which corresponds to this class.
 
         """
 


Test patch: