This is an automated email from the ASF dual-hosted git repository.

bossenti pushed a commit to branch exp/poetry
in repository https://gitbox.apache.org/repos/asf/streampipes.git

commit 229ac65f804c061736489b128beabd32c54fcfc8
Author: bossenti <[email protected]>
AuthorDate: Tue Aug 1 18:28:39 2023 +0200

    chore: use `isinstance()` instead of type comparison
    
    Signed-off-by: bossenti <[email protected]>
---
 .../streampipes/model/container/resource_container.py                   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/streampipes-client-python/streampipes/model/container/resource_container.py 
b/streampipes-client-python/streampipes/model/container/resource_container.py
index 27016896e..c3a974647 100644
--- 
a/streampipes-client-python/streampipes/model/container/resource_container.py
+++ 
b/streampipes-client-python/streampipes/model/container/resource_container.py
@@ -181,7 +181,7 @@ class ResourceContainer(ABC):
 
         # the ResourceContainer expects a list of items
         # raise an exception if the response does not be a list
-        if not type(parsed_json) == list:
+        if not isinstance(parsed_json, list):
             raise 
StreamPipesResourceContainerJSONError(container_name=str(cls), 
json_string=json_string)
 
         try:

Reply via email to