Skip to content

Commit

Permalink
please linter
Browse files Browse the repository at this point in the history
  • Loading branch information
Carreau committed Jan 22, 2024
1 parent 55c7091 commit 26d607f
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions papyri/gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,7 @@ def visit(self, obj, stack):
else:
oroot = omod

if not oroot == self.root:
if oroot != self.root:
return
if obj in self.obj.values():
return
Expand Down Expand Up @@ -1157,11 +1157,11 @@ def get_example_section_data(self) -> Section:

def _compact(self, example_section_data) -> Section:
"""
Compact consecutive execution items that do have the same execution status.
Compact consecutive execution items that do have the same execution status.
TODO:
This is not perfect as doctest tests that the output is the same, thus when we have a multiline block
This is not perfect as doctest tests that the output is the same, thus when we have a multiline block
If any of the intermediate items produce an output, the result will be failure.
"""
acc: List[Union[MText, Code]] = []
Expand Down Expand Up @@ -2347,10 +2347,7 @@ def is_private(path):
Determine if a import path, or fully qualified is private.
that usually implies that (one of) the path part starts with a single underscore.
"""
for p in path.split("."):
if p.startswith("_") and not p.startswith("__"):
return True
return False
return any(p.startswith("_") and not p.startswith("__") for p in path.split("."))


def find_cannonical(qa: str, aliases: List[str]):
Expand Down

0 comments on commit 26d607f

Please sign in to comment.