Skip to content

Commit

Permalink
LINT: Remove unnecessary True/False condition
Browse files Browse the repository at this point in the history
  • Loading branch information
has2k1 committed Jul 26, 2024
1 parent 4cab3d8 commit 0ca1e22
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions plotnine/mapping/aes.py
Original file line number Diff line number Diff line change
Expand Up @@ -593,9 +593,7 @@ def is_valid_aesthetic(value: Any, ae: str) -> bool:
len(value[1]) % 2 == 0,
all(isinstance(x, int) for x in value[1]),
]
if all(conditions):
return True
return False
return all(conditions)

elif ae == "shape":
if isinstance(value, str):
Expand All @@ -609,9 +607,7 @@ def is_valid_aesthetic(value: Any, ae: str) -> bool:
all(isinstance(x, int) for x in value),
0 <= value[1] < 3,
]
if all(conditions):
return True
return False
return all(conditions)

elif ae in {"color", "fill"}:
if isinstance(value, str):
Expand Down

0 comments on commit 0ca1e22

Please sign in to comment.