scottwernervt/cloudstorage

View on GitHub

Showing 65 of 65 total issues

Function generate_container_upload_url has 10 arguments (exceeds 4 allowed). Consider refactoring.
Open

    def generate_container_upload_url(
Severity: Major
Found in src/cloudstorage/base.py - About 1 hr to fix

    Function generate_container_upload_url has 10 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        def generate_container_upload_url(
    Severity: Major
    Found in src/cloudstorage/drivers/rackspace.py - About 1 hr to fix

      Function _set_file_attributes has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
      Open

          def _set_file_attributes(self, filename: str, attributes: Dict) -> None:
              """Set extended filesystem attributes to a file.
      
              Metadata is set to `user.metadata.<attr-name>` and remaining attributes
              are set to `user.<attr-name>`.
      Severity: Minor
      Found in src/cloudstorage/drivers/local.py - About 1 hr to fix

      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 upload_blob has 10 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          def upload_blob(
      Severity: Major
      Found in src/cloudstorage/base.py - About 1 hr to fix

        Function get_blobs has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
        Open

            def get_blobs(self, container: Container) -> Iterable[Blob]:
                container_path = self._get_folder_path(container, validate=True)
        
                for folder, sub_folders, files in os.walk(container_path, topdown=True):
                    # Remove unwanted sub-folders
        Severity: Minor
        Found in src/cloudstorage/drivers/local.py - About 1 hr to fix

        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 generate_container_upload_url has 10 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            def generate_container_upload_url(
        Severity: Major
        Found in src/cloudstorage/drivers/amazon.py - About 1 hr to fix

          Function generate_container_upload_url has 10 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              def generate_container_upload_url(
          Severity: Major
          Found in src/cloudstorage/drivers/google.py - About 1 hr to fix

            Function generate_container_upload_url has 10 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                def generate_container_upload_url(
            Severity: Major
            Found in src/cloudstorage/drivers/microsoft.py - About 1 hr to fix

              Function upload_blob has 10 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  def upload_blob(
              Severity: Major
              Found in src/cloudstorage/drivers/rackspace.py - About 1 hr to fix

                Function generate_container_upload_url has 10 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    def generate_container_upload_url(
                Severity: Major
                Found in src/cloudstorage/drivers/minio.py - About 1 hr to fix

                  Function generate_container_upload_url has 10 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      def generate_container_upload_url(
                  Severity: Major
                  Found in src/cloudstorage/drivers/local.py - About 1 hr to fix

                    Function upload_blob has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                    Open

                        def upload_blob(
                            self,
                            container: Container,
                            filename: FileLike,
                            blob_name: str = None,
                    Severity: Minor
                    Found in src/cloudstorage/drivers/rackspace.py - About 1 hr to fix

                    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 upload_blob has 10 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                        def upload_blob(
                    Severity: Major
                    Found in src/cloudstorage/drivers/local.py - About 1 hr to fix

                      Function upload_blob has 10 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                          def upload_blob(
                      Severity: Major
                      Found in src/cloudstorage/drivers/amazon.py - About 1 hr to fix

                        Function upload_blob has 10 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                            def upload_blob(
                        Severity: Major
                        Found in src/cloudstorage/drivers/microsoft.py - About 1 hr to fix

                          Function upload_blob has 10 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                              def upload_blob(
                          Severity: Major
                          Found in src/cloudstorage/drivers/google.py - About 1 hr to fix

                            Function generate_upload_url has 9 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                def generate_upload_url(
                            Severity: Major
                            Found in src/cloudstorage/base.py - About 1 hr to fix

                              Function upload_blob has 9 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                  def upload_blob(
                              Severity: Major
                              Found in src/cloudstorage/base.py - About 1 hr to fix

                                Function _get_server_public_url has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                                Open

                                    def _get_server_public_url(self, service_name: str) -> str:
                                        """Return the public endpoint URL for a particular service region.
                                
                                        `https://storage101.iad3.clouddrive.com/v1/MossoCloudFS_XXXXX`
                                
                                
                                Severity: Minor
                                Found in src/cloudstorage/drivers/rackspace.py - About 1 hr to fix

                                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 upload_blob has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                                Open

                                    def upload_blob(
                                        self,
                                        container: Container,
                                        filename: FileLike,
                                        blob_name: str = None,
                                Severity: Minor
                                Found in src/cloudstorage/drivers/google.py - About 1 hr to fix

                                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

                                Severity
                                Category
                                Status
                                Source
                                Language