BLKSerene/Wordless

View on GitHub

Showing 202 of 202 total issues

Function add_headers_hor has 8 arguments (exceeds 4 allowed). Consider refactoring.
Open

    def add_headers_hor(
Severity: Major
Found in wordless/wl_widgets/wl_tables.py - About 1 hr to fix

    Consider simplifying this complex logical expression.
    Open

                    if (
                        token[0] == '།'
                        and text
                        and text[-1] in ['།', 'ཀ', 'ག']
                    ):
    Severity: Major
    Found in wordless/wl_nlp/wl_word_detokenization.py - About 1 hr to fix

      Function wl_test_spacy has 8 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      def wl_test_spacy(
      Severity: Major
      Found in tests/tests_nlp/tests_spacy/test_spacy.py - About 1 hr to fix

        Consider simplifying this complex logical expression.
        Open

            if platform.system() == 'Windows':
                assert is_windows and not is_macos and not is_linux
            elif platform.system() == 'Darwin':
                assert not is_windows and is_macos and not is_linux
            elif platform.system() == 'Linux':
        Severity: Major
        Found in tests/tests_utils/test_misc.py - About 1 hr to fix

          Consider simplifying this complex logical expression.
          Open

                                      if (
                                          (
                                              (
                                                  not settings['search_settings']['match_dependency_relations']
                                                  and (token in search_terms or head in search_terms)
          Severity: Major
          Found in wordless/wl_dependency_parser.py - About 1 hr to fix

            Function yatess_correction has 8 arguments (exceeds 4 allowed). Consider refactoring.
            Open

            def yatess_correction(o11s, o12s, o21s, o22s, e11s, e12s, e21s, e22s):
            Severity: Major
            Found in wordless/wl_measures/wl_measures_statistical_significance.py - About 1 hr to fix

              Function __init__ has 7 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  def __init__(
              Severity: Major
              Found in wordless/wl_profiler.py - About 50 mins to fix

                Function ins_header_vert has 7 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    def ins_header_vert(
                Severity: Major
                Found in wordless/wl_widgets/wl_tables.py - About 50 mins to fix

                  Function ins_headers_vert has 7 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      def ins_headers_vert(
                  Severity: Major
                  Found in wordless/wl_widgets/wl_tables.py - About 50 mins to fix

                    Function wl_spin_boxes_min_max_no_limit has 7 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                    def wl_spin_boxes_min_max_no_limit(
                    Severity: Major
                    Found in wordless/wl_widgets/wl_boxes.py - About 50 mins to fix

                      Function __init__ has 7 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                          def __init__(self, main, title, width = 0, height = 0, resizable = False, help_info = '', err_msg = ''):
                      Severity: Major
                      Found in wordless/wl_dialogs/wl_dialogs_errs.py - About 50 mins to fix

                        Function widgets_filter has 7 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                        def widgets_filter(parent, label, val_min, val_max, settings, filter_name, double = False):
                        Severity: Major
                        Found in wordless/wl_results/wl_results_filter.py - About 50 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                          for encoding, trs in TRS_ENCODINGS.items():
                                              if encoding in tr:
                                                  tr = tr.replace(encoding, trs[0])
                          
                                                  break
                          Severity: Major
                          Found in utils/wl_trs_translate.py - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                                    if i == 0 and re.match(re_tags_start, para):
                                                        # Check if the first paragraph is empty
                                                        if not self.tokens_multilevel[0]:
                                                            self.tokens_multilevel[0].append([[]])
                            
                            
                            Severity: Major
                            Found in wordless/wl_nlp/wl_texts.py - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                                  for token in sentence_seg:
                                                      token.tag = token.tag.lower()
                              
                                  # Words
                                  if settings['words']:
                              Severity: Major
                              Found in wordless/wl_nlp/wl_token_processing.py - About 45 mins to fix

                                Function wl_pos_tag has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                def wl_pos_tag(main, inputs, lang, pos_tagger = 'default', tagset = 'default', force = False):
                                Severity: Minor
                                Found in wordless/wl_nlp/wl_pos_tagging.py - About 45 mins to fix

                                  Avoid deeply nested control flow statements.
                                  Open

                                                  for item, trs in TRS_MISC.items():
                                                      if tr == item:
                                                          tr = trs[0]
                                  
                                                          break
                                  Severity: Major
                                  Found in utils/wl_trs_translate.py - About 45 mins to fix

                                    Avoid deeply nested control flow statements.
                                    Open

                                                        for sentence_seg in sentence:
                                                            for token in sentence_seg:
                                                                refs = head_refs[i_token]
                                                                token.head = text.tokens_multilevel[refs[0]][refs[1]][refs[2]][refs[3]]
                                    
                                    
                                    Severity: Major
                                    Found in wordless/wl_nlp/wl_token_processing.py - About 45 mins to fix

                                      Avoid deeply nested control flow statements.
                                      Open

                                                          for sentence in doc.sents:
                                                              displacy_dict = spacy.displacy.parse_deps(sentence, options = options)
                                      
                                                              if token_properties:
                                                                  for token, word in zip(sentence, displacy_dict['words']):
                                      Severity: Major
                                      Found in wordless/wl_nlp/wl_dependency_parsing.py - About 45 mins to fix

                                        Avoid deeply nested control flow statements.
                                        Open

                                                                    if not self.isRowHidden(row):
                                                                        item = self.model().item(row, col)
                                        
                                                                        item.setText(f'{item.val:.{precision_decimals}}')
                                                            # Percentages
                                        Severity: Major
                                        Found in wordless/wl_widgets/wl_tables.py - About 45 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language