apify-sdk-python
apify-sdk-python copied to clipboard
Replace usage of asserts with ValueError checks
Good point, especially in https://github.com/apify/apify-sdk-python/blob/master/src/apify/proxy_configuration.py#L280-L282 or in the storages code it's used wrongly. But in a lot of places we use assert just as a type assertion to fool Mypy, maybe we can keep it there? Unless then the S101 rule would be too difficult to set up, in that case let's just switch to ValueErrors everywhere.
But in a lot of places we use assert just as a type assertion to fool Mypy, maybe we can keep it there?
I got it, however, I suppose the use of isinstance() should have the same effect, don't you think?