src/cloudstorage/drivers/microsoft.py
File microsoft.py
has 389 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
"""Microsoft Azure Storage Driver."""
import base64
import codecs
import logging
from datetime import datetime, timedelta
AzureStorageDriver
has 27 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class AzureStorageDriver(Driver):
"""Driver for interacting with Microsoft Azure Storage.
.. code-block:: python
Function upload_blob
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def upload_blob(
Function generate_container_upload_url
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def generate_container_upload_url(
Function generate_blob_download_url
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def generate_blob_download_url(
Function upload_blob
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
Open
def upload_blob(
self,
container: Container,
filename: FileLike,
blob_name: str = None,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function create_container
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
Open
def create_container(
self, container_name: str, acl: str = None, meta_data: MetaData = None
) -> Container:
meta_data = meta_data if meta_data is not None else {}
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"