EventGhost/EventGhost

View on GitHub
plugins/OSM/__init__.py

Summary

Maintainability
F
2 wks
Test Coverage

File __init__.py has 1183 lines of code (exceeds 250 allowed). Consider refactoring.
Open

# -*- coding: utf-8 -*-
#
# plugins/OSM/__init__.py
#
# Copyright (C)  2009-2011 Pako  (lubos.ruckl@quick.cz)
Severity: Major
Found in plugins/OSM/__init__.py - About 3 days to fix

    Function Configure has a Cognitive Complexity of 88 (exceeds 5 allowed). Consider refactoring.
    Open

        def Configure(
            self,
            choices="",
            fore = (75, 75, 75),
            back = (180, 180, 180),
    Severity: Minor
    Found in plugins/OSM/__init__.py - About 1 day 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 Configure has a Cognitive Complexity of 60 (exceeds 5 allowed). Consider refactoring.
    Open

        def Configure(
            self,
            choices=[],
            fore = (75, 75, 75),
            back = (180, 180, 180),
    Severity: Minor
    Found in plugins/OSM/__init__.py - About 1 day 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 Configure has 124 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        def Configure(
            self,
            choices=[],
            fore = (75, 75, 75),
            back = (180, 180, 180),
    Severity: Major
    Found in plugins/OSM/__init__.py - About 4 hrs to fix

      Function Configure has 95 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          def Configure(
              self,
              choices="",
              fore = (75, 75, 75),
              back = (180, 180, 180),
      Severity: Major
      Found in plugins/OSM/__init__.py - About 3 hrs to fix

        Function __init__ has 53 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            def __init__(
                self,
                choices,
                fore,
                back,
        Severity: Major
        Found in plugins/OSM/__init__.py - About 2 hrs to fix

          Function __call__ has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
          Open

              def __call__(
                  self,
                  choices,
                  fore,
                  back,
          Severity: Minor
          Found in plugins/OSM/__init__.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 __init__ has 14 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              def __init__(
          Severity: Major
          Found in plugins/OSM/__init__.py - About 1 hr to fix

            Function Configure has 12 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                def Configure(
            Severity: Major
            Found in plugins/OSM/__init__.py - About 1 hr to fix

              Function __call__ has 12 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  def __call__(
              Severity: Major
              Found in plugins/OSM/__init__.py - About 1 hr to fix

                Function __call__ has 12 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    def __call__(
                Severity: Major
                Found in plugins/OSM/__init__.py - About 1 hr to fix

                  Function Configure has 12 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      def Configure(
                  Severity: Major
                  Found in plugins/OSM/__init__.py - About 1 hr to fix

                    Function GetLabel has 12 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                        def GetLabel(
                    Severity: Major
                    Found in plugins/OSM/__init__.py - About 1 hr to fix

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

                          def __init__(
                              self,
                              choices,
                              fore,
                              back,
                      Severity: Minor
                      Found in plugins/OSM/__init__.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 onFrameCharHook has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                      Open

                          def onFrameCharHook(self, event):
                              keyCode = event.GetKeyCode()
                              if keyCode == wx.WXK_RETURN or keyCode == wx.WXK_NUMPAD_ENTER:
                                  row = self.eventChoiceCtrl.GetSelection()
                                  self.SendEventSel(row)
                      Severity: Minor
                      Found in plugins/OSM/__init__.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

                      Avoid deeply nested control flow statements.
                      Open

                                                  if len(item) == 1:
                                                      chcs.append((item[0], item[0]))
                                                  else:
                                                      chcs.append(item)
                                              wx.CallAfter(
                      Severity: Major
                      Found in plugins/OSM/__init__.py - About 45 mins to fix

                        Function SendEventSel has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                        Open

                            def SendEventSel(self, sel):
                                self.destroyMenu()
                                evtString = self.prefix.split(".")
                                sp = self.choices[sel][1]
                                ix = sp.find(".")
                        Severity: Minor
                        Found in plugins/OSM/__init__.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

                        Identical blocks of code found in 2 locations. Consider refactoring.
                        Open

                            def Move(self,index,direction):
                                tmpList=self.choices[:]
                                max = len(self.choices)-1
                                #Last to first position, other down
                                if index == max and direction == 1:
                        Severity: Major
                        Found in plugins/OSM/__init__.py and 1 other location - About 1 day to fix
                        plugins/OOo_Impress/__init__.py on lines 868..886

                        Duplicated Code

                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                        Tuning

                        This issue has a mass of 225.

                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                        Refactorings

                        Further Reading

                        Similar blocks of code found in 2 locations. Consider refactoring.
                        Open

                                def OnFontBtn(evt):
                                    value = evt.GetValue()
                                    font = wx.FontFromNativeInfoString(value)
                                    for n in range(10,20):
                                        font.SetPointSize(n)
                        Severity: Major
                        Found in plugins/OSM/__init__.py and 1 other location - About 7 hrs to fix
                        plugins/OSM/__init__.py on lines 515..529

                        Duplicated Code

                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                        Tuning

                        This issue has a mass of 147.

                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                        Refactorings

                        Further Reading

                        Similar blocks of code found in 2 locations. Consider refactoring.
                        Open

                                def OnFontBtn(evt):
                                    value = evt.GetValue()
                                    font = wx.FontFromNativeInfoString(value)
                                    for n in range(10,20):
                                        font.SetPointSize(n)
                        Severity: Major
                        Found in plugins/OSM/__init__.py and 1 other location - About 7 hrs to fix
                        plugins/OSM/__init__.py on lines 915..929

                        Duplicated Code

                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                        Tuning

                        This issue has a mass of 147.

                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                        Refactorings

                        Further Reading

                        Similar blocks of code found in 3 locations. Consider refactoring.
                        Open

                                def OnColourBtn(evt):
                                    id = evt.GetId()
                                    value = evt.GetValue()
                                    if id == foreColourButton.GetId():
                                        listBoxCtrl.SetForegroundColour(value)
                        Severity: Major
                        Found in plugins/OSM/__init__.py and 2 other locations - About 7 hrs to fix
                        plugins/OSE/__init__.py on lines 566..579
                        plugins/OSM/__init__.py on lines 933..946

                        Duplicated Code

                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                        Tuning

                        This issue has a mass of 140.

                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                        Refactorings

                        Further Reading

                        Similar blocks of code found in 3 locations. Consider refactoring.
                        Open

                                def OnColourBtn(evt):
                                    id = evt.GetId()
                                    value = evt.GetValue()
                                    if id == foreColourButton.GetId():
                                        listBoxCtrl.SetForegroundColour(value)
                        Severity: Major
                        Found in plugins/OSM/__init__.py and 2 other locations - About 7 hrs to fix
                        plugins/OSE/__init__.py on lines 566..579
                        plugins/OSM/__init__.py on lines 533..546

                        Duplicated Code

                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                        Tuning

                        This issue has a mass of 140.

                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                        Refactorings

                        Further Reading

                        Similar blocks of code found in 2 locations. Consider refactoring.
                        Open

                        class MoveCursor(eg.ActionBase):
                        
                            class text:
                                step = "Step (1 - 25):"
                        
                        
                        Severity: Major
                        Found in plugins/OSM/__init__.py and 1 other location - About 6 hrs to fix
                        plugins/OSE/__init__.py on lines 653..671

                        Duplicated Code

                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                        Tuning

                        This issue has a mass of 133.

                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                        Refactorings

                        Further Reading

                        Identical blocks of code found in 2 locations. Consider refactoring.
                        Open

                            def Set(self, choices):
                                oldLen = self.GetNumberRows()
                                newLen = len(choices)
                                h = self.GetDefaultRowSize()
                                if oldLen > newLen:
                        Severity: Major
                        Found in plugins/OSM/__init__.py and 1 other location - About 6 hrs to fix
                        plugins/OSE/__init__.py on lines 192..202

                        Duplicated Code

                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                        Tuning

                        This issue has a mass of 129.

                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                        Refactorings

                        Further Reading

                        Identical blocks of code found in 3 locations. Consider refactoring.
                        Open

                                if lst and len(lst) > 0:
                                    for item in lst:
                                        if type(item) is unicode or type(item) is str:
                                            chcs.append((item, item))
                                        elif type(item) is tuple or type(item) is list:
                        Severity: Major
                        Found in plugins/OSM/__init__.py and 2 other locations - About 5 hrs to fix
                        plugins/OSM/__init__.py on lines 753..760
                        plugins/OSM/__init__.py on lines 959..966

                        Duplicated Code

                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                        Tuning

                        This issue has a mass of 125.

                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                        Refactorings

                        Further Reading

                        Identical blocks of code found in 3 locations. Consider refactoring.
                        Open

                                    for item in lst:
                                        if type(item) is unicode or type(item) is str:
                                            chcs.append((item, item))
                                        elif type(item) is tuple or type(item) is list:
                                            if len(item) == 1:
                        Severity: Major
                        Found in plugins/OSM/__init__.py and 2 other locations - About 5 hrs to fix
                        plugins/OSM/__init__.py on lines 832..840
                        plugins/OSM/__init__.py on lines 959..966

                        Duplicated Code

                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                        Tuning

                        This issue has a mass of 125.

                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                        Refactorings

                        Further Reading

                        Identical blocks of code found in 3 locations. Consider refactoring.
                        Open

                                            for item in lst:
                                                if type(item) is unicode or type(item) is str:
                                                    chcs.append((item, item))
                                                elif type(item) is tuple or type(item) is list:
                                                    if len(item) == 1:
                        Severity: Major
                        Found in plugins/OSM/__init__.py and 2 other locations - About 5 hrs to fix
                        plugins/OSM/__init__.py on lines 753..760
                        plugins/OSM/__init__.py on lines 832..840

                        Duplicated Code

                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                        Tuning

                        This issue has a mass of 125.

                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                        Refactorings

                        Further Reading

                        Identical blocks of code found in 2 locations. Consider refactoring.
                        Open

                                if w1 > w2:
                                    btnDEL=wx.Button(panel,-1,self.text.delete)
                                    btnApp=wx.Button(panel,-1,self.text.insert,size=btnDEL.GetSize())
                                else:
                                    btnApp=wx.Button(panel,-1,self.text.insert)
                        Severity: Major
                        Found in plugins/OSM/__init__.py and 1 other location - About 3 hrs to fix
                        plugins/OOo_Impress/__init__.py on lines 1086..1091

                        Duplicated Code

                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                        Tuning

                        This issue has a mass of 95.

                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                        Refactorings

                        Further Reading

                        Similar blocks of code found in 2 locations. Consider refactoring.
                        Open

                                def OnButtonUp(evt):
                                    newSel=self.Move(listBoxCtrl.GetSelection(),-1)
                                    listBoxCtrl.Set([item[0] for item in self.choices])
                                    listBoxCtrl.SetSelection(newSel)
                                    self.oldSel = newSel
                        Severity: Major
                        Found in plugins/OSM/__init__.py and 1 other location - About 1 hr to fix
                        plugins/OSM/__init__.py on lines 580..585

                        Duplicated Code

                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                        Tuning

                        This issue has a mass of 70.

                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                        Refactorings

                        Further Reading

                        Similar blocks of code found in 2 locations. Consider refactoring.
                        Open

                                def OnButtonDown(evt):
                                    newSel=self.Move(listBoxCtrl.GetSelection(),1)
                                    listBoxCtrl.Set([item[0] for item in self.choices])
                                    listBoxCtrl.SetSelection(newSel)
                                    self.oldSel = newSel
                        Severity: Major
                        Found in plugins/OSM/__init__.py and 1 other location - About 1 hr to fix
                        plugins/OSM/__init__.py on lines 571..576

                        Duplicated Code

                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                        Tuning

                        This issue has a mass of 70.

                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                        Refactorings

                        Further Reading

                        Similar blocks of code found in 2 locations. Consider refactoring.
                        Open

                                        if label.strip()<>"":
                                            if event.strip()<>"":
                                                if [item[0] for item in self.choices].count(label)==1:
                                                    flag = True
                        Severity: Minor
                        Found in plugins/OSM/__init__.py and 1 other location - About 55 mins to fix
                        plugins/Multitap/__init__.py on lines 1074..1077

                        Duplicated Code

                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                        Tuning

                        This issue has a mass of 65.

                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                        Refactorings

                        Further Reading

                        Similar blocks of code found in 2 locations. Consider refactoring.
                        Open

                            def __call__(self,val = 0):
                                if self.plugin.menuDlg:
                                    eg.event.skipEvent = True
                                    if val < 3:
                                        return self.plugin.menuDlg.GetValue()[val]
                        Severity: Minor
                        Found in plugins/OSM/__init__.py and 1 other location - About 55 mins to fix
                        plugins/OSE/__init__.py on lines 717..723

                        Duplicated Code

                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                        Tuning

                        This issue has a mass of 65.

                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                        Refactorings

                        Further Reading

                        There are no issues that match your filters.

                        Category
                        Status