src/cloudstorage/base.py
File base.py
has 1107 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import abc
import logging
from abc import abstractmethod
from datetime import datetime
from pathlib import Path
Driver
has 24 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class Driver(metaclass=abc.ABCMeta):
"""Abstract Base Driver Class (:class:`abc.ABCMeta`) to derive from.
.. todo::
Function __init__
has 14 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
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_upload_url
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def generate_upload_url(
Function upload_blob
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def upload_blob(
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Function generate_blob_download_url
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def generate_blob_download_url(
Function __init__
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
Open
def __init__(
self,
name: str,
checksum: str,
etag: str,
- 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 __init__
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
Open
def __init__(
self,
name: str,
driver: "Driver",
acl: 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"