| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
* fix(cli): Add ability to escape at-prefixed parameter (#2511)
---------
Co-authored-by: Nejc Habjan <hab.nejc@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Update the `requirements-*` files.
In order to update mypy==1.0.0 we need to also update
responses==0.22.0
Fix one issue found by `mypy`
Leaving updates for `precommit` to be done in a separate commit by
someone.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Authentication issues are currently hard to debug since `--debug` only
has effect after `gl.auth()` has been called.
For example, a 401 error is printed without any details about the actual
HTTP request being sent:
$ gitlab --debug --server-url https://gitlab.com current-user get
401: 401 Unauthorized
By moving the call to `gl.enable_debug()` the usual debug logs get
printed before the final error message.
Signed-off-by: Emanuele Aina <emanuele.aina@collabora.com>
|
| |
|
|
|
|
| |
Update code so that the `warn_return_any` check passes.
|
|
|
|
|
|
|
|
|
|
| |
Add a custom argparse help formatter that overrides the output
format to list items vertically.
The formatter is derived from argparse.HelpFormatter with minimal changes.
Co-authored-by: John Villalovos <john@sodarock.com>
Co-authored-by: Nejc Habjan <nejc.habjan@siemens.com>
|
|\
| |
| | |
chore: enable more pylint checks
|
| |
| |
| |
| |
| | |
Enable the pylint check "redefined-outer-name" and fix the errors
detected.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Enable the pylint checks:
* unnecessary-pass
* unspecified-encoding
Update code to resolve errors found
|
|/
|
|
|
| |
Rename the variables `whaction` and `action` to `resource_action` to
improve code-readability.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
problem (#2013)
fix(cli): change default `allow_abbrev` value to fix argument collision
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
BREAKING-CHANGE: The gitlab CLI will now accept CLI arguments
and environment variables for its global options in addition
to configuration file options. This may change behavior for
some workflows such as running inside GitLab CI and with
certain environment variables configured.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Fix the import ordering using isort.
https://pycqa.github.io/isort/
|
| |
|
|
|
|
|
|
|
|
|
| |
Be more strict and don't allow untyped definitions on the files we
check.
Also this adds type-hints for two of the decorators so that now
functions/methods decorated by them will have their types be revealed
correctly.
|
|
|
|
|
|
| |
Local variable name is assigned to but never used
https://www.flake8rules.com/rules/F841.html
|
|
|
|
|
|
| |
F401: Module imported but unused
https://www.flake8rules.com/rules/F401.html
|
|
|
|
|
|
|
|
|
|
| |
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, ...]
|
| |
|
|
|
|
|
| |
Discovered this when I ran flake8 on the file. Unfortunately I was the
one who introduced this wrong variable name :(
|
|
|
|
| |
Add an initial mypy test to test gitlab/base.py and gitlab/__init__.py
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As we only support the v4 Gitlab API, explicitly import
gitlab.v4.objects and gitlab.v4.clie instead of dynamically importing
it depending on the API version.
This has the added benefit of mypy being able to type check the Gitlab
__init__() function as currently it will fail if we enable type
checking of __init__() it will fail.
Also, this also helps by not confusing tools like pyinstaller/cx_freeze with
dynamic imports so you don't need hooks for standalone executables. And
according to https://docs.gitlab.com/ee/api/,
"GraphQL co-exists with the current v4 REST API. If we have a v5 API, this
should be a compatibility layer on top of GraphQL."
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
See https://docs.gitlab.com/ee/api/jobs.html#get-job-artifacts for usage
|
|
|
|
|
| |
Fixes #717
Fixes #727
|
| |
|
| |
|
|
|
|
| |
This makes sure that the global help message wont be printed instead of the command spedific one unless we fail to read the configuration file
|
|
|
|
| |
* Exit and hint user about possible errors
* test: adjust test cases to config missing error
|
|
|
|
| |
Fixes #560
|
| |
|
| |
|
|
|
|
| |
Fixes #381
|
|
|
|
|
|
|
| |
With the @/file/path syntax (similar to curl) user can provide values
from attributes in files.
Fixes #448
|
| |
|
| |
|
| |
|