Skip to content

Commit

Permalink
chore: make lint happy
Browse files Browse the repository at this point in the history
  • Loading branch information
klorenz committed Mar 7, 2021
1 parent 732e49c commit b5f43c8
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions gitlab/config.py
Expand Up @@ -36,9 +36,7 @@ def _env_config() -> List[str]:

HELPER_PREFIX = "helper:"

HELPER_ATTRIBUTES = [
"job_token", "http_password", "private_token", "oauth_token"
]
HELPER_ATTRIBUTES = ["job_token", "http_password", "private_token", "oauth_token"]

class ConfigError(Exception):
pass
Expand Down Expand Up @@ -202,11 +200,11 @@ def __init__(
pass

def _get_values_from_helper(self):
"""Update attributes, which may get values from an external helper program
"""
"""Update attributes, which may get values from an external helper program"""
for attr in HELPER_ATTRIBUTES:
value = getattr(self, attr)
if isinstance(value, str) and value.lower().strip().startswith(HELPER_PREFIX):
_value_lower = value.lower().strip()
if isinstance(value, str) and _value_lower.startswith(HELPER_PREFIX):
helper = value[len(HELPER_PREFIX) :].strip()
value = subprocess.check_output([helper]).decode("utf-8").strip()
setattr(self, attr, value)

0 comments on commit b5f43c8

Please sign in to comment.