summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* refactor: decouple CLI from custom method argumentsrefactor/decouple-cli-from-custom-argsNejc Habjan2022-06-0617-114/+159
|
* Merge pull request #2055 from python-gitlab/jlvillal/resourceNejc Habjan2022-06-051-1/+3
|\ | | | | chore(cli): rename "object" to "GitLab resource"
| * chore(cli): rename "object" to "GitLab resource"John L. Villalovos2022-06-051-1/+3
|/ | | | | Make the parser name more user friendly by renaming from generic "object" to "GitLab resource"
* Merge pull request #2045 from python-gitlab/jlvillal/test_validate_attrsNejc Habjan2022-06-051-0/+49
|\ | | | | test: add more tests for RequiredOptional
| * test: add more tests for RequiredOptionalJohn L. Villalovos2022-06-011-0/+49
| |
* | Merge pull request #2056 from python-gitlab/jlvillal/pylint_jobNejc Habjan2022-06-051-0/+1
|\ \ | | | | | | chore: use multiple processors when running PyLint
| * | chore: use multiple processors when running PyLintJohn L. Villalovos2022-06-051-0/+1
|/ / | | | | | | | | | | Use multiple processors when running PyLint. On my system it took about 10.3 seconds to run PyLint before this change. After this change it takes about 5.8 seconds to run PyLint.
* | Merge pull request #2051 from python-gitlab/jlvillal/more_more_pylintNejc Habjan2022-06-0512-49/+38
|\ \ | | | | | | chore: enable more pylint checks
| * | chore: enable pylint check: "redefined-outer-name",John L. Villalovos2022-06-043-7/+5
| | | | | | | | | | | | | | | Enable the pylint check "redefined-outer-name" and fix the errors detected.
| * | chore: enable pylint check: "no-self-use"John L. Villalovos2022-06-044-11/+17
| | | | | | | | | | | | Enable the pylint check "no-self-use" and fix the errors detected.
| * | chore: enable pylint check: "no-else-return"John L. Villalovos2022-06-045-9/+4
| | | | | | | | | | | | Enable the pylint check "no-else-return" and fix the errors detected.
| * | chore: enable pylint check: "attribute-defined-outside-init"John L. Villalovos2022-06-044-1/+5
| | | | | | | | | | | | | | | Enable the pylint check: "attribute-defined-outside-init" and fix errors detected.
| * | chore: enable pylint check "raise-missing-from"John L. Villalovos2022-06-043-5/+6
| | | | | | | | | | | | Enable the pylint check "raise-missing-from" and fix errors detected.
| * | chore: enable pylint checks which require no changesJohn L. Villalovos2022-06-041-7/+0
| | | | | | | | | | | | | | | Enabled the pylint checks that don't require any code changes. Previously these checks were disabled.
| * | chore: enable pylint checksJohn L. Villalovos2022-06-043-9/+1
| | | | | | | | | | | | | | | | | | | | | | | | Enable the pylint checks: * unnecessary-pass * unspecified-encoding Update code to resolve errors found
* | | Merge pull request #2054 from python-gitlab/jlvillal/resourceNejc Habjan2022-06-053-14/+27
|\ \ \ | |/ / |/| | chore: rename `whaction` and `action` to `resource_action` in CLI
| * | chore: rename `whaction` and `action` to `resource_action` in CLIJohn L. Villalovos2022-06-053-14/+27
|/ / | | | | | | | | Rename the variables `whaction` and `action` to `resource_action` to improve code-readability.
* | Merge pull request #2049 from python-gitlab/jlvillal/python_311Nejc Habjan2022-06-041-1/+1
|\ \ | | | | | | test: move back to using latest Python 3.11 version
| * | test: move back to using latest Python 3.11 versionJohn L. Villalovos2022-06-031-1/+1
| | |
* | | Merge pull request #2053 from python-gitlab/jlvillal/resourceNejc Habjan2022-06-043-22/+24
|\ \ \ | | | | | | | | chore: rename `what` to `gitlab_resource`
| * | | chore: rename `what` to `gitlab_resource`John L. Villalovos2022-06-033-22/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Naming a variable `what` makes it difficult to understand what it is used for. Rename it to `gitlab_resource` as that is what is being stored. The Gitlab documentation talks about them being resources: https://docs.gitlab.com/ee/api/api_resources.html This will improve code readability.
* | | | Merge pull request #2052 from python-gitlab/jlvillal/cli_minor_cleanNejc Habjan2022-06-041-2/+2
|\ \ \ \ | |/ / / | | | | chore: rename `__call__()` to `run()` in GitlabCLI
| * | | chore: rename `__call__()` to `run()` in GitlabCLIJohn L. Villalovos2022-06-031-2/+2
| |/ / | | | | | | | | | Less confusing to have it be a normal method.
* | | Merge pull request #2050 from python-gitlab/jlvillal/more_pylintNejc Habjan2022-06-042-3/+2
|\ \ \ | |/ / |/| | chore: enable 'consider-using-sys-exit' pylint check
| * | chore: enable 'consider-using-sys-exit' pylint checkJohn L. Villalovos2022-06-032-3/+2
|/ / | | | | | | | | Enable the 'consider-using-sys-exit' pylint check and fix errors raised.
* | test: increase client coverageNejc Habjan2022-06-022-0/+39
| |
* | Merge pull request #2043 from python-gitlab/jlvillal/f-stringNejc Habjan2022-06-012-4/+3
|\ \ | |/ |/| chore: require f-strings
| * chore: require f-stringsJohn L. Villalovos2022-06-012-4/+3
|/ | | | | We previously converted all string formatting to use f-strings. Enable pylint check to enforce this.
* chore(ci): pin 3.11 to beta.1Nejc Habjan2022-06-011-1/+1
|
* test(cli): improve coverage for custom actionsNejc Habjan2022-06-013-4/+39
|
* chore(cli): ignore coverage on exceptions triggering cli.dieNejc Habjan2022-06-011-7/+7
|
* fix(cli): fix project export download for CLINejc Habjan2022-06-012-1/+35
| | | | | Since ac1c619cae6481833f5df91862624bf0380fef67 we delete parent arg keys from the args dict so this has been trying to access the wrong attribute.
* Merge pull request #2042 from python-gitlab/jlvillal/exclusiveNejc Habjan2022-06-017-44/+41
|\ | | | | Clean-up the `validate_attrs` method/function
| * chore: move `utils._validate_attrs` inside `types.RequiredOptional`John L. Villalovos2022-05-317-44/+41
| | | | | | | | | | | | Move the `validate_attrs` function to be inside the `RequiredOptional` class. It makes sense for it to be part of the class as it is working on data related to the class.
| * chore: remove use of '%' string formatter in `gitlab/utils.py`John L. Villalovos2022-05-311-2/+2
|/ | | | Replace usage with f-string
* Merge pull request #2040 from python-gitlab/jlvillal/type_aliasNejc Habjan2022-06-012-9/+9
|\ | | | | chore: have `EncodedId` creation always return `EncodedId`
| * chore: have `EncodedId` creation always return `EncodedId`John L. Villalovos2022-05-312-9/+9
|/ | | | | | | | There is no reason to return an `int` as we can always return a `str` version of the `int` Change `EncodedId` to always return an `EncodedId`. This removes the need to have `mypy` ignore the error raised.
* feat: support mutually exclusive attributes and consolidate validation to ↵Walter Rowe2022-05-318-40/+53
| | | | | | | | | | | | | | | fix board lists (#2037) add exclusive tuple to RequiredOptional data class to support for mutually exclusive attributes consolidate _check_missing_create_attrs and _check_missing_update_attrs from mixins.py into _validate_attrs in utils.py change _create_attrs in board list manager classes from required=('label_ld',) to exclusive=('label_id','asignee_id','milestone_id') closes https://github.com/python-gitlab/python-gitlab/issues/1897
* Merge pull request #2039 from python-gitlab/jlvillal/required_optionalNejc Habjan2022-05-3146-65/+108
|\ | | | | chore: move `RequiredOptional` to the `gitlab.types` module
| * chore: move `RequiredOptional` to the `gitlab.types` moduleJohn L. Villalovos2022-05-3146-65/+108
|/ | | | | | 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.
* Merge pull request #2036 from python-gitlab/jlvillal/get_not_noneNejc Habjan2022-05-3012-66/+50
|\ | | | | chore: update type-hints return signature for GetWithoutIdMixin methods
| * chore: update type-hints return signature for GetWithoutIdMixin methodsJohn L. Villalovos2022-05-3012-66/+50
|/ | | | | | | Commit f0152dc3cc9a42aa4dc3c0014b4c29381e9b39d6 removed situation where `get()` in a `GetWithoutIdMixin` based class could return `None` Update the type-hints to no longer return `Optional` AKA `None`
* Merge pull request #2033 from python-gitlab/jlvillal/module_not_found_errorNejc Habjan2022-05-303-4/+4
|\ | | | | chore: correct ModuleNotFoundError() arguments
| * chore: correct ModuleNotFoundError() argumentsJohn L. Villalovos2022-05-293-4/+4
| | | | | | | | | | | | | | | | | | | | | | Previously in commit 233b79ed442aac66faf9eb4b0087ea126d6dffc5 I had used the `name` argument for `ModuleNotFoundError()`. This basically is the equivalent of not passing any message to `ModuleNotFoundError()`. So when the exception was raised it wasn't very helpful. Correct that and add a unit-test that shows we get the message we expect.
* | Merge pull request #2034 from python-gitlab/renovate/typing-dependenciesNejc Habjan2022-05-302-4/+4
|\ \ | | | | | | chore(deps): update typing dependencies
| * | chore(deps): update typing dependenciesRenovate Bot2022-05-302-4/+4
| |/
* | Merge pull request #2035 from python-gitlab/renovate/commitizen-2.xNejc Habjan2022-05-301-1/+1
|\ \ | |/ |/| chore(deps): update dependency commitizen to v2.27.1
| * chore(deps): update dependency commitizen to v2.27.1Renovate Bot2022-05-301-1/+1
|/
* chore(mixins): remove None check as http_get always returns valueNejc Habjan2022-05-291-2/+0
|
* test(gitlab): increase unit test coverageNejc Habjan2022-05-2912-34/+304
|