| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
This will also fix other use cases where an integer is passed in to
MultipartEncoder.
Added unit tests to show it works.
Closes: #2506
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Add the GroupPushRules and GroupPushRulesManager classes.
Closes: #1259
|
|
|
|
|
|
|
|
|
|
| |
Enable the pylint "unused-argument" check and resolve issues it found.
* Quite a few functions were accepting `**kwargs` but not then
passing them on through to the next level. Now pass `**kwargs` to
next level.
* Other functions had no reason to accept `**kwargs`, so remove it
* And a few other fixes.
|
|
|
|
|
|
| |
By having `RequiredOptional` in the `gitlab.base` module it makes it
difficult with circular imports. Move it to the `gitlab.types`
module which has no dependencies on any other gitlab module.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Create a new ArrayAttribute class. This is to indicate types which are
sent to the GitLab server as arrays
https://docs.gitlab.com/ee/api/#array
At this stage it is identical to the CommaSeparatedListAttribute class
but will be used later to support the array types sent to GitLab.
This is the second step in a series of steps of our goal to add full
support for the GitLab API data types[1]:
* array
* hash
* array of hashes
Step one was: commit 5127b1594c00c7364e9af15e42d2e2f2d909449b
[1] https://docs.gitlab.com/ee/api/#encoding-api-parameters-of-array-and-hash-types
Related: #1698
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This name more accurately describes what the type is. Also this is the
first step in a series of steps of our goal to add full support for
the GitLab API data types[1]:
* array
* hash
* array of hashes
[1] https://docs.gitlab.com/ee/api/#encoding-api-parameters-of-array-and-hash-types
|
| |
|
| |
|
|
|
|
|
| |
Updated a few remaining usages of `self.id` to use `self.encoded_id`
where it could be a string value.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make sure all usage of the ID in the URL path is encoded. Normally it
isn't an issue as most IDs are integers or strings which don't contain
a slash ('/'). But when the ID is a string with a slash character it
will break things.
Add a test case that shows this fixes wikis issue with subpages which
use the slash character.
Closes: #1079
|
|
|
|
| |
See https://docs.gitlab.com/ee/api/group_access_tokens.html
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
* Add type-hints to gitlab/v4/objects/groups.py
* Have share() function update object attributes.
* Add 'get()' method so that type-checkers will understand that
getting a group is of type Group.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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: rename confusing `to_project_id` argument in transfer_project
to `project_id` (`--project-id` in CLI). This is used for the source project,
not for the target namespace.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Convert our manager usage to be done via type annotations.
Now to define a manager to be used in a RESTObject subclass can simply
do:
class ExampleClass(CRUDMixin, RESTObject):
my_manager: MyManager
Any type-annotation that annotates it to be of type *Manager (with the
exception of RESTManager) will cause the manager to be created on the
object.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The 'managers' are dynamically created. This unfortunately means that
we don't have any type-hints for them and so editors which understand
type-hints won't know that they are valid attributes.
* Add the type-hints for the managers we define.
* Add a unit test that makes sure that the type-hints and the
'_managers' attribute are kept in sync with each other.
* Add unit test that makes sure specified managers in '_managers'
have a name ending in 'Managers' to keep with current convention.
* Make RESTObject._managers always present with a default value of
None.
* Fix a type-issue revealed now that mypy knows what the type is
|
| |
|
|
|
| |
feat(objects): add support for Group wikis
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Fix the import ordering using isort.
https://pycqa.github.io/isort/
|
| |
|
|\
| |
| | |
fix(objects): make lists work for filters in all objects
|
| | |
|
|/ |
|
|
|
|
|
|
| |
F401: Module imported but unused
https://www.flake8rules.com/rules/F401.html
|
|\
| |
| | |
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.
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|