environ
All checks were successful
/ job (push) Successful in 1m20s

This commit is contained in:
Marc Beninca 2024-06-10 14:22:07 +02:00
parent 77bc6a0a44
commit bdd58e90f2
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F
2 changed files with 4 additions and 3 deletions

View file

@ -11,7 +11,7 @@ from cd.projects import Projects
COMMANDS_PREFIX = "cd-"
projects = Projects(os.environ)
projects = Projects()
project = Project(projects)

View file

@ -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):