BLKSerene/Wordless

View on GitHub

Showing 205 of 205 total issues

Avoid deeply nested control flow statements.
Open

                        if os.path.exists(file_settings):
                            os.remove(file_settings)

                        # Remove file caches
                        for file in glob.glob(os.path.join(
Severity: Major
Found in wordless/wl_main.py - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                                if settings_limit_searching == _tr('Wl_Worker_Collocation_Extractor', 'None'):
                                    tokens_left = tokens[max(0, i + window_left) : i]
                                    tokens_right = tokens[i + ngram_size : i + ngram_size + window_right]
                                else:
                                    # Span positions (Left)
    Severity: Major
    Found in wordless/wl_collocation_extractor.py - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                                  if self.tr('No language support') in tokens_syllabified:
                                      self.set_item_err(i, 2, tokens_syllabified, alignment_hor = 'left')
                                  else:
                                      self.model().setItem(i, 2, wl_tables.Wl_Table_Item(tokens_syllabified))
      
      
      Severity: Major
      Found in wordless/wl_wordlist_generator.py - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                                    for j, collocate in enumerate(reversed(tokens_left)):
                                        if wl_matching.check_context(
                                            i, tokens,
                                            context_settings = settings['search_settings']['context_settings'],
                                            search_terms_incl = search_terms_incl,
        Severity: Major
        Found in wordless/wl_collocation_extractor.py - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                                      for j, collocate in enumerate(tokens_right):
                                          if wl_matching.check_context(
                                              i, tokens,
                                              context_settings = settings['search_settings']['context_settings'],
                                              search_terms_incl = search_terms_incl,
          Severity: Major
          Found in wordless/wl_collocation_extractor.py - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                        for j, collocate in enumerate(tokens_right):
                                            if wl_matching.check_context(
                                                i, tokens,
                                                context_settings = settings['search_settings']['context_settings'],
                                                search_terms_incl = search_terms_incl,
            Severity: Major
            Found in wordless/wl_collocation_extractor.py - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                          if ngram == search_term:
                                              collocations_freqs_file_filtered[(node, collocate)] = freqs
              
              
              Severity: Major
              Found in wordless/wl_collocation_extractor.py - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                            if settings_limit_searching == _tr('Wl_Worker_Collocation_Extractor', 'None'):
                                                tokens_left = tokens[max(0, i + window_left) : max(0, i + window_right + 1)]
                                            else:
                                                # Span positions (Left)
                                                for position in range(max(0, i + window_left), max(0, i + window_right + 1)):
                Severity: Major
                Found in wordless/wl_collocation_extractor.py - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                              if token_syllabified == self.tr('No language support'):
                                                  self.set_item_err(i, 2, token_syllabified, alignment_hor = 'left')
                                              else:
                                                  self.model().setItem(i, 2, wl_tables.Wl_Table_Item(token_syllabified))
                                          # Same token found in more than one language
                  Severity: Major
                  Found in wordless/wl_wordlist_generator.py - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                                for lang, syllabified_form in syls_tokens[token].items():
                                                    lang_text = wl_conversion.to_lang_text(self.main, lang)
                                                    token_syllabified_forms.append(f"{syllabified_form} [{lang_text}]")
                    
                    
                    Severity: Major
                    Found in wordless/wl_wordlist_generator.py - About 45 mins to fix

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

                      def z_score_berry_rogghe(main, o11s, o12s, o21s, o22s, span):
                      Severity: Minor
                      Found in wordless/wl_measures/wl_measures_statistical_significance.py - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                                if ngram == tuple(search_term):
                                                    self.dialog.items_found.append([table, row, col])
                        
                        
                        Severity: Major
                        Found in wordless/wl_results/wl_results_search.py - About 45 mins to fix

                          Consider simplifying this complex logical expression.
                          Open

                              if (
                                  token_settings.get('apply_lemmatization', False)
                                  or search_settings['match_inflected_forms']
                                  or (
                                      search_settings['context_settings']['incl']['incl']
                          Severity: Major
                          Found in wordless/wl_nlp/wl_token_processing.py - About 40 mins to fix

                            Function set_item_err has 5 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                def set_item_err(self, row, col, text, alignment_hor = 'center'):
                            Severity: Minor
                            Found in wordless/wl_widgets/wl_tables.py - About 35 mins to fix

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

                                  def __init__(self, parent, line_edit, caption, filters, initial_filter = -1):
                              Severity: Minor
                              Found in wordless/wl_widgets/wl_buttons.py - About 35 mins to fix

                                Function pearsons_chi_squared_test has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                def pearsons_chi_squared_test(main, o11s, o12s, o21s, o22s):
                                Severity: Minor
                                Found in wordless/wl_measures/wl_measures_statistical_significance.py - About 35 mins to fix

                                  Function set_item_num has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

                                      def set_item_num(self, row, col, val, total = -1):
                                  Severity: Minor
                                  Found in wordless/wl_widgets/wl_tables.py - About 35 mins to fix

                                    Function wl_syl_tokenize has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                    Open

                                    def wl_syl_tokenize(main, inputs, lang, syl_tokenizer = 'default', force = False):
                                    Severity: Minor
                                    Found in wordless/wl_nlp/wl_syl_tokenization.py - About 35 mins to fix

                                      Function match_search_terms_context has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                      Open

                                      def match_search_terms_context(
                                      Severity: Minor
                                      Found in wordless/wl_nlp/wl_matching.py - About 35 mins to fix

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

                                            def __init__(self, main, tokens_multilevel, lang = 'eng_us', tagged = False):
                                        Severity: Minor
                                        Found in tests/wl_test_init.py - About 35 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language