Compare commits
No commits in common. "b3f4cffbca88c4430c5a780577a6b936f5c3c9e2" and "f0aa902904880dc72e52fe1d633b82940e6de1b5" have entirely different histories.
b3f4cffbca
...
f0aa902904
2 changed files with 33 additions and 0 deletions
|
@ -44,3 +44,16 @@ class Project:
|
||||||
self.root = Path(value)
|
self.root = Path(value)
|
||||||
# url
|
# url
|
||||||
self.url = add_url_path(projects.url, self.name)
|
self.url = add_url_path(projects.url, self.name)
|
||||||
|
|
||||||
|
def __repr__(self) -> str:
|
||||||
|
"""Represent project."""
|
||||||
|
return f"Project(projects={self.projects!r})"
|
||||||
|
|
||||||
|
def __str__(self) -> str:
|
||||||
|
"""List branch, name, root & url."""
|
||||||
|
return f"""\
|
||||||
|
branch = {self.branch}
|
||||||
|
name = {self.name}
|
||||||
|
root = {self.root}
|
||||||
|
url = {self.url}
|
||||||
|
"""
|
||||||
|
|
|
@ -33,3 +33,23 @@ class Projects:
|
||||||
for variable in SERVER_URL:
|
for variable in SERVER_URL:
|
||||||
if value := self.environment.get(variable, None):
|
if value := self.environment.get(variable, None):
|
||||||
self.url = add_url_path(value, self.group)
|
self.url = add_url_path(value, self.group)
|
||||||
|
|
||||||
|
def __repr__(self) -> str:
|
||||||
|
"""Represent projects.
|
||||||
|
|
||||||
|
:return: representation
|
||||||
|
:rtype: str
|
||||||
|
"""
|
||||||
|
return "Projects()"
|
||||||
|
|
||||||
|
def __str__(self) -> str:
|
||||||
|
"""List group, name & url.
|
||||||
|
|
||||||
|
:return: string
|
||||||
|
:rtype: str
|
||||||
|
"""
|
||||||
|
return f"""\
|
||||||
|
group = {self.group}
|
||||||
|
name = {self.name}
|
||||||
|
url = {self.url}
|
||||||
|
"""
|
||||||
|
|
Loading…
Reference in a new issue