From bdd58e90f20d3dbf8c1267432719890bbf11f0fd Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 10 Jun 2024 14:22:07 +0200 Subject: [PATCH] environ --- cd/__init__.py | 2 +- cd/projects.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/cd/__init__.py b/cd/__init__.py index 75b010d..fb08438 100644 --- a/cd/__init__.py +++ b/cd/__init__.py @@ -11,7 +11,7 @@ from cd.projects import Projects COMMANDS_PREFIX = "cd-" -projects = Projects(os.environ) +projects = Projects() project = Project(projects) diff --git a/cd/projects.py b/cd/projects.py index f536499..fa031f6 100644 --- a/cd/projects.py +++ b/cd/projects.py @@ -1,6 +1,7 @@ """CI projects.""" from __future__ import annotations +import os from pathlib import Path GROUP_AND_NAME = [ @@ -14,8 +15,8 @@ SERVER_URL = [ class Projects: - def __init__(self: Projects, environment) -> None: - self.environment = environment + def __init__(self: Projects) -> None: + self.environment = os.environ # group, name for variable in GROUP_AND_NAME: if value := self.environment.get(variable, None):