From 2dd177bf83fdf62f0e9bdcb3bc41d5e4f5631504 Mon Sep 17 00:00:00 2001 From: Nejc Habjan Date: Mon, 27 Mar 2023 12:06:28 +0200 Subject: refactor(client): let mypy know http_password is set --- gitlab/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gitlab/client.py b/gitlab/client.py index 94fb66a..be8b48f 100644 --- a/gitlab/client.py +++ b/gitlab/client.py @@ -533,7 +533,7 @@ class Gitlab: self.headers.pop("PRIVATE-TOKEN", None) self.headers["JOB-TOKEN"] = self.job_token - if self.http_username: + if self.http_username and self.http_password: self._http_auth = requests.auth.HTTPBasicAuth( self.http_username, self.http_password ) -- cgit v1.2.1