@@ -165,8 +165,8 @@ def api_version(self):
165165 """The API version used (4 only)."""
166166 return self ._api_version
167167
168- @staticmethod
169- def from_config (gitlab_id = None , config_files = None ):
168+ @classmethod
169+ def from_config (cls , gitlab_id = None , config_files = None ):
170170 """Create a Gitlab connection from configuration files.
171171
172172 Args:
@@ -181,13 +181,13 @@ def from_config(gitlab_id=None, config_files=None):
181181 """
182182 config = gitlab .config .GitlabConfigParser (gitlab_id = gitlab_id ,
183183 config_files = config_files )
184- return Gitlab (config .url , private_token = config .private_token ,
185- oauth_token = config .oauth_token ,
186- ssl_verify = config .ssl_verify , timeout = config .timeout ,
187- http_username = config .http_username ,
188- http_password = config .http_password ,
189- api_version = config .api_version ,
190- per_page = config .per_page )
184+ return cls (config .url , private_token = config .private_token ,
185+ oauth_token = config .oauth_token ,
186+ ssl_verify = config .ssl_verify , timeout = config .timeout ,
187+ http_username = config .http_username ,
188+ http_password = config .http_password ,
189+ api_version = config .api_version ,
190+ per_page = config .per_page )
191191
192192 def auth (self ):
193193 """Performs an authentication.
0 commit comments