BjornFJohansson/pydna

View on GitHub

Showing 140 of 219 total issues

Function __init__ has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open
  • Open
  • Confirmed
  • Invalid
  • Wontfix
Cancel

    def __init__(self, record, *args, amplicon=None, position=None, footprint=0, **kwargs):
Severity: Minor
Found in src/pydna/primer.py - About 45 mins to fix

    Function __str__ has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
    Open
    • Open
    • Confirmed
    • Invalid
    • Wontfix
    Cancel

        def __str__(self):
            """returns a short report describing if or where primer
            anneal on the template."""
    
            mystring = "Template {name} {size} bp {top} limit={limit}:\n".format(
    Severity: Minor
    Found in src/pydna/amplify.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 reduced_field has 6 arguments (exceeds 4 allowed). Consider refactoring.
    Open
    • Open
    • Confirmed
    • Invalid
    • Wontfix
    Cancel

    def reduced_field(eta, a, mu0, E, kB, T):
    Severity: Minor
    Found in scripts/gel/gel_old.py - About 45 mins to fix

      Function reduced_field_Kuhn has 6 arguments (exceeds 4 allowed). Consider refactoring.
      Open
      • Open
      • Confirmed
      • Invalid
      • Wontfix
      Cancel

      def reduced_field_Kuhn(eta, l, mu0, E, kB, T):
      Severity: Minor
      Found in scripts/gel/gel_old.py - About 45 mins to fix

        Function __init__ has 6 arguments (exceeds 4 allowed). Consider refactoring.
        Open
        • Open
        • Confirmed
        • Invalid
        • Wontfix
        Cancel

            def __init__(self, record, *args, template=None, forward_primer=None, reverse_primer=None, **kwargs):
        Severity: Minor
        Found in src/pydna/amplicon.py - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open
          • Open
          • Confirmed
          • Invalid
          • Wontfix
          Cancel

                              if isinstance(val, str):
                                  dct[key] = a[key].strip()
                          nl.append(dct)
          Severity: Major
          Found in src/pydna/genbankfixer.py - About 45 mins to fix

            Function from_SeqRecord has 6 arguments (exceeds 4 allowed). Consider refactoring.
            Open
            • Open
            • Confirmed
            • Invalid
            • Wontfix
            Cancel

                def from_SeqRecord(
            Severity: Minor
            Found in src/pydna/dseqrecord.py - About 45 mins to fix

              Function __init__ has 6 arguments (exceeds 4 allowed). Consider refactoring.
              Open
              • Open
              • Confirmed
              • Invalid
              • Wontfix
              Cancel

                  def __init__(self, seq, *args, id="id", name="name", description="description", **kwargs):
              Severity: Minor
              Found in src/pydna/seqrecord.py - About 45 mins to fix

                Function translate has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open
                • Open
                • Confirmed
                • Invalid
                • Wontfix
                Cancel

                    def translate(self, table="Standard", stop_symbol="*", to_stop=False, cds=False, gap="-"):
                Severity: Minor
                Found in src/pydna/dseq.py - About 35 mins to fix

                  Function __init__ has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open
                  • Open
                  • Confirmed
                  • Invalid
                  • Wontfix
                  Cancel

                      def __init__(self, record, *args, graph=None, nodemap=None, **kwargs):
                  Severity: Minor
                  Found in src/pydna/contig.py - About 35 mins to fix

                    Function pore_size has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open
                    • Open
                    • Confirmed
                    • Invalid
                    • Wontfix
                    Cancel

                    def pore_size(gamma, muL, mu0, lp, b):
                    Severity: Minor
                    Found in scripts/gel/gel_old.py - About 35 mins to fix

                      Function tmbresluc has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open
                      • Open
                      • Confirmed
                      • Invalid
                      • Wontfix
                      Cancel

                      def tmbresluc(primer: str, *args, primerc=500.0, saltc=50, **kwargs):
                      Severity: Minor
                      Found in src/pydna/tm.py - About 35 mins to fix

                        Function from_string has 5 arguments (exceeds 4 allowed). Consider refactoring.
                        Open
                        • Open
                        • Confirmed
                        • Invalid
                        • Wontfix
                        Cancel

                            def from_string(
                        Severity: Minor
                        Found in src/pydna/dseq.py - About 35 mins to fix

                          Function ta_dbd has 5 arguments (exceeds 4 allowed). Consider refactoring.
                          Open
                          • Open
                          • Confirmed
                          • Invalid
                          • Wontfix
                          Cancel

                          def ta_dbd(fp, rp, seq, tm=tm_dbd, tm_product=None):
                          Severity: Minor
                          Found in src/pydna/tm.py - About 35 mins to fix

                            Function __init__ has 5 arguments (exceeds 4 allowed). Consider refactoring.
                            Open
                            • Open
                            • Confirmed
                            • Invalid
                            • Wontfix
                            Cancel

                                def __init__(
                            Severity: Minor
                            Found in src/pydna/myprimers.py - About 35 mins to fix

                              Function all_simple_paths_edges has 5 arguments (exceeds 4 allowed). Consider refactoring.
                              Open
                              • Open
                              • Confirmed
                              • Invalid
                              • Wontfix
                              Cancel

                              def all_simple_paths_edges(G, source, target, cutoff=None, data=False):
                              Severity: Minor
                              Found in scripts/_simple_paths8.py - About 35 mins to fix

                                Function from_SeqRecord has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                Open
                                • Open
                                • Confirmed
                                • Invalid
                                • Wontfix
                                Cancel

                                    def from_SeqRecord(cls, record, *args, graph=None, nodemap=None, **kwargs):
                                Severity: Minor
                                Found in src/pydna/contig.py - About 35 mins to fix

                                  Function ta_default has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open
                                  • Open
                                  • Confirmed
                                  • Invalid
                                  • Wontfix
                                  Cancel

                                  def ta_default(fp: str, rp: str, seq: str, tm=tm_default, tm_product=tm_product):
                                  Severity: Minor
                                  Found in src/pydna/tm.py - About 35 mins to fix

                                    Function diffusion_coefficient has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                    Open
                                    • Open
                                    • Confirmed
                                    • Invalid
                                    • Wontfix
                                    Cancel

                                    def diffusion_coefficient(Nbp, N_lim1, N_lim2, N_lim3, args):
                                    Severity: Minor
                                    Found in scripts/gel/gel_old.py - About 35 mins to fix

                                      Function from_string has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                      Open
                                      • Open
                                      • Confirmed
                                      • Invalid
                                      • Wontfix
                                      Cancel

                                          def from_string(cls, record: str = "", *args, graph=None, nodemap=None, **kwargs):
                                      Severity: Minor
                                      Found in src/pydna/contig.py - About 35 mins to fix

                                        Function quick has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                        Open
                                        • Open
                                        • Confirmed
                                        • Invalid
                                        • Wontfix
                                        Cancel

                                            def quick(
                                        Severity: Minor
                                        Found in src/pydna/dseq.py - About 35 mins to fix

                                          Function list_parts has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                          Open
                                          • Open
                                          • Confirmed
                                          • Invalid
                                          • Wontfix
                                          Cancel

                                          def list_parts(fusion_pcr_fragment):
                                              stack = [fusion_pcr_fragment]
                                              processed = []
                                          
                                              while stack:
                                          Severity: Minor
                                          Found in src/pydna/fusionpcr.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 find_aminoacids has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                          Open
                                          • Open
                                          • Confirmed
                                          • Invalid
                                          • Wontfix
                                          Cancel

                                              def find_aminoacids(self, other):
                                                  """
                                                  >>> from pydna.dseqrecord import Dseqrecord
                                                  >>> s=Dseqrecord("atgtacgatcgtatgctggttatattttag")
                                                  >>> s.seq.translate()
                                          Severity: Minor
                                          Found in src/pydna/dseqrecord.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 _fill_in_three_prime has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                          Open
                                          • Open
                                          • Confirmed
                                          • Invalid
                                          • Wontfix
                                          Cancel

                                              def _fill_in_three_prime(self, nucleotides):
                                                  stuffer = ""
                                                  type, se = self.three_prime_end()
                                                  if type == "5'":
                                                      for n in _rc(se):
                                          Severity: Minor
                                          Found in src/pydna/dseq.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 assign_numbers has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                          Open
                                          • Open
                                          • Confirmed
                                          • Invalid
                                          • Wontfix
                                          Cancel

                                              def assign_numbers(self, lst: list):
                                                  """Find new primers in lst.
                                          
                                                  Returns a string containing new primers with their assigned
                                                  numbers. This string can be copied and pasted to the primer
                                          Severity: Minor
                                          Found in src/pydna/myprimers.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 figure has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                          Open
                                          • Open
                                          • Confirmed
                                          • Invalid
                                          • Wontfix
                                          Cancel

                                              def figure(self, feature=0, highlight="\x1b[48;5;11m", plain="\x1b[0m"):
                                                  """docstring."""
                                                  if self.features:
                                                      f = self.features[feature]
                                                      locations = sorted(self.features[feature].location.parts, key=_SimpleLocation.start.fget)
                                          Severity: Minor
                                          Found in src/pydna/dseqrecord.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 __add__ has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                          Open
                                          • Open
                                          • Confirmed
                                          • Invalid
                                          • Wontfix
                                          Cancel

                                              def __add__(self, other):
                                                  """Simulates ligation between two DNA fragments.
                                          
                                                  Add other Dseq object at the end of the sequence.
                                                  Type error is raised if any of the points below are fulfilled:
                                          Severity: Minor
                                          Found in src/pydna/dseq.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 search has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                          Open
                                          • Open
                                          • Confirmed
                                          • Invalid
                                          • Wontfix
                                          Cancel

                                              def search(self, dna, linear=True):
                                                  """docstring."""
                                                  dna = str(dna).upper()
                                                  if linear:
                                                      dna = dna
                                          Severity: Minor
                                          Found in src/pydna/crispr.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 _fill_in_five_prime has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                          Open
                                          • Open
                                          • Confirmed
                                          • Invalid
                                          • Wontfix
                                          Cancel

                                              def _fill_in_five_prime(self, nucleotides):
                                                  stuffer = ""
                                                  type, se = self.five_prime_end()
                                                  if type == "5'":
                                                      for n in _rc(se):
                                          Severity: Minor
                                          Found in src/pydna/dseq.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 memorize has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                          Open
                                          • Open
                                          • Confirmed
                                          • Invalid
                                          • Wontfix
                                          Cancel

                                          def memorize(filename):
                                              """Cache functions and classes.
                                          
                                              see pydna.download
                                              """
                                          Severity: Minor
                                          Found in src/pydna/utils.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 flatten has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                          Open
                                          • Open
                                          • Confirmed
                                          • Invalid
                                          • Wontfix
                                          Cancel

                                          def flatten(List):
                                              if List == []:
                                                  return List
                                              flatL = []
                                              for elem in List:
                                          Severity: Minor
                                          Found in scripts/gel/gel_old.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

                                          Avoid too many return statements within this function.
                                          Open
                                          • Open
                                          • Confirmed
                                          • Invalid
                                          • Wontfix
                                          Cancel

                                                  return True
                                          Severity: Major
                                          Found in src/pydna/dseq.py - About 30 mins to fix

                                            Function parseGBLoc has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                            Open
                                            • Open
                                            • Confirmed
                                            • Invalid
                                            • Wontfix
                                            Cancel

                                            def parseGBLoc(s, l_, t):
                                                """retwingles parsed genbank location strings, assumes no joins of RC and FWD sequences"""
                                                strand = 1
                                                locationlist = []
                                            
                                            
                                            Severity: Minor
                                            Found in src/pydna/genbankfixer.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 __mul__ has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                            Open
                                            • Open
                                            • Confirmed
                                            • Invalid
                                            • Wontfix
                                            Cancel

                                                def __mul__(self, number):
                                                    if not isinstance(number, int):
                                                        raise TypeError("TypeError: can't multiply Dseqrecord by non-int of type {}".format(type(number)))
                                                    if self.circular:
                                                        raise TypeError("TypeError: can't multiply circular Dseqrecord.")
                                            Severity: Minor
                                            Found in src/pydna/dseqrecord.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 expose has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                            Open
                                            • Open
                                            • Confirmed
                                            • Invalid
                                            • Wontfix
                                            Cancel

                                                def expose(self, exposure=0.1, aperture=2):
                                                    """Returns an image of the gel with the DNA highlighted"""
                                            
                                                    c1, c2 = exposure * 100, exposure * 200
                                                    fill_colour = (c1, c1, c2)
                                            Severity: Minor
                                            Found in scripts/experimental_gel.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 parse has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                            Open
                                            • Open
                                            • Confirmed
                                            • Invalid
                                            • Wontfix
                                            Cancel

                                            def parse(data, ds=True):
                                                """Return *all* DNA sequences found in data.
                                            
                                                If no sequences are found, an empty list is returned. This is a greedy
                                                function, use carefully.
                                            Severity: Minor
                                            Found in src/pydna/parsers.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 __call__ has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                            Open
                                            • Open
                                            • Confirmed
                                            • Invalid
                                            • Wontfix
                                            Cancel

                                                def __call__(cls, *args):
                                                    t = (int(time.time()) // 10000) * 10000
                                                    h = hash(args)
                                                    fn = "%s/%s-%i-%i.pickle" % (tempfile.gettempdir(), cls.__name__, t, h)
                                            
                                            
                                            Severity: Minor
                                            Found in scripts/memo/meta.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 expose has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                            Open
                                            • Open
                                            • Confirmed
                                            • Invalid
                                            • Wontfix
                                            Cancel

                                                def expose(self, exposure=0.1, aperture=2):
                                                    """Returns an image of the gel with the DNA highlighted"""
                                            
                                                    c1, c2 = exposure * 100, exposure * 200
                                                    fill_colour = (c1, c1, c2)
                                            Severity: Minor
                                            Found in scripts/experimental_gel2.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 figure has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                            Open
                                            • Open
                                            • Confirmed
                                            • Invalid
                                            • Wontfix
                                            Cancel

                                                def figure(self):
                                                    r"""Compact ascii representation of the assembled fragments.
                                            
                                                    Each fragment is represented by:
                                            
                                            
                                            Severity: Minor
                                            Found in src/pydna/contig.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 __init__ has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                            Open
                                            • Open
                                            • Confirmed
                                            • Invalid
                                            • Wontfix
                                            Cancel

                                                def __init__(
                                                    self,
                                                    initlist: Iterable = None,
                                                    path: (str, Path) = None,
                                                    *args,
                                            Severity: Minor
                                            Found in src/pydna/myprimers.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