diff --git a/azure/multiapi/cosmosdb/v2017_04_17/common/_connection.py b/azure/multiapi/cosmosdb/v2017_04_17/common/_connection.py index 28f683e..6645081 100644 --- a/azure/multiapi/cosmosdb/v2017_04_17/common/_connection.py +++ b/azure/multiapi/cosmosdb/v2017_04_17/common/_connection.py @@ -88,7 +88,7 @@ def __init__(self, service, account_name=None, account_key=None, sas_token=None, path = parsed_url.path.rstrip('/') self.primary_endpoint = parsed_url.netloc + path - self.protocol = self.protocol if parsed_url.scheme is '' else parsed_url.scheme + self.protocol = self.protocol if parsed_url.scheme == '' else parsed_url.scheme else: if not self.account_name: raise ValueError(_ERROR_STORAGE_MISSING_INFO) diff --git a/azure/multiapi/storage/v2015_04_05/_connection.py b/azure/multiapi/storage/v2015_04_05/_connection.py index 8721e92..368ab27 100644 --- a/azure/multiapi/storage/v2015_04_05/_connection.py +++ b/azure/multiapi/storage/v2015_04_05/_connection.py @@ -76,7 +76,7 @@ def __init__(self, service, account_name=None, account_key=None, sas_token=None, if custom_domain: parsed_url = urlparse(custom_domain) self.primary_endpoint = parsed_url.netloc + parsed_url.path - self.protocol = self.protocol if parsed_url.scheme is '' else parsed_url.scheme + self.protocol = self.protocol if parsed_url.scheme == '' else parsed_url.scheme else: if not self.account_name: raise ValueError(_ERROR_STORAGE_MISSING_INFO) diff --git a/azure/multiapi/storage/v2015_04_05/blob/baseblobservice.py b/azure/multiapi/storage/v2015_04_05/blob/baseblobservice.py index 8e594db..74ee912 100644 --- a/azure/multiapi/storage/v2015_04_05/blob/baseblobservice.py +++ b/azure/multiapi/storage/v2015_04_05/blob/baseblobservice.py @@ -919,7 +919,7 @@ def acquire_container_lease( :return: str ''' _validate_not_none('lease_duration', lease_duration) - if lease_duration is not -1 and\ + if lease_duration != -1 and\ (lease_duration < 15 or lease_duration > 60): raise ValueError(_ERROR_INVALID_LEASE_DURATION) @@ -2262,7 +2262,7 @@ def acquire_blob_lease(self, container_name, blob_name, ''' _validate_not_none('lease_duration', lease_duration) - if lease_duration is not -1 and\ + if lease_duration != -1 and\ (lease_duration < 15 or lease_duration > 60): raise ValueError(_ERROR_INVALID_LEASE_DURATION) response = self._lease_blob_impl(container_name, diff --git a/azure/multiapi/storage/v2016_05_31/_connection.py b/azure/multiapi/storage/v2016_05_31/_connection.py index b9585b3..53a5367 100644 --- a/azure/multiapi/storage/v2016_05_31/_connection.py +++ b/azure/multiapi/storage/v2016_05_31/_connection.py @@ -80,7 +80,7 @@ def __init__(self, service, account_name=None, account_key=None, sas_token=None, path = parsed_url.path.rstrip('/') self.primary_endpoint = parsed_url.netloc + path - self.protocol = self.protocol if parsed_url.scheme is '' else parsed_url.scheme + self.protocol = self.protocol if parsed_url.scheme == '' else parsed_url.scheme else: if not self.account_name: raise ValueError(_ERROR_STORAGE_MISSING_INFO) diff --git a/azure/multiapi/storage/v2016_05_31/blob/_upload_chunking.py b/azure/multiapi/storage/v2016_05_31/blob/_upload_chunking.py index 150989a..a8a8e20 100644 --- a/azure/multiapi/storage/v2016_05_31/blob/_upload_chunking.py +++ b/azure/multiapi/storage/v2016_05_31/blob/_upload_chunking.py @@ -366,7 +366,7 @@ def read(self, n): n = self._length - self._position # return fast - if n is 0 or self._buffer.closed: + if n == 0 or self._buffer.closed: return b'' # attempt first read from the read buffer diff --git a/azure/multiapi/storage/v2016_05_31/blob/baseblobservice.py b/azure/multiapi/storage/v2016_05_31/blob/baseblobservice.py index 9839401..93007a7 100644 --- a/azure/multiapi/storage/v2016_05_31/blob/baseblobservice.py +++ b/azure/multiapi/storage/v2016_05_31/blob/baseblobservice.py @@ -972,7 +972,7 @@ def acquire_container_lease( :return: str ''' _validate_not_none('lease_duration', lease_duration) - if lease_duration is not -1 and\ + if lease_duration != -1 and\ (lease_duration < 15 or lease_duration > 60): raise ValueError(_ERROR_INVALID_LEASE_DURATION) @@ -2524,7 +2524,7 @@ def acquire_blob_lease(self, container_name, blob_name, ''' _validate_not_none('lease_duration', lease_duration) - if lease_duration is not -1 and\ + if lease_duration != -1 and\ (lease_duration < 15 or lease_duration > 60): raise ValueError(_ERROR_INVALID_LEASE_DURATION) lease = self._lease_blob_impl(container_name, diff --git a/azure/multiapi/storage/v2017_04_17/blob/_upload_chunking.py b/azure/multiapi/storage/v2017_04_17/blob/_upload_chunking.py index 5b345cb..59e11b2 100644 --- a/azure/multiapi/storage/v2017_04_17/blob/_upload_chunking.py +++ b/azure/multiapi/storage/v2017_04_17/blob/_upload_chunking.py @@ -388,7 +388,7 @@ def read(self, n): n = self._length - self._position # return fast - if n is 0 or self._buffer.closed: + if n == 0 or self._buffer.closed: return b'' # attempt first read from the read buffer and update position diff --git a/azure/multiapi/storage/v2017_04_17/blob/baseblobservice.py b/azure/multiapi/storage/v2017_04_17/blob/baseblobservice.py index 20b47a2..e74f555 100644 --- a/azure/multiapi/storage/v2017_04_17/blob/baseblobservice.py +++ b/azure/multiapi/storage/v2017_04_17/blob/baseblobservice.py @@ -974,7 +974,7 @@ def acquire_container_lease( :return: str ''' _validate_not_none('lease_duration', lease_duration) - if lease_duration is not -1 and \ + if lease_duration != -1 and \ (lease_duration < 15 or lease_duration > 60): raise ValueError(_ERROR_INVALID_LEASE_DURATION) @@ -2527,7 +2527,7 @@ def acquire_blob_lease(self, container_name, blob_name, ''' _validate_not_none('lease_duration', lease_duration) - if lease_duration is not -1 and \ + if lease_duration != -1 and \ (lease_duration < 15 or lease_duration > 60): raise ValueError(_ERROR_INVALID_LEASE_DURATION) lease = self._lease_blob_impl(container_name, diff --git a/azure/multiapi/storage/v2017_04_17/common/_connection.py b/azure/multiapi/storage/v2017_04_17/common/_connection.py index ca92925..0c1566f 100755 --- a/azure/multiapi/storage/v2017_04_17/common/_connection.py +++ b/azure/multiapi/storage/v2017_04_17/common/_connection.py @@ -84,7 +84,7 @@ def __init__(self, service, account_name=None, account_key=None, sas_token=None, path = parsed_url.path.rstrip('/') self.primary_endpoint = parsed_url.netloc + path - self.protocol = self.protocol if parsed_url.scheme is '' else parsed_url.scheme + self.protocol = self.protocol if parsed_url.scheme == '' else parsed_url.scheme else: if not self.account_name: raise ValueError(_ERROR_STORAGE_MISSING_INFO) diff --git a/azure/multiapi/storage/v2017_07_29/blob/_upload_chunking.py b/azure/multiapi/storage/v2017_07_29/blob/_upload_chunking.py index e73388b..0abf847 100644 --- a/azure/multiapi/storage/v2017_07_29/blob/_upload_chunking.py +++ b/azure/multiapi/storage/v2017_07_29/blob/_upload_chunking.py @@ -389,7 +389,7 @@ def read(self, n): n = self._length - self._position # return fast - if n is 0 or self._buffer.closed: + if n == 0 or self._buffer.closed: return b'' # attempt first read from the read buffer and update position diff --git a/azure/multiapi/storage/v2017_07_29/blob/baseblobservice.py b/azure/multiapi/storage/v2017_07_29/blob/baseblobservice.py index 437394a..7ffbb39 100644 --- a/azure/multiapi/storage/v2017_07_29/blob/baseblobservice.py +++ b/azure/multiapi/storage/v2017_07_29/blob/baseblobservice.py @@ -993,7 +993,7 @@ def acquire_container_lease( :return: str ''' _validate_not_none('lease_duration', lease_duration) - if lease_duration is not -1 and \ + if lease_duration != -1 and \ (lease_duration < 15 or lease_duration > 60): raise ValueError(_ERROR_INVALID_LEASE_DURATION) @@ -2563,7 +2563,7 @@ def acquire_blob_lease(self, container_name, blob_name, ''' _validate_not_none('lease_duration', lease_duration) - if lease_duration is not -1 and \ + if lease_duration != -1 and \ (lease_duration < 15 or lease_duration > 60): raise ValueError(_ERROR_INVALID_LEASE_DURATION) lease = self._lease_blob_impl(container_name, diff --git a/azure/multiapi/storage/v2017_07_29/common/_connection.py b/azure/multiapi/storage/v2017_07_29/common/_connection.py index 5fe746d..990f8e9 100644 --- a/azure/multiapi/storage/v2017_07_29/common/_connection.py +++ b/azure/multiapi/storage/v2017_07_29/common/_connection.py @@ -76,7 +76,7 @@ def __init__(self, service, account_name=None, account_key=None, sas_token=None, path = parsed_url.path.rstrip('/') self.primary_endpoint = parsed_url.netloc + path - self.protocol = self.protocol if parsed_url.scheme is '' else parsed_url.scheme + self.protocol = self.protocol if parsed_url.scheme == '' else parsed_url.scheme else: if not self.account_name: raise ValueError(_ERROR_STORAGE_MISSING_INFO) diff --git a/azure/multiapi/storage/v2017_11_09/blob/_upload_chunking.py b/azure/multiapi/storage/v2017_11_09/blob/_upload_chunking.py index 6925450..97a617d 100644 --- a/azure/multiapi/storage/v2017_11_09/blob/_upload_chunking.py +++ b/azure/multiapi/storage/v2017_11_09/blob/_upload_chunking.py @@ -389,7 +389,7 @@ def read(self, n): n = self._length - self._position # return fast - if n is 0 or self._buffer.closed: + if n == 0 or self._buffer.closed: return b'' # attempt first read from the read buffer and update position diff --git a/azure/multiapi/storage/v2017_11_09/blob/baseblobservice.py b/azure/multiapi/storage/v2017_11_09/blob/baseblobservice.py index d0fbe0d..5deb89b 100644 --- a/azure/multiapi/storage/v2017_11_09/blob/baseblobservice.py +++ b/azure/multiapi/storage/v2017_11_09/blob/baseblobservice.py @@ -1000,7 +1000,7 @@ def acquire_container_lease( :return: str ''' _validate_not_none('lease_duration', lease_duration) - if lease_duration is not -1 and \ + if lease_duration != -1 and \ (lease_duration < 15 or lease_duration > 60): raise ValueError(_ERROR_INVALID_LEASE_DURATION) @@ -2570,7 +2570,7 @@ def acquire_blob_lease(self, container_name, blob_name, ''' _validate_not_none('lease_duration', lease_duration) - if lease_duration is not -1 and \ + if lease_duration != -1 and \ (lease_duration < 15 or lease_duration > 60): raise ValueError(_ERROR_INVALID_LEASE_DURATION) lease = self._lease_blob_impl(container_name, diff --git a/azure/multiapi/storage/v2017_11_09/common/_connection.py b/azure/multiapi/storage/v2017_11_09/common/_connection.py index 1388fdd..6160148 100644 --- a/azure/multiapi/storage/v2017_11_09/common/_connection.py +++ b/azure/multiapi/storage/v2017_11_09/common/_connection.py @@ -78,7 +78,7 @@ def __init__(self, service, account_name=None, account_key=None, sas_token=None, path = parsed_url.path.rstrip('/') self.primary_endpoint = parsed_url.netloc + path - self.protocol = self.protocol if parsed_url.scheme is '' else parsed_url.scheme + self.protocol = self.protocol if parsed_url.scheme == '' else parsed_url.scheme else: if not self.account_name: raise ValueError(_ERROR_STORAGE_MISSING_INFO) diff --git a/azure/multiapi/storage/v2018_03_28/blob/_upload_chunking.py b/azure/multiapi/storage/v2018_03_28/blob/_upload_chunking.py index b94f058..6da0858 100644 --- a/azure/multiapi/storage/v2018_03_28/blob/_upload_chunking.py +++ b/azure/multiapi/storage/v2018_03_28/blob/_upload_chunking.py @@ -400,7 +400,7 @@ def read(self, n): n = self._length - self._position # return fast - if n is 0 or self._buffer.closed: + if n == 0 or self._buffer.closed: return b'' # attempt first read from the read buffer and update position diff --git a/azure/multiapi/storage/v2018_03_28/blob/baseblobservice.py b/azure/multiapi/storage/v2018_03_28/blob/baseblobservice.py index 1f4f360..8373938 100644 --- a/azure/multiapi/storage/v2018_03_28/blob/baseblobservice.py +++ b/azure/multiapi/storage/v2018_03_28/blob/baseblobservice.py @@ -1005,7 +1005,7 @@ def acquire_container_lease( :return: str ''' _validate_not_none('lease_duration', lease_duration) - if lease_duration is not -1 and \ + if lease_duration != -1 and \ (lease_duration < 15 or lease_duration > 60): raise ValueError(_ERROR_INVALID_LEASE_DURATION) @@ -2604,7 +2604,7 @@ def acquire_blob_lease(self, container_name, blob_name, ''' _validate_not_none('lease_duration', lease_duration) - if lease_duration is not -1 and \ + if lease_duration != -1 and \ (lease_duration < 15 or lease_duration > 60): raise ValueError(_ERROR_INVALID_LEASE_DURATION) lease = self._lease_blob_impl(container_name, diff --git a/azure/multiapi/storage/v2018_03_28/common/_connection.py b/azure/multiapi/storage/v2018_03_28/common/_connection.py index 1388fdd..6160148 100644 --- a/azure/multiapi/storage/v2018_03_28/common/_connection.py +++ b/azure/multiapi/storage/v2018_03_28/common/_connection.py @@ -78,7 +78,7 @@ def __init__(self, service, account_name=None, account_key=None, sas_token=None, path = parsed_url.path.rstrip('/') self.primary_endpoint = parsed_url.netloc + path - self.protocol = self.protocol if parsed_url.scheme is '' else parsed_url.scheme + self.protocol = self.protocol if parsed_url.scheme == '' else parsed_url.scheme else: if not self.account_name: raise ValueError(_ERROR_STORAGE_MISSING_INFO) diff --git a/azure/multiapi/storage/v2018_11_09/blob/_upload_chunking.py b/azure/multiapi/storage/v2018_11_09/blob/_upload_chunking.py index b94f058..6da0858 100644 --- a/azure/multiapi/storage/v2018_11_09/blob/_upload_chunking.py +++ b/azure/multiapi/storage/v2018_11_09/blob/_upload_chunking.py @@ -400,7 +400,7 @@ def read(self, n): n = self._length - self._position # return fast - if n is 0 or self._buffer.closed: + if n == 0 or self._buffer.closed: return b'' # attempt first read from the read buffer and update position diff --git a/azure/multiapi/storage/v2018_11_09/blob/baseblobservice.py b/azure/multiapi/storage/v2018_11_09/blob/baseblobservice.py index 92641cd..3cc065c 100644 --- a/azure/multiapi/storage/v2018_11_09/blob/baseblobservice.py +++ b/azure/multiapi/storage/v2018_11_09/blob/baseblobservice.py @@ -1060,7 +1060,7 @@ def acquire_container_lease( :return: str ''' _validate_not_none('lease_duration', lease_duration) - if lease_duration is not -1 and \ + if lease_duration != -1 and \ (lease_duration < 15 or lease_duration > 60): raise ValueError(_ERROR_INVALID_LEASE_DURATION) @@ -2716,7 +2716,7 @@ def acquire_blob_lease(self, container_name, blob_name, ''' _validate_not_none('lease_duration', lease_duration) - if lease_duration is not -1 and \ + if lease_duration != -1 and \ (lease_duration < 15 or lease_duration > 60): raise ValueError(_ERROR_INVALID_LEASE_DURATION) lease = self._lease_blob_impl(container_name, diff --git a/azure/multiapi/storage/v2018_11_09/common/_connection.py b/azure/multiapi/storage/v2018_11_09/common/_connection.py index 6836cf9..2dc6f22 100644 --- a/azure/multiapi/storage/v2018_11_09/common/_connection.py +++ b/azure/multiapi/storage/v2018_11_09/common/_connection.py @@ -79,7 +79,7 @@ def __init__(self, service, account_name=None, account_key=None, sas_token=None, path = parsed_url.path.rstrip('/') self.primary_endpoint = parsed_url.netloc + path - self.protocol = self.protocol if parsed_url.scheme is '' else parsed_url.scheme + self.protocol = self.protocol if parsed_url.scheme == '' else parsed_url.scheme else: if not self.account_name: raise ValueError(_ERROR_STORAGE_MISSING_INFO)