wikimedia/pywikibot

View on GitHub

Showing 728 of 728 total issues

Avoid too many return statements within this function.
Open

                    return self.checkCommonscatLink(param[0])
Severity: Major
Found in scripts/commonscat.py - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

            return super().skip_page(page)
    Severity: Major
    Found in scripts/add_text.py - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

                  return ''
      Severity: Major
      Found in scripts/commonscat.py - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

                return False
        Severity: Major
        Found in pywikibot/pagegenerators/_factory.py - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                              return
          Severity: Major
          Found in pywikibot/site_detect.py - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                    return True
            Severity: Major
            Found in pywikibot/page/_wikibase.py - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                      return False
              Severity: Major
              Found in pywikibot/site/_namespace.py - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                                        return False
                Severity: Major
                Found in pywikibot/page/_basepage.py - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                                      return False
                  Severity: Major
                  Found in pywikibot/page/_basepage.py - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                                        return False
                    Severity: Major
                    Found in pywikibot/page/_basepage.py - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                              return self.target == value
                      Severity: Major
                      Found in pywikibot/page/_wikibase.py - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                                return False
                        Severity: Major
                        Found in pywikibot/page/_basepage.py - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                                      return True
                          Severity: Major
                          Found in pywikibot/pagegenerators/_factory.py - About 30 mins to fix

                            Avoid too many return statements within this function.
                            Open

                                    return (fam.name, code)  # text before : doesn't match any known prefix
                            Severity: Major
                            Found in pywikibot/page/_links.py - About 30 mins to fix

                              Avoid too many return statements within this function.
                              Open

                                                      return False
                              Severity: Major
                              Found in pywikibot/page/_basepage.py - About 30 mins to fix

                                Avoid too many return statements within this function.
                                Open

                                                    return False
                                Severity: Major
                                Found in pywikibot/page/_basepage.py - About 30 mins to fix

                                  Avoid too many return statements within this function.
                                  Open

                                                          return False
                                  Severity: Major
                                  Found in pywikibot/page/_basepage.py - About 30 mins to fix

                                    Avoid too many return statements within this function.
                                    Open

                                                            return False
                                    Severity: Major
                                    Found in pywikibot/page/_basepage.py - About 30 mins to fix

                                      Avoid too many return statements within this function.
                                      Open

                                              return True
                                      Severity: Major
                                      Found in pywikibot/page/_basepage.py - About 30 mins to fix

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

                                            def uncategorizedcategories(
                                                self,
                                                total: int | None = None,
                                            ) -> Iterable[pywikibot.Page]:
                                                """Yield Categories from Special:Uncategorizedcategories.
                                        Severity: Major
                                        Found in pywikibot/site/_generators.py and 16 other locations - About 30 mins to fix
                                        pywikibot/site/_generators.py on lines 2110..2118
                                        pywikibot/site/_generators.py on lines 2135..2143
                                        pywikibot/site/_generators.py on lines 2145..2153
                                        pywikibot/site/_generators.py on lines 2155..2163
                                        pywikibot/site/_generators.py on lines 2165..2173
                                        pywikibot/site/_generators.py on lines 2175..2183
                                        pywikibot/site/_generators.py on lines 2185..2193
                                        pywikibot/site/_generators.py on lines 2205..2213
                                        pywikibot/site/_generators.py on lines 2218..2226
                                        pywikibot/site/_generators.py on lines 2228..2236
                                        pywikibot/site/_generators.py on lines 2238..2246
                                        pywikibot/site/_generators.py on lines 2248..2256
                                        pywikibot/site/_generators.py on lines 2258..2266
                                        pywikibot/site/_generators.py on lines 2268..2276
                                        pywikibot/site/_generators.py on lines 2278..2286
                                        pywikibot/site/_generators.py on lines 2288..2296

                                        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 40.

                                        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

                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language