core: bump pylint from 2.15.10 to 2.16.0 (#4600)
* core: bump pylint from 2.15.10 to 2.16.0 Bumps [pylint](https://github.com/PyCQA/pylint) from 2.15.10 to 2.16.0. - [Release notes](https://github.com/PyCQA/pylint/releases) - [Commits](https://github.com/PyCQA/pylint/compare/v2.15.10...v2.16.0) --- updated-dependencies: - dependency-name: pylint dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * fix lint Signed-off-by: Jens Langhammer <jens@goauthentik.io> --------- Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Jens Langhammer <jens@goauthentik.io> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
parent
0c7b0c7526
commit
c590cb86cf
|
@ -235,7 +235,6 @@ class Importer:
|
|||
raise IntegrityError
|
||||
except IntegrityError:
|
||||
return False
|
||||
else:
|
||||
self.logger.debug("Committing changes")
|
||||
return True
|
||||
|
||||
|
|
|
@ -27,7 +27,6 @@ def redirect_with_qs(
|
|||
return redirect(view)
|
||||
LOGGER.warning("redirect target is not a valid view", view=view)
|
||||
raise
|
||||
else:
|
||||
if get_query_set:
|
||||
target += "?" + urlencode(get_query_set.items())
|
||||
return redirect(target)
|
||||
|
|
|
@ -73,7 +73,6 @@ class KubernetesObjectReconciler(Generic[T]):
|
|||
raise NeedsRecreate from exc
|
||||
self.logger.debug("Other unhandled error", exc=exc)
|
||||
raise exc
|
||||
else:
|
||||
self.reconcile(current, reference)
|
||||
except NeedsUpdate:
|
||||
try:
|
||||
|
|
|
@ -260,7 +260,7 @@ class OAuth2Provider(Provider):
|
|||
return private_key, JWTAlgorithms.RS256
|
||||
if isinstance(private_key, EllipticCurvePrivateKey):
|
||||
return private_key, JWTAlgorithms.ES256
|
||||
raise Exception(f"Invalid private key type: {type(private_key)}")
|
||||
raise ValueError(f"Invalid private key type: {type(private_key)}")
|
||||
|
||||
def get_issuer(self, request: HttpRequest) -> Optional[str]:
|
||||
"""Get issuer, based on request"""
|
||||
|
|
|
@ -45,7 +45,6 @@ class BaseOAuthClient:
|
|||
except RequestException as exc:
|
||||
self.logger.warning("Unable to fetch user profile", exc=exc, body=response.text)
|
||||
return None
|
||||
else:
|
||||
return response.json()
|
||||
|
||||
def get_redirect_args(self) -> dict[str, str]:
|
||||
|
|
|
@ -43,7 +43,6 @@ class OAuthClient(BaseOAuthClient):
|
|||
except RequestException as exc:
|
||||
LOGGER.warning("Unable to fetch access token", exc=exc)
|
||||
return None
|
||||
else:
|
||||
return self.parse_raw_token(response.text)
|
||||
return None
|
||||
|
||||
|
@ -63,7 +62,6 @@ class OAuthClient(BaseOAuthClient):
|
|||
response.raise_for_status()
|
||||
except RequestException as exc:
|
||||
raise OAuthSourceException from exc
|
||||
else:
|
||||
return response.text
|
||||
|
||||
def get_redirect_args(self) -> dict[str, Any]:
|
||||
|
|
|
@ -86,7 +86,6 @@ class OAuth2Client(BaseOAuthClient):
|
|||
except RequestException as exc:
|
||||
LOGGER.warning("Unable to fetch access token", exc=exc)
|
||||
return None
|
||||
else:
|
||||
return response.json()
|
||||
|
||||
def get_redirect_args(self) -> dict[str, str]:
|
||||
|
@ -111,7 +110,6 @@ class OAuth2Client(BaseOAuthClient):
|
|||
token_data = loads(raw_token)
|
||||
except ValueError:
|
||||
return dict(parse_qsl(raw_token))
|
||||
else:
|
||||
return token_data
|
||||
|
||||
def do_request(self, method: str, url: str, **kwargs) -> Response:
|
||||
|
@ -151,5 +149,4 @@ class UserprofileHeaderAuthClient(OAuth2Client):
|
|||
except RequestException as exc:
|
||||
LOGGER.warning("Unable to fetch user profile", exc=exc, body=response.text)
|
||||
return None
|
||||
else:
|
||||
return response.json()
|
||||
|
|
|
@ -33,7 +33,6 @@ class GitHubOAuth2Client(OAuth2Client):
|
|||
except RequestException as exc:
|
||||
self.logger.warning("Unable to fetch github emails", exc=exc)
|
||||
return []
|
||||
else:
|
||||
return response.json()
|
||||
|
||||
|
||||
|
|
|
@ -38,7 +38,6 @@ class MailcowOAuth2Client(OAuth2Client):
|
|||
except RequestException as exc:
|
||||
LOGGER.warning("Unable to fetch user profile", exc=exc, body=response.text)
|
||||
return None
|
||||
else:
|
||||
return response.json()
|
||||
|
||||
|
||||
|
|
|
@ -36,7 +36,6 @@ class OAuthRedirect(OAuthClientMixin, RedirectView):
|
|||
source: OAuthSource = OAuthSource.objects.get(slug=slug)
|
||||
except OAuthSource.DoesNotExist:
|
||||
raise Http404(f"Unknown OAuth source '{slug}'.")
|
||||
else:
|
||||
if not source.enabled:
|
||||
raise Http404(f"source {slug} is not enabled.")
|
||||
client = self.get_client(source, callback=self.get_callback_url(source))
|
||||
|
|
|
@ -85,7 +85,6 @@ class PlexAuth:
|
|||
except RequestException as exc:
|
||||
LOGGER.warning("Unable to fetch user resources", exc=exc)
|
||||
raise Http404
|
||||
else:
|
||||
for resource in resources:
|
||||
if resource["provides"] != "server":
|
||||
continue
|
||||
|
|
|
@ -151,7 +151,6 @@ class PasswordStageView(ChallengeStageView):
|
|||
# (most likely LDAP)
|
||||
self.logger.debug("Validation error from signal", exc=exc, **auth_kwargs)
|
||||
return self.executor.stage_invalid()
|
||||
else:
|
||||
if not user:
|
||||
# No user was found -> invalid credentials
|
||||
self.logger.info("Invalid credentials")
|
||||
|
|
|
@ -189,14 +189,14 @@ files = [
|
|||
|
||||
[[package]]
|
||||
name = "astroid"
|
||||
version = "2.12.13"
|
||||
version = "2.14.1"
|
||||
description = "An abstract syntax tree for Python with inference support."
|
||||
category = "dev"
|
||||
optional = false
|
||||
python-versions = ">=3.7.2"
|
||||
files = [
|
||||
{file = "astroid-2.12.13-py3-none-any.whl", hash = "sha256:10e0ad5f7b79c435179d0d0f0df69998c4eef4597534aae44910db060baeb907"},
|
||||
{file = "astroid-2.12.13.tar.gz", hash = "sha256:1493fe8bd3dfd73dc35bd53c9d5b6e49ead98497c47b2307662556a5692d29d7"},
|
||||
{file = "astroid-2.14.1-py3-none-any.whl", hash = "sha256:23c718921acab5f08cbbbe9293967f1f8fec40c336d19cd75dc12a9ea31d2eb2"},
|
||||
{file = "astroid-2.14.1.tar.gz", hash = "sha256:bd1aa4f9915c98e8aaebcd4e71930154d4e8c9aaf05d35ac0a63d1956091ae3f"},
|
||||
]
|
||||
|
||||
[package.dependencies]
|
||||
|
@ -2452,18 +2452,18 @@ tests = ["coverage[toml] (==5.0.4)", "pytest (>=6.0.0,<7.0.0)"]
|
|||
|
||||
[[package]]
|
||||
name = "pylint"
|
||||
version = "2.15.10"
|
||||
version = "2.16.0"
|
||||
description = "python code static checker"
|
||||
category = "dev"
|
||||
optional = false
|
||||
python-versions = ">=3.7.2"
|
||||
files = [
|
||||
{file = "pylint-2.15.10-py3-none-any.whl", hash = "sha256:9df0d07e8948a1c3ffa3b6e2d7e6e63d9fb457c5da5b961ed63106594780cc7e"},
|
||||
{file = "pylint-2.15.10.tar.gz", hash = "sha256:b3dc5ef7d33858f297ac0d06cc73862f01e4f2e74025ec3eff347ce0bc60baf5"},
|
||||
{file = "pylint-2.16.0-py3-none-any.whl", hash = "sha256:55e5cf00601c4cfe2e9404355c743a14e63be85df7409da7e482ebde5f9f14a1"},
|
||||
{file = "pylint-2.16.0.tar.gz", hash = "sha256:43ee36c9b690507ef9429ce1802bdc4dcde49454c3d665e39c23791567019c0a"},
|
||||
]
|
||||
|
||||
[package.dependencies]
|
||||
astroid = ">=2.12.13,<=2.14.0-dev0"
|
||||
astroid = ">=2.14.1,<=2.16.0-dev0"
|
||||
colorama = {version = ">=0.4.5", markers = "sys_platform == \"win32\""}
|
||||
dill = {version = ">=0.3.6", markers = "python_version >= \"3.11\""}
|
||||
isort = ">=4.2.5,<6"
|
||||
|
|
Reference in New Issue