Nikolay-Lysenko/sinethesizer

View on GitHub

Showing 17 of 17 total issues

Function apply_room_reverb has 20 arguments (exceeds 10 allowed). Consider refactoring.
Open

def apply_room_reverb(
Severity: Major
Found in sinethesizer/effects/reverb.py - About 1 hr to fix

    Function create_generic_ahdsr_envelope has 17 arguments (exceeds 10 allowed). Consider refactoring.
    Open

    def create_generic_ahdsr_envelope(
    Severity: Major
    Found in sinethesizer/envelopes/ahdsr.py - About 1 hr to fix

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

      def apply_automated_effect(
              sound: np.ndarray, event: 'sinethesizer.synth.core.Event',
              automated_effect_name: str, break_points: list[dict[str, Any]],
              **kwargs
      ) -> np.ndarray:
      Severity: Minor
      Found in sinethesizer/effects/automation.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_room_impulse_response has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
      Open

      def generate_room_impulse_response(
              room: Room, listener: Listener, sound_source: SoundSource,
              n_reflections: int, frame_rate: int
      ) -> np.ndarray:
          """
      Severity: Minor
      Found in sinethesizer/effects/reverb.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 apply_artificial_reverb has 14 arguments (exceeds 10 allowed). Consider refactoring.
      Open

      def apply_artificial_reverb(
      Severity: Major
      Found in sinethesizer/effects/reverb.py - About 1 hr to fix

        Function create_relative_ahdsr_envelope has 13 arguments (exceeds 10 allowed). Consider refactoring.
        Open

        def create_relative_ahdsr_envelope(
        Severity: Major
        Found in sinethesizer/envelopes/ahdsr.py - About 50 mins to fix

          Function convert_midi_to_events has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
          Open

          def convert_midi_to_events(
                  midi_path: str, settings: dict[str, Any]
          ) -> list[Event]:
              """
              Collect sound events (loosely speaking, played notes) from a MIDI file.
          Severity: Minor
          Found in sinethesizer/io/midi_to_events.py - About 45 mins 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 apply_relative_phaser has 12 arguments (exceeds 10 allowed). Consider refactoring.
          Open

          def apply_relative_phaser(
          Severity: Major
          Found in sinethesizer/effects/filter_sweep.py - About 45 mins to fix

            Function apply_absolute_phaser has 12 arguments (exceeds 10 allowed). Consider refactoring.
            Open

            def apply_absolute_phaser(
            Severity: Major
            Found in sinethesizer/effects/filter_sweep.py - About 45 mins to fix

              Function generate_artificial_impulse_response has 12 arguments (exceeds 10 allowed). Consider refactoring.
              Open

              def generate_artificial_impulse_response(
              Severity: Major
              Found in sinethesizer/effects/reverb.py - About 45 mins to fix

                Function create_exponentially_decaying_envelope has 12 arguments (exceeds 10 allowed). Consider refactoring.
                Open

                def create_exponentially_decaying_envelope(
                Severity: Major
                Found in sinethesizer/envelopes/misc.py - About 45 mins to fix

                  Function create_list_of_yaml_paths has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                  Open

                  def create_list_of_yaml_paths(input_path: str) -> list[str]:
                      """
                      Create list of paths to YAML files with presets.
                  
                      :param input_path:
                  Severity: Minor
                  Found in sinethesizer/io/load_presets.py - About 45 mins 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 create_relative_ahdsr_envelope has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                  Open

                  def create_relative_ahdsr_envelope(
                          event: 'sinethesizer.synth.core.Event',
                          attack_to_ahds_ratio: float = 0.2,
                          attack_degree: float = 1.0,
                          hold_to_ahds_ratio: float = 0.05,
                  Severity: Minor
                  Found in sinethesizer/envelopes/ahdsr.py - About 45 mins 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 create_generic_ahdsr_envelope has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                  Open

                  def create_generic_ahdsr_envelope(
                          event: 'sinethesizer.synth.core.Event',
                          attack_to_ahds_max_ratio: float = 0.2,
                          max_attack_duration: float = 0.2,
                          attack_degree: float = 1.0,
                  Severity: Minor
                  Found in sinethesizer/envelopes/ahdsr.py - About 45 mins 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_new_level_of_tiling has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                  Open

                  def generate_new_level_of_tiling(
                          previous_level: dict[tuple[int, ...], np.ndarray],
                          increment_pairs: tuple[tuple[float, float], ...]
                  ) -> dict[tuple[float, ...], np.ndarray]:
                      """
                  Severity: Minor
                  Found in sinethesizer/effects/reverb.py - About 35 mins 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 create_exponentially_decaying_envelope has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                  def create_exponentially_decaying_envelope(
                          event: 'sinethesizer.synth.core.Event',
                          attack_to_ad_max_ratio: float = 0.025,
                          max_attack_duration: float = 0.025,
                          attack_degree: float = 1.0,
                  Severity: Minor
                  Found in sinethesizer/envelopes/misc.py - About 25 mins 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 mix_with_original_sound has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                  def mix_with_original_sound(fn):
                      """
                      Add support of argument named `original_sound_weight`.
                  
                      If this argument is passed, a signal processed by an effect is mixed
                  Severity: Minor
                  Found in sinethesizer/utils/misc.py - About 25 mins 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