| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|/ / / /
| | | |
| | | |
| | | |
| | | |
| | | | |
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.
|
| | | | |
|
| | | | |
|
| |/ /
|/| | |
|
|\ \ \
| | | |
| | | | |
feat(config): allow using a credential helper to lookup tokens
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | | |
chore: remove usage of getattr()
|
| | |/ /
| |/| |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Remove usage of getattr(self, "_update_uses_post", False)
Instead add it to class and set default value to False.
Add a tests that shows it is set to True for the
ProjectMergeRequestApprovalManager and ProjectApprovalManager classes.
|
|\ \ \ \
| |_|_|/
|/| | | |
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.
|
|\ \
| | |
| | | |
fix: handle tags like debian/2%2.6-21 as identifiers
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Git refnames are relatively free-form and can contain all sort for
special characters, not just `/` and `#`, see
http://git-scm.com/docs/git-check-ref-format
In particular, Debian's DEP-14 standard for storing packaging in git
repositories mandates the use of the `%` character in tags in some
cases like `debian/2%2.6-21`.
Unfortunately python-gitlab currently only escapes `/` to `%2F` and in
some cases `#` to `%23`. This means that when using the commit API to
retrieve information about the `debian/2%2.6-21` tag only the slash is
escaped before being inserted in the URL path and the `%` is left
untouched, resulting in something like
`/api/v4/projects/123/repository/commits/debian%2F2%2.6-21`. When
urllib3 seees that it detects the invalid `%` escape and then urlencodes
the whole string, resulting in
`/api/v4/projects/123/repository/commits/debian%252F2%252.6-21`, where
the original `/` got escaped twice and produced `%252F`.
To avoid the issue, fully urlencode identifiers and parameters to avoid
the urllib3 auto-escaping in all cases.
Signed-off-by: Emanuele Aina <emanuele.aina@collabora.com>
|
| |
| |
| |
| |
| |
| |
| | |
* Added type-hints for gitlab/mixins.py
* Changed use of filter with a lambda expression to
list-comprehension. mypy was not able to understand the previous
code. Also list-comprehension is better :)
|
|\ \
| | |
| | | |
chore: add type hints to gitlab/base.py:RESTManager
|
| |/
| |
| |
| | |
Add some additional type hints to gitlab/base.py
|
|\ \
| |/
|/| |
chore: Put assert statements inside 'if TYPE_CHECKING:'
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
To be safe that we don't assert while running, put the assert
statements, which are used by mypy to check that types are correct,
inside an 'if TYPE_CHECKING:' block.
Also, instead of asserting that the item is a dict, instead assert
that it is not a requests.Response object. Theoretically the JSON
could return as a list or dict, though at this time we are assuming a
dict.
|
|/
|
|
|
| |
Remove usage of 'import *' in
gitlab/v4/objects/project_access_tokens.py.
|
|
|
|
|
|
|
|
|
|
| |
Don't allow a partially annotated function definition. Either none of
the function is annotated or all of it must be.
Update code to ensure no-more partially annotated functions.
Update gitlab/cli.py with better type-hints. Changed Tuple[Any, ...]
to Tuple[str, ...]
|
|\
| |
| | |
chore(api): move repository endpoints into separate module
|
| | |
|
|\ \
| | |
| | | |
chore: add and fix some type-hints in gitlab/client.py
|
| | |
| | |
| | |
| | | |
Was able to figure out better type-hints for gitlab/client.py
|
|\ \ \
| |_|/
|/| | |
chore: add additional type-hints for gitlab/base.py
|
| |/
| |
| |
| |
| |
| |
| | |
Add type-hints for the variables which are set via self.__dict__
mypy doesn't see them when they are assigned via self.__dict__. So
declare them in the class definition.
|
|\ \
| |/
|/| |
feat(users): add follow/unfollow API
|
| | |
|
|\ \
| | |
| | | |
chore: add type-hints to gitlab/client.py
|
| | |
| | |
| | |
| | | |
Adding some initial type-hints to gitlab/client.py
|