lucydot/effmass

View on GitHub

Showing 213 of 291 total issues

Consider simplifying this complex logical expression.
Open

    if ( ( !support.boxSizingReliable() && isBorderBox ||

        // Support: IE 10 - 11+, Edge 15 - 18+
        // IE/Edge misreport `getComputedStyle` of table rows with width/height
        // set in CSS while `offset*` properties report correct values.
Severity: Critical
Found in docs/build/_static/jquery-3.5.1.js - About 1 hr to fix

    Consider simplifying this complex logical expression.
    Open

          if (activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT'
              && activeElementType !== 'BUTTON' && !event.altKey && !event.ctrlKey && !event.metaKey
              && !event.shiftKey) {
            switch (event.keyCode) {
              case 37: // left
    Severity: Critical
    Found in docs/build/_static/doctools.js - About 1 hr to fix

      Function showHide has 33 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function showHide( elements, show ) {
          var display, elem,
              values = [],
              index = 0,
              length = elements.length;
      Severity: Minor
      Found in docs/build/_static/jquery-3.5.1.js - About 1 hr to fix

        Function handler has 32 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                handler: function( event ) {
                    var notAsync, result,
                        saved = dataPriv.get( this, type );
        
                    if ( ( event.isTrigger & 1 ) && this[ type ] ) {
        Severity: Minor
        Found in docs/build/_static/jquery-3.5.1.js - About 1 hr to fix

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

          def get_kpoints_before(band_index,
                                 kpoint_index,
                                 Settings,
                                 Data,
                                 truncate_dir_change=True):
          Severity: Minor
          Found in effmass/extrema.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 get_kpoints_after has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
          Open

          def get_kpoints_after(band_index,
                                kpoint_index,
                                Settings,
                                Data,
                                truncate_dir_change=True):
          Severity: Minor
          Found in effmass/extrema.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 cli has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
          Open

          def cli():
              print(f"Welcome to effmass {version} \U0001F388")
          
              ignore, seedname, fermi_level = None, None, None
              random_int = randint(10000,99999)
          Severity: Minor
          Found in effmass/cli.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 _dos has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
          Open

              def _dos(self, DataVasp):
                  """Returns slice of :attr:`effmass.DataVasp.dos` corresponding to the
                  energy range of the segment.
          
                  Args:
          Severity: Minor
          Found in effmass/analysis.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 a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
          Open

              def __init__(self, outcar_path, procar_path, ignore=0, **kwargs):
                  r"""
                  Initialises an instance of the :class:`~effmass.inputs.Data` class and checks data using :meth:`check_data`.
          
                  Args:
          Severity: Minor
          Found in effmass/inputs.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 _integrated_dos has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
          Open

              def _integrated_dos(self, DataVasp):
                  """Returns slice of :attr:`effmass.DataVasp.integrated_dos` corresponding
                  to the energy range of the segment.
          
                  Args:
          Severity: Minor
          Found in effmass/analysis.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 load has 31 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          jQuery.fn.load = function( url, params, callback ) {
              var selector, type, response,
                  self = this,
                  off = url.indexOf( " " );
          
          
          Severity: Minor
          Found in docs/build/_static/jquery-3.5.1.js - About 1 hr to fix

            Function removeClass has 30 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                removeClass: function( value ) {
                    var classes, elem, cur, curValue, clazz, j, finalValue,
                        i = 0;
            
                    if ( isFunction( value ) ) {
            Severity: Minor
            Found in docs/build/_static/jquery-3.5.1.js - About 1 hr to fix

              Function speed has 30 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              jQuery.speed = function( speed, easing, fn ) {
                  var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : {
                      complete: fn || !fn && easing ||
                          isFunction( speed ) && speed,
                      duration: speed,
              Severity: Minor
              Found in docs/build/_static/jquery-3.5.1.js - About 1 hr to fix

                Function set has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        set: function( elem, value, extra ) {
                            var matches,
                                styles = getStyles( elem ),
                
                                // Only read styles.position if the test has a chance to fail
                Severity: Minor
                Found in docs/build/_static/jquery-3.5.1.js - About 1 hr to fix

                  Function attr has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      attr: function( elem, name, value ) {
                          var ret, hooks,
                              nType = elem.nodeType;
                  
                          // Don't get/set attributes on text, comment and attribute nodes
                  Severity: Minor
                  Found in docs/build/_static/jquery-3.5.1.js - About 1 hr to fix

                    Function print_results has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    def print_results(segment, data, settings, polyfit_order=None, figsize=_default_figsize):
                        
                        polyfit_order = settings.degree_bandfit if polyfit_order is None else polyfit_order
                        _check_poly_order(polyfit_order)
                    
                    
                    Severity: Minor
                    Found in effmass/outputs.py - About 1 hr to fix

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

                      def print_summary_file(random_int, DFT_code, pathname, ignore, seedname,
                      Severity: Major
                      Found in effmass/outputs.py - About 1 hr to fix

                        Function off has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            off: function( types, selector, fn ) {
                                var handleObj, type;
                                if ( types && types.preventDefault && types.handleObj ) {
                        
                                    // ( event )  dispatched jQuery.Event
                        Severity: Minor
                        Found in docs/build/_static/jquery-3.5.1.js - About 1 hr to fix

                          Function finish has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              finish: function( type ) {
                                  if ( type !== false ) {
                                      type = type || "fx";
                                  }
                                  return this.each( function() {
                          Severity: Minor
                          Found in docs/build/_static/jquery-3.5.1.js - About 1 hr to fix

                            Function parseHTML has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            jQuery.parseHTML = function( data, context, keepScripts ) {
                                if ( typeof data !== "string" ) {
                                    return [];
                                }
                                if ( typeof context === "boolean" ) {
                            Severity: Minor
                            Found in docs/build/_static/jquery-3.5.1.js - About 1 hr to fix
                              Severity
                              Category
                              Status
                              Source
                              Language