| 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()
|
|\ \
| | |
| | | |
chore: move 'gitlab/tests/' dir to 'tests/unit/'
|
| |/
| |
| |
| |
| | |
Move the 'gitlab/tests/' directory to 'tests/unit/' so we have all the
tests located under the 'tests/' directory.
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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): return server data in cancel/retry methods
|
| | | |
|
|\ \ \
| |/ /
|/| | |
chore: mypy: Disallow untyped definitions
|
| |/
| |
| |
| |
| |
| |
| |
| |
| | |
Be more strict and don't allow untyped definitions on the files we
check.
Also this adds type-hints for two of the decorators so that now
functions/methods decorated by them will have their types be revealed
correctly.
|
|\ \
| | |
| | | |
fix(objects): add missing group attributes
|
| | | |
|
|/ /
| |
| |
| |
| | |
The python API was missing the field code_owner_approval_required
as implemented in the GitLab REST API.
|
|/
|
|
|
|
|
|
| |
By adding the file: py.typed
it indicates that python-gitlab is a typed package and contains
type-hints.
https://www.python.org/dev/peps/pep-0561/
|
|
|
|
|
|
|
|
|
| |
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.
|
|\ \
| | |
| | | |
feat: add support for lists of integers to ListAttribute
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Previously ListAttribute only support lists of integers. Now be more
flexible and support lists of items which can be coerced into strings,
for example integers.
This will help us fix issue #1407 by using ListAttribute for the
'iids' field.
|
|\ \ \
| | | |
| | | | |
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: bump version to 2.7.0
|
| |/ |
|
|\ \
| | |
| | | |
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
|
|\
| |
| | |
Improvements to HTTP requests
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Some arguments to `http_request` were being read
from kwargs, but kwargs is where this function
creates query parameters from, by default. In
the absence of a `query_parameters` param, the
function would construct URLs with query
parameters such as `retry_transient_errors=True`
despite those parameters having no meaning to
the API to which the request was sent.
This change names those arguments that are
specific to `http_request` so that they do not
end up as query parameters read from kwargs.
|
| |
| |
| |
| | |
Fixes #1386
|
|\ \
| | |
| | | |
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
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
E711: Comparison to none should be 'if cond is none:'
https://www.flake8rules.com/rules/E711.html
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
E712: Comparison to true should be 'if cond is true:' or 'if cond:'
https://www.flake8rules.com/rules/E712.html
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Fixes to resolve errors for:
https://www.flake8rules.com/rules/E741.html
Do not use variables named 'I', 'O', or 'l' (E741)
https://www.flake8rules.com/rules/E742.html
Do not define classes named 'I', 'O', or 'l' (E742)
|
| |/ /
|/| |
| | |
| | |
| | |
| | |
| | | |
If we want to update email, avatar and do not send email
confirmation change (`skip_reconfirmation` = True), `MultipartEncoder`
will try to encode everything except None and bytes. So it tries to encode bools.
Casting bool's values to their stringified int representation fix it.
|
|\ \ \
| | | |
| | | | |
fix(types): prevent __dir__ in RestObject from producing duplicates
|
| | | | |
|