| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A commonly reported issue from users on Gitter is that they get an
AttributeError for an attribute that should be present. This is often
caused due to the fact that they used the `list()` method to retrieve
the object and objects retrieved this way often only have a subset of
the full data.
Add more details in the AttributeError message that explains the
situation to users. This will hopefully allow them to resolve the
issue.
Update the FAQ in the docs to add a section discussing the issue.
Closes #1138
|
| |
|
|
|
|
|
|
| |
Adds a mixin that allows the /promote endpoint to be called.
Signed-off-by: Raimund Hook <raimund.hook@exfo.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are small typos in:
- docs/gl_objects/deploy_tokens.rst
- gitlab/base.py
- gitlab/mixins.py
- gitlab/v4/objects/features.py
- gitlab/v4/objects/groups.py
- gitlab/v4/objects/packages.py
- gitlab/v4/objects/projects.py
- gitlab/v4/objects/sidekiq.py
- gitlab/v4/objects/todos.py
Fixes:
- Should read `treatment` rather than `reatment`.
- Should read `transferred` rather than `transfered`.
- Should read `registered` rather than `registred`.
- Should read `occurred` rather than `occured`.
- Should read `overridden` rather than `overriden`.
- Should read `marked` rather than `maked`.
- Should read `instantiate` rather than `instanciate`.
- Should read `function` rather than `fonction`.
|
|
|
|
|
| |
BREAKING CHANGE: remove deprecated members.all() method
in favor of members_all.list()
|
|
|
| |
Also note what should be changed
|
| |
|
|
|
|
|
|
| |
Fix the import ordering using isort.
https://pycqa.github.io/isort/
|
| |
|
|\
| |
| | |
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.
|
|/
|
|
|
|
|
|
| |
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.
|
|\
| |
| | |
Fix all issues reported by running: tox -e pep8 and enable pep8 as a linter check
|
| |
| |
| |
| |
| |
| | |
F401: Module imported but unused
https://www.flake8rules.com/rules/F401.html
|
|/
|
|
|
|
|
|
|
|
|
|
|
| |
Commit baea7215bbbe07c06b2ca0f97a1d3d482668d887 introduced type-hints
for gitlab/mixins.py.
After starting to add type-hints to gitlab/v4/objects/users.py
discovered a few errors.
Main error was using '=' instead of ':'. For example:
_parent = Optional[...] should be _parent: Optional[...]
Resolved those issues.
|
|\
| |
| | |
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.
|
|/
|
|
|
|
| |
Convert _create_attrs and _update_attrs to use a NamedTuple
(RequiredOptional) to help with code readability. Update all code to
use the NamedTuple.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
* 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 :)
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Signed-off-by: Frantisek Lachman <flachman@redhat.com>
|
| |
|
| |
|
|
|
|
|
|
| |
Refactor a bit to handle this change, and add unit tests.
Closes #779
|
| |
|
|
|
|
| |
Closes #672
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
A time_stats attribute is returned by GitLab when fetching issues and
merge requests (on reasonably recent GitLab versions). Use this info
instead of making a new API call if possible.
Fixes #510
|
|
|
|
|
|
| |
Also consolidate project/group badges tests, and add some docs
Fixes #469
|
| |
|
| |
|
|
|
|
| |
Add a new UserAgentDetail mixin to avoid code duplication.
|
| |
|
|
|
|
| |
Fixes #471
|
| |
|
|
|
|
| |
Fixes #308
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
This mixin provides a workaround for get() for GitLab objects that don't
implement a 'get a single object' API. We are now getting conflicts
because GitLab adds GET methods, and this is against the "Implement only
what exists in the API" strategy.
Also use the proper GET API call for objects that support it.
|
|
|
|
| |
It was used in one class only, no need for added complexity.
|