summaryrefslogtreecommitdiff
path: root/gitlab/client.py
Commit message (Collapse)AuthorAgeFilesLines
* chore: remove unused function _construct_url()John L. Villalovos2021-02-231-18/+0
| | | | | | The function _construct_url() was used by the v3 API. All usage of the function was removed in commit fe89b949922c028830dd49095432ba627d330186
* feat: add an initial mypy test to tox.iniJohn L. Villalovos2021-02-221-1/+1
| | | | Add an initial mypy test to test gitlab/base.py and gitlab/__init__.py
* chore: remove usage of 'from ... import *' in client.pyJohn L. Villalovos2021-02-221-16/+16
| | | | | | | | | | | | | | | | In gitlab/client.py remove usage of: * from gitlab.const import * * from gitlab.exceptions import * Change them to: * import gitlab.const * import gitlab.exceptions Update code to explicitly reference things in gitlab.const and gitlab.exceptions A flake8 run no longer lists any undefined variables. Before it listed possible undefined variables.
* chore: explicitly import gitlab.v4.objects/cliJohn L. Villalovos2021-02-211-4/+16
| | | | | | | | | | | | | | | | | As we only support the v4 Gitlab API, explicitly import gitlab.v4.objects and gitlab.v4.clie instead of dynamically importing it depending on the API version. This has the added benefit of mypy being able to type check the Gitlab __init__() function as currently it will fail if we enable type checking of __init__() it will fail. Also, this also helps by not confusing tools like pyinstaller/cx_freeze with dynamic imports so you don't need hooks for standalone executables. And according to https://docs.gitlab.com/ee/api/, "GraphQL co-exists with the current v4 REST API. If we have a v5 API, this should be a compatibility layer on top of GraphQL."
* refactor: move Gitlab and GitlabList to gitlab/client.pyJohn L. Villalovos2021-02-181-0/+858
Move the classes Gitlab and GitlabList from gitlab/__init__.py to the newly created gitlab/client.py file. Update one test case that was depending on requests being defined in gitlab/__init__.py