summaryrefslogtreecommitdiff
path: root/gitlab/cli.py
diff options
context:
space:
mode:
authorNejc Habjan <nejc.habjan@siemens.com>2022-06-05 19:23:56 +0200
committerGitHub <noreply@github.com>2022-06-05 19:23:56 +0200
commit7a5923c8e77a41cb829a086a903aee4123ca4d14 (patch)
tree9d9129a8016e66ee397bcaab50ef22b08aea3d7e /gitlab/cli.py
parent61b8beb8bed0a9d7cd30450fefba0dd76c0d35d6 (diff)
parent1324ce1a439befb4620953a4df1f70b74bf70cbd (diff)
downloadgitlab-7a5923c8e77a41cb829a086a903aee4123ca4d14.tar.gz
Merge pull request #2051 from python-gitlab/jlvillal/more_more_pylint
chore: enable more pylint checks
Diffstat (limited to 'gitlab/cli.py')
-rw-r--r--gitlab/cli.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/gitlab/cli.py b/gitlab/cli.py
index e418714..9793964 100644
--- a/gitlab/cli.py
+++ b/gitlab/cli.py
@@ -252,10 +252,10 @@ def _get_base_parser(add_help: bool = True) -> argparse.ArgumentParser:
def _get_parser() -> argparse.ArgumentParser:
# NOTE: We must delay import of gitlab.v4.cli until now or
# otherwise it will cause circular import errors
- import gitlab.v4.cli
+ from gitlab.v4 import cli as v4_cli
parser = _get_base_parser()
- return gitlab.v4.cli.extend_parser(parser)
+ return v4_cli.extend_parser(parser)
def _parse_value(v: Any) -> Any:
@@ -263,7 +263,7 @@ def _parse_value(v: Any) -> Any:
# If the user-provided value starts with @, we try to read the file
# path provided after @ as the real value. Exit on any error.
try:
- with open(v[1:]) as f:
+ with open(v[1:], encoding="utf-8") as f:
return f.read()
except Exception as e:
sys.stderr.write(f"{e}\n")