diff options
author | John L. Villalovos <john@sodarock.com> | 2022-06-03 09:26:26 -0700 |
---|---|---|
committer | John L. Villalovos <john@sodarock.com> | 2022-06-04 09:18:22 -0700 |
commit | 1e8916438f7c4f67bd7745103b870d84f6ba2d01 (patch) | |
tree | 5dbf60d65beff6b978e99cd666b37932c8ae6a12 | |
parent | 6cdccd90177a70835db176155cf6d0dde70989d3 (diff) | |
download | gitlab-1e8916438f7c4f67bd7745103b870d84f6ba2d01.tar.gz |
chore: enable pylint checks
Enable the pylint checks:
* unnecessary-pass
* unspecified-encoding
Update code to resolve errors found
-rw-r--r-- | gitlab/cli.py | 2 | ||||
-rw-r--r-- | gitlab/mixins.py | 6 | ||||
-rw-r--r-- | pyproject.toml | 2 |
3 files changed, 1 insertions, 9 deletions
diff --git a/gitlab/cli.py b/gitlab/cli.py index c9e182d..18618eb 100644 --- a/gitlab/cli.py +++ b/gitlab/cli.py @@ -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") diff --git a/gitlab/mixins.py b/gitlab/mixins.py index 8e9f0b3..3904d43 100644 --- a/gitlab/mixins.py +++ b/gitlab/mixins.py @@ -244,8 +244,6 @@ class RetrieveMixin(ListMixin, GetMixin): _path: Optional[str] gitlab: gitlab.Gitlab - pass - class CreateMixin(_RestManagerBase): _computed_path: Optional[str] @@ -429,8 +427,6 @@ class CRUDMixin(GetMixin, ListMixin, CreateMixin, UpdateMixin, DeleteMixin): _path: Optional[str] gitlab: gitlab.Gitlab - pass - class NoUpdateMixin(GetMixin, ListMixin, CreateMixin, DeleteMixin): _computed_path: Optional[str] @@ -441,8 +437,6 @@ class NoUpdateMixin(GetMixin, ListMixin, CreateMixin, DeleteMixin): _path: Optional[str] gitlab: gitlab.Gitlab - pass - class SaveMixin(_RestObjectBase): """Mixin for RESTObject's that can be updated.""" diff --git a/pyproject.toml b/pyproject.toml index 3399b57..35d3042 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -78,8 +78,6 @@ disable = [ "too-many-locals", "too-many-statements", "unexpected-keyword-arg", - "unnecessary-pass", - "unspecified-encoding", "unsubscriptable-object", "unused-argument", "useless-import-alias", |