Repository: tomplus/kubernetes_asyncio (language: python)

Issue:
watch.stream no longer works with apis with follow kwarg
This is a regression of #98, possibly coming from commit 2d0452d52, which changed the docstring of the methods from

```
:param bool follow: Follow the log stream of the pod. Defaults to false.
```

to

```
:param follow: Follow the log stream of the pod. Defaults to false.
:type follow: bool
```

causing

https://github.com/tomplus/kubernetes_asyncio/blob/65ce783fc3f015f9e464a90c028b902b58023c9b/kubernetes_asyncio/watch/watch.py#L24

and

https://github.com/tomplus/kubernetes_asyncio/blob/65ce783fc3f015f9e464a90c028b902b58023c9b/kubernetes_asyncio/watch/watch.py#L68-L72

to not work correctly.

@tomplus if you agree, we may do:
```diff
- PYDOC_FOLLOW_PARAM = ":param bool follow:" 
+ PYDOC_FOLLOW_PARAM = ":param follow:" 
```


Discussion / hints:
Good point. Thanks for your investigation. Could you send a PR to fix it?

Fix patch:
diff --git a/kubernetes_asyncio/watch/watch.py b/kubernetes_asyncio/watch/watch.py
index 28dcd28f4..7873101a6 100644
--- a/kubernetes_asyncio/watch/watch.py
+++ b/kubernetes_asyncio/watch/watch.py
@@ -21,7 +21,7 @@
 from kubernetes_asyncio import client
 
 PYDOC_RETURN_LABEL = ":rtype:"
-PYDOC_FOLLOW_PARAM = ":param bool follow:"
+PYDOC_FOLLOW_PARAM = ":param follow:"
 
 # Removing this suffix from return type name should give us event's object
 # type. e.g., if list_namespaces() returns "NamespaceList" type,


Test patch:
diff --git a/kubernetes_asyncio/watch/watch_test.py b/kubernetes_asyncio/watch/watch_test.py
index 21ffa4558..11c79afb5 100644
--- a/kubernetes_asyncio/watch/watch_test.py
+++ b/kubernetes_asyncio/watch/watch_test.py
@@ -81,7 +81,7 @@ async def test_watch_for_follow(self):
 
         fake_api = Mock()
         fake_api.read_namespaced_pod_log = CoroutineMock(return_value=fake_resp)
-        fake_api.read_namespaced_pod_log.__doc__ = ':param bool follow:\n:rtype: str'
+        fake_api.read_namespaced_pod_log.__doc__ = ':param follow:\n:type follow: bool\n:rtype: str'
 
         watch = kubernetes_asyncio.watch.Watch()
         count = 1