Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | refactor: use f-strings for string formattingrefactor/f-strings | Nejc Habjan | 2021-11-02 | 1 | -30/+30 |
| | |||||
* | chore: improve type-hinting for managers | John L. Villalovos | 2021-09-07 | 1 | -1/+4 |
| | | | | | | | | | | | | | | | 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 | ||||
* | chore: add type-hints to gitlab/v4/cli.py | John L. Villalovos | 2021-05-31 | 1 | -39/+120 |
| | | | | | | * Add type-hints to gitlab/v4/cli.py * Add required type-hints to other files based on adding type-hints to gitlab/v4/cli.py | ||||
* | chore: use built-in function issubclass() instead of getmro() | John L. Villalovos | 2021-05-28 | 1 | -12/+10 |
| | | | | | | | Code was using inspect.getmro() to replicate the functionality of the built-in function issubclass() Switch to using issubclass() | ||||
* | chore: fix import ordering using isort | John L. Villalovos | 2021-05-25 | 1 | -1/+1 |
| | | | | | | Fix the import ordering using isort. https://pycqa.github.io/isort/ | ||||
* | fix(cli): fix parsing CLI objects to classnames | Nejc Habjan | 2021-05-15 | 1 | -2/+2 |
| | |||||
* | Merge pull request #1412 from JohnVillalovos/jlvillal/optional_get_attrs | Nejc Habjan | 2021-04-26 | 1 | -7/+4 |
|\ | | | | | chore: make Get.*Mixin._optional_get_attrs always present | ||||
| * | chore: make Get.*Mixin._optional_get_attrs always present | John L. Villalovos | 2021-04-24 | 1 | -7/+4 |
| | | | | | | | | | | | | | | | | 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. | ||||
* | | Merge pull request #1411 from JohnVillalovos/jlvillal/list_filters | Max Wittig | 2021-04-25 | 1 | -7/+4 |
|\ \ | | | | | | | chore: make ListMixin._list_filters always present | ||||
| * | | chore: make ListMixin._list_filters always present | John L. Villalovos | 2021-04-24 | 1 | -7/+4 |
| |/ | | | | | | | | | | | | | | | 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 | John L. Villalovos | 2021-04-24 | 1 | -1/+1 |
|/ | | | | | | | | 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. | ||||
* | chore: have _create_attrs & _update_attrs be a namedtuple | John L. Villalovos | 2021-04-17 | 1 | -4/+4 |
| | | | | | | Convert _create_attrs and _update_attrs to use a NamedTuple (RequiredOptional) to help with code readability. Update all code to use the NamedTuple. | ||||
* | chore: add _create_attrs & _update_attrs to RESTManager | John L. Villalovos | 2021-03-10 | 1 | -23/+12 |
| | | | | | | | 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. | ||||
* | fix: checking if RESTManager._from_parent_attrs is set | John L. Villalovos | 2021-03-07 | 1 | -13/+7 |
| | | | | | | | | | | | | 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. | ||||
* | chore: make _types always present in RESTManager | John L. Villalovos | 2021-03-07 | 1 | -3/+2 |
| | | | | | | | | | | 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(cli): write binary data to stdout buffer | Nejc Habjan | 2020-10-12 | 1 | -0/+2 |
| | |||||
* | chore(cli): remove python2 code | Nejc Habjan | 2020-10-12 | 1 | -5/+1 |
| | |||||
* | chore: remove remnants of python2 imports | Nejc Habjan | 2020-08-22 | 1 | -1/+0 |
| | |||||
* | refactor: remove six dependency | Max Wittig | 2019-12-18 | 1 | -4/+2 |
| | |||||
* | fix(cli): don't fail when the short print attr value is None | xarx00 | 2019-07-21 | 1 | -2/+2 |
| | | | | | Fixes #717 Fixes #727 | ||||
* | refactor: format everything blackrefactor/black | Max Wittig | 2019-05-16 | 1 | -108/+153 |
| | |||||
* | Revert "Custom cli actions fix"revert-760-custom_cli_actions_fix | Max Wittig | 2019-05-10 | 1 | -5/+5 |
| | |||||
* | fix -/_ replacament for *Manager custom actions | Karol Ossowski | 2019-04-24 | 1 | -3/+3 |
| | |||||
* | dont ask for id attr if this is *Manager originating custom action | Karol Ossowski | 2019-04-24 | 1 | -2/+2 |
| | |||||
* | docs(cli): add PyYAML requirement noticeci-output-option | Max Wittig | 2018-10-09 | 1 | -6/+16 |
| | | | | Fixes #606 | ||||
* | [cli] Fix the project-export download | Gauvain Pocentek | 2018-08-25 | 1 | -2/+24 |
| | | | | Closes #559 | ||||
* | [cli] Fix the case where we have nothing to print | Gauvain Pocentek | 2018-07-12 | 1 | -2/+1 |
| | |||||
* | [cli] Output: handle bytes in API responses | Gauvain Pocentek | 2018-07-09 | 1 | -0/+3 |
| | | | | Closes #548 | ||||
* | [cli] Fix the non-verbose output of ProjectCommitComment | Gauvain Pocentek | 2018-06-22 | 1 | -1/+8 |
| | | | | Closes #433 | ||||
* | Add project push rules configuration (#520) | Eric Sabouraud | 2018-06-11 | 1 | -2/+3 |
| | |||||
* | Implement attribute types to handle special cases | Gauvain Pocentek | 2018-03-17 | 1 | -0/+8 |
| | | | | | | | | Some attributes need to be parsed/modified to work with the API (for instance lists). This patch provides two attribute types that will simplify parts of the code, and fix some CLI bugs. Fixes #443 | ||||
* | pep8 fix | Gauvain Pocentek | 2018-03-11 | 1 | -1/+2 |
| | |||||
* | [cli] Fix listing of strings | Gauvain Pocentek | 2018-03-11 | 1 | -0/+3 |
| | |||||
* | [cli] Restore the --help option behavior | Gauvain Pocentek | 2018-03-11 | 1 | -1/+1 |
| | | | | Fixes #381 | ||||
* | [cli] _id_attr is required on creation | Gauvain Pocentek | 2018-03-02 | 1 | -2/+2 |
| | |||||
* | CLI: display_list need to support **kwargs | Gauvain Pocentek | 2018-03-02 | 1 | -2/+2 |
| | |||||
* | [cli] fix listing for json and yaml output | Gauvain Pocentek | 2018-03-02 | 1 | -24/+35 |
| | | | | Fixes #438 | ||||
* | Fix the CLI for objects without ID (API v4) | Gauvain Pocentek | 2017-11-01 | 1 | -7/+12 |
| | | | | Fixes #319 | ||||
* | adds project upload feature (#239) | James Johnson | 2017-09-12 | 1 | -0/+2 |
| | |||||
* | [v4] fix CLI for some mixin methods | Gauvain Pocentek | 2017-09-07 | 1 | -3/+6 |
| | |||||
* | [v4] Make sudo the first argument in CLI help | Gauvain Pocentek | 2017-08-20 | 1 | -1/+1 |
| | |||||
* | [v4] Use - instead of _ in CLI legacy output | Gauvain Pocentek | 2017-08-20 | 1 | -3/+3 |
| | | | | This mimics the v3 behavior. | ||||
* | CLI: yaml and json outputs for v4 | Gauvain Pocentek | 2017-08-18 | 1 | -14/+45 |
| | | | | | | Verbose mode only works with the legacy output. Also add support for filtering the output by defining the list of fields that need to be displayed (yaml and json only). | ||||
* | [v4] CLI support is back | Gauvain Pocentek | 2017-08-17 | 1 | -0/+296 |