| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
| |
Code was using inspect.getmro() to replicate the functionality of the
built-in function issubclass()
Switch to using issubclass()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
MR https://github.com/python-gitlab/python-gitlab/pull/1121 changed
mr.merge() to use 'query_data'. This appears to have been wrong.
From the Gitlab docs they state it should be sent in a payload body
https://docs.gitlab.com/ee/api/README.html#request-payload since
mr.merge() is a PUT request.
> Request Payload
> API Requests can use parameters sent as query strings or as a
> payload body. GET requests usually send a query string, while PUT
> or POST requests usually send the payload body
Fixes: #1452
Related to: #1120
|
| |
|
|
|
|
|
|
| |
Fix the import ordering using isort.
https://pycqa.github.io/isort/
|
| |
|
| |
|
|\
| |
| | |
fix(objects): make lists work for filters in all objects
|
| | |
|
| | |
|
|\ \
| | |
| | | |
fix(objects): add missing group attributes
|
| |/ |
|
|/
|
|
|
| |
The python API was missing the field code_owner_approval_required
as implemented in the GitLab REST API.
|
|
|
|
|
|
|
|
|
| |
Set the 'iids' values as type ListAttribute so it will pass the list
as a comma-separated string, instead of a list.
Add a functional test.
Closes: #1407
|
|\
| |
| | |
fix: add a check to ensure the MRO is correct
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add a check to ensure the MRO (Method Resolution Order) is correct for classes in
gitlab.v4.objects when doing type-checking.
An example of an incorrect definition:
class ProjectPipeline(RESTObject, RefreshMixin, ObjectDeleteMixin):
^^^^^^^^^^ This should be at the end.
Correct way would be:
class ProjectPipeline(RefreshMixin, ObjectDeleteMixin, RESTObject):
Correctly at the end ^^^^^^^^^^
Also fix classes which have the issue.
|
|\ \
| | |
| | | |
chore: make Get.*Mixin._optional_get_attrs always present
|
| |/
| |
| |
| |
| |
| |
| |
| | |
Always create GetMixin/GetWithoutIdMixin._optional_get_attrs attribute
with a default value of tuple()
This way we don't need to use hasattr() and we will know the type of
the attribute.
|
| | |
|
|\ \
| | |
| | | |
chore: make ListMixin._list_filters always present
|
| |/
| |
| |
| |
| |
| |
| |
| | |
Always create ListMixin._list_filters attribute with a default value
of tuple().
This way we don't need to use hasattr() and we will know the type of
the attribute.
|
|\ \
| | |
| | | |
chore: make RESTObject._short_print_attrs always present
|
| |/
| |
| |
| |
| |
| |
| |
| | |
Always create RESTObject._short_print_attrs with a default value of
None.
This way we don't need to use hasattr() and we will know the type of
the attribute.
|
|/
|
|
| |
It's mostly an internal thing anyway and can be removed in 3.0.0
|
|\
| |
| | |
fix: correct ProjectFile.decode() documentation
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
ProjectFile.decode() returns 'bytes' and not 'str'.
Update the method's doc-string and add a type-hint.
ProjectFile.decode() returns the result of a call to
base64.b64decode()
The docs for that function state it returns 'bytes':
https://docs.python.org/3/library/base64.html#base64.b64decode
Fixes: #1403
|
|\ \
| |/
|/| |
Fix all issues reported by running: tox -e pep8 and enable pep8 as a linter check
|
| |
| |
| |
| |
| |
| | |
Local variable name is assigned to but never used
https://www.flake8rules.com/rules/F841.html
|
| |
| |
| |
| |
| |
| | |
F401: Module imported but unused
https://www.flake8rules.com/rules/F401.html
|
| |
| |
| |
| |
| |
| | |
While adding type-hints mypy flagged this as an issue. The third
argument to register_custom_action is supposed to be a tuple. It was
being passed as a string rather than a tuple of strings.
|
| | |
|
|/ |
|
|\
| |
| | |
chore: have _create_attrs & _update_attrs be a namedtuple
|
| |
| |
| |
| |
| |
| | |
Convert _create_attrs and _update_attrs to use a NamedTuple
(RequiredOptional) to help with code readability. Update all code to
use the NamedTuple.
|
|\ \
| | |
| | | |
Feat: cover all audit events
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
|\ \ \
| |_|/
|/| | |
feat: add support for Project Package Files
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Add ProjectPackageFile and the ability to list project package
package_files.
Fixes #1372
|
|/ /
| |
| |
| |
| |
| |
| | |
Add the attributes: _create_attrs and _update_attrs to the RESTManager
class. This is so that we stop using getattr() if we don't need to.
This also helps with type-hints being available for these attributes.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Prior to commit 3727cbd21fc40b312573ca8da56e0f6cf9577d08
RESTManager._from_parent_attrs did not exist unless it was explicitly
set. But commit 3727cbd21fc40b312573ca8da56e0f6cf9577d08 set it to a
default value of {}.
So the checks using hasattr() were no longer valid.
Update the checks to check if RESTManager._from_parent_attrs has a
value.
|
|/
|
|
|
|
|
|
|
|
| |
We now create _types = {} in RESTManager class.
By making _types always present in RESTManager it makes the code
simpler. We no longer have to do:
types = getattr(self, "_types", {})
And the type checker now understands the type.
|
|
|
|
|
| |
Remove usage of 'import *' in
gitlab/v4/objects/project_access_tokens.py.
|
| |
|
|\
| |
| | |
feat(users): add follow/unfollow API
|
| | |
|
| |
| |
| |
| |
| | |
The classes UserStatus and UserStatusManager were each declared twice.
Remove the duplicate declarations.
|
|\ \
| |/
|/| |
chore: remove usage of 'from ... import *'
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In gitlab/v4/objects/*.py remove usage of:
* from gitlab.base import *
* from gitlab.mixins import *
Change them to:
* from gitlab.base import CLASS_NAME
* from gitlab.mixins import CLASS_NAME
Programmatically update code to explicitly import needed classes only.
After the change the output of:
$ flake8 gitlab/v4/objects/*py | grep 'REST\|Mixin'
Is empty. Before many messages about unable to determine if it was a
valid name.
|