Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove PLR0911 too many return statements from ignores #398

Merged
merged 1 commit into from
Mar 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions axis/vapix/models/pwdgrp_cgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,18 +52,12 @@ def name(self) -> str:
@property
def privileges(self) -> SecondaryGroup:
"""Return highest privileged role supported."""
if self.admin and self.ptz:
return SecondaryGroup.ADMIN_PTZ
if self.admin:
return SecondaryGroup.ADMIN
if self.operator and self.ptz:
return SecondaryGroup.OPERATOR_PTZ
return SecondaryGroup.ADMIN_PTZ if self.ptz else SecondaryGroup.ADMIN
if self.operator:
return SecondaryGroup.OPERATOR
if self.viewer and self.ptz:
return SecondaryGroup.VIEWER_PTZ
return SecondaryGroup.OPERATOR_PTZ if self.ptz else SecondaryGroup.OPERATOR
if self.viewer:
return SecondaryGroup.VIEWER
return SecondaryGroup.VIEWER_PTZ if self.ptz else SecondaryGroup.VIEWER
return SecondaryGroup.UNKNOWN

@classmethod
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ lint.ignore = [
"D203", # 1 blank line required before class docstring
"D213", # Multi-line docstring summary should start at the second line
"E501", # Checks for lines that exceed the specified maximum character length
"PLR0911", # Too many return statements
"PLR0912", # Maximum number of branches allowed for a function or method body
"PLR0913", # Too many arguments to function call ({c_args} > {max_args})
"PLR0915", # Too many statements ({statements} > {max_statements})
Expand Down