xchem/XChemExplorer

View on GitHub

Showing 437 of 1,077 total issues

Function get_map_labels has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    def get_map_labels(self):
        labelList = []
        for column in self.mtz.columns:
            labelList.append(column.label)
        FWT = None
Severity: Minor
Found in xce/lib/XChemUtils.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 get_point_group_from_spg_number has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    def get_point_group_from_spg_number(self, number):
        pointgroup = ""
        for pg in self.point_group_dict:
            for spg_number in self.point_group_dict[pg]:
                if spg_number == number:
Severity: Minor
Found in xce/lib/XChemUtils.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 get_bravais_lattice_from_spg_number has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    def get_bravais_lattice_from_spg_number(self, number):
        lattice = ""
        for bravaislattice in self.space_group_dict:
            for spg_number in self.space_group_dict[bravaislattice]:
                if str(spg_number) == str(number):
Severity: Minor
Found in xce/lib/XChemUtils.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 run has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    def run(self):
        self.Logfile.warning(
            XChemToolTips.pandda_export_ligand_bound_models_only_disclaimer()
        )

Severity: Minor
Found in xce/lib/XChemPANDDA.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 refmac_log has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    def refmac_log(self):
        QualityIndicators = {"MatrixWeight": "n/a"}

        # Matrix Weight
        if os.path.isfile(self.logfile):
Severity: Minor
Found in xce/lib/XChemUtils.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 RefinementParams has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    def RefinementParams(self, RefmacParams):
        self.RefmacParams = RefmacParams
        self.window = gtk.Window(gtk.WINDOW_TOPLEVEL)
        self.window.connect("delete_event", gtk.main_quit)
        self.window.set_border_width(10)
Severity: Minor
Found in xce/lib/XChemRefine.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 RefinementParams has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    def RefinementParams(self, RefmacParams):
        self.RefmacParams = RefmacParams
        self.window = gtk.Window(gtk.WINDOW_TOPLEVEL)
        self.window.connect("delete_event", gtk.main_quit)
        self.window.set_border_width(10)
Severity: Minor
Found in xce/lib/XChemRefine.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 update_RefinementOutcome_radiobutton has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    def update_RefinementOutcome_radiobutton(self):
        # updating dataset outcome radiobuttons
        current_stage = 0
        for i, entry in enumerate(self.experiment_stage):
            if entry[1].split()[0] == self.refinement_outcome.split()[0]:
Severity: Minor
Found in xce/lib/XChemCoot.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 prepare_phenix_ligand_pipeline_shell_script has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    def prepare_phenix_ligand_pipeline_shell_script(
        self, xtal, visit_run_autoproc, mtzin, ref_pdb, ref_mtz, ref_cif
    ):
        # check if reference mtzfile has an Rfree column; if not, then ignore
        # DIMPLE assumes an Rfree column and barfs if it is not present
Severity: Minor
Found in xce/lib/XChemThread.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 selectResultsWithAcceptableLowResoRmerge has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    def selectResultsWithAcceptableLowResoRmerge(self, dbList):
        self.Logfile.insert(
            "checking if MTZ files have acceptable low resolution Rmerge values"
            " (currently set to %s)" % str(self.acceptable_low_resolution_Rmerge)
        )
Severity: Minor
Found in xce/lib/XChemThread.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 update_RefinementOutcome_radiobutton has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    def update_RefinementOutcome_radiobutton(self):
        # updating dataset outcome radiobuttons
        current_stage = 0
        for i, entry in enumerate(self.experiment_stage):
            if entry[1].split()[0] == self.refinement_outcome.split()[0]:
Severity: Minor
Found in xce/lib/XChemCootOld.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

    def __init__(self, settings, interface):
        QtCore.QThread.__init__(self)
        self.settings = settings
        if interface == "test":
            self.pylib = "XChemCoot.py"
Severity: Minor
Found in xce/lib/XChemThread.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 add_funding_information has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    def add_funding_information(self, xtal):
        pdbx_funding_ordinal_one = self.data_template_dict["pdbx_funding_ordinal_one"]
        if (
            pdbx_funding_ordinal_one.lower()
            .replace(" ", "")
Severity: Minor
Found in xce/lib/XChemDeposit.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 update_RefinementOutcome_radiobutton has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    def update_RefinementOutcome_radiobutton(self):
        # updating dataset outcome radiobuttons
        current_stage = 0
        for i, entry in enumerate(self.experiment_stage):
            if entry[1].split()[0] == self.refinement_outcome.split()[0]:
Severity: Minor
Found in xce/lib/XChemCootNew.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 mmcif_files_can_be_replaced has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    def mmcif_files_can_be_replaced(self, xtal):
        status = True
        if self.overwrite_existing_mmcif:
            self.Logfile.insert(
                "%s: removing existing mmcif files as chosen by user" % xtal
Severity: Minor
Found in xce/lib/XChemDeposit.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 update_RefinementOutcome_radiobutton has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    def update_RefinementOutcome_radiobutton(self):
        # updating dataset outcome radiobuttons
        current_stage = 0
        for i, entry in enumerate(self.experiment_stage):
            if entry[1].split()[0] == self.refinement_outcome.split()[0]:
Severity: Minor
Found in xce/lib/XChemCootBuster.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 update_RefinementOutcome_radiobutton has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    def update_RefinementOutcome_radiobutton(self):
        # updating dataset outcome radiobuttons
        current_stage = 0
        for i, entry in enumerate(self.experiment_stage):
            if entry[1].split()[0] == self.refinement_outcome.split()[0]:
Severity: Minor
Found in xce/lib/XChemCootTwin.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