Skip to content

Commit 1e89164

Browse files
chore: enable pylint checks
Enable the pylint checks: * unnecessary-pass * unspecified-encoding Update code to resolve errors found
1 parent 6cdccd9 commit 1e89164

File tree

3 files changed

+1
-9
lines changed

3 files changed

+1
-9
lines changed

gitlab/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ def _parse_value(v: Any) -> Any:
263263
# If the user-provided value starts with @, we try to read the file
264264
# path provided after @ as the real value. Exit on any error.
265265
try:
266-
with open(v[1:]) as f:
266+
with open(v[1:], encoding="utf-8") as f:
267267
return f.read()
268268
except Exception as e:
269269
sys.stderr.write(f"{e}\n")

gitlab/mixins.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -244,8 +244,6 @@ class RetrieveMixin(ListMixin, GetMixin):
244244
_path: Optional[str]
245245
gitlab: gitlab.Gitlab
246246

247-
pass
248-
249247

250248
class CreateMixin(_RestManagerBase):
251249
_computed_path: Optional[str]
@@ -429,8 +427,6 @@ class CRUDMixin(GetMixin, ListMixin, CreateMixin, UpdateMixin, DeleteMixin):
429427
_path: Optional[str]
430428
gitlab: gitlab.Gitlab
431429

432-
pass
433-
434430

435431
class NoUpdateMixin(GetMixin, ListMixin, CreateMixin, DeleteMixin):
436432
_computed_path: Optional[str]
@@ -441,8 +437,6 @@ class NoUpdateMixin(GetMixin, ListMixin, CreateMixin, DeleteMixin):
441437
_path: Optional[str]
442438
gitlab: gitlab.Gitlab
443439

444-
pass
445-
446440

447441
class SaveMixin(_RestObjectBase):
448442
"""Mixin for RESTObject's that can be updated."""

pyproject.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,6 @@ disable = [
7878
"too-many-locals",
7979
"too-many-statements",
8080
"unexpected-keyword-arg",
81-
"unnecessary-pass",
82-
"unspecified-encoding",
8381
"unsubscriptable-object",
8482
"unused-argument",
8583
"useless-import-alias",

0 commit comments

Comments
 (0)