Skip to content

Commit

Permalink
update .pylintrc for codacy
Browse files Browse the repository at this point in the history
  • Loading branch information
barrust committed Jan 6, 2024
1 parent 19587aa commit 8c383d5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
10 changes: 5 additions & 5 deletions .pylintrc
Expand Up @@ -175,22 +175,22 @@ ignored-parents=
max-args=12

# Maximum number of attributes for a class (see R0902).
max-attributes=7
max-attributes=35

# Maximum number of boolean expressions in an if statement (see R0916).
max-bool-expr=5

# Maximum number of branch for function / method body.
max-branches=12
# Maximum number of branch for function / method body (see R0912)
max-branches=15

# Maximum number of locals for function / method body.
max-locals=15
max-locals=20

# Maximum number of parents for a class (see R0901).
max-parents=7

# Maximum number of public methods for a class (see R0904).
max-public-methods=20
max-public-methods=40

# Maximum number of return / yield for function / method body.
max-returns=6
Expand Down
4 changes: 1 addition & 3 deletions mediawiki/mediawikipage.py
Expand Up @@ -739,9 +739,7 @@ def _parse_section_links(self, id_tag: Optional[str]) -> List[Tuple[str, str]]:
candidates = self._soup.find(id=id_tag).parent.next_siblings # type: ignore

for node in candidates:
if not isinstance(node, Tag):
continue
if node.get("role", "") == "navigation":
if not isinstance(node, Tag) or node.get("role", "") == "navigation":
continue
classes = node.get("class", [])
if not isinstance(classes, list):
Expand Down

0 comments on commit 8c383d5

Please sign in to comment.