mirror of
https://github.com/daylinmorgan/viv.git
synced 2024-12-22 10:40:44 -06:00
style: linting
This commit is contained in:
parent
f0e18acab8
commit
2da0d30867
1 changed files with 11 additions and 9 deletions
|
@ -50,7 +50,7 @@ from typing import (
|
||||||
from urllib.error import HTTPError
|
from urllib.error import HTTPError
|
||||||
from urllib.request import urlopen
|
from urllib.request import urlopen
|
||||||
|
|
||||||
__version__ = "23.5a4-21-gf5c91fe-dev"
|
__version__ = "23.5a4-23-gf0e18ac-dev"
|
||||||
|
|
||||||
|
|
||||||
class Config:
|
class Config:
|
||||||
|
@ -748,15 +748,15 @@ class ViVenv:
|
||||||
|
|
||||||
def show(self) -> None:
|
def show(self) -> None:
|
||||||
_id = (
|
_id = (
|
||||||
self.meta.id[:8]
|
self.meta.id[:8]
|
||||||
if self.meta.id == self.name
|
if self.meta.id == self.name
|
||||||
else (self.name[:5] + "..." if len(self.name) > 8 else self.name)
|
else (self.name[:5] + "..." if len(self.name) > 8 else self.name)
|
||||||
)
|
)
|
||||||
|
|
||||||
sys.stdout.write(
|
sys.stdout.write(
|
||||||
f"""{a.bold}{a.cyan}{_id}{a.end} """
|
f"""{a.bold}{a.cyan}{_id}{a.end} """
|
||||||
f"""{a.style(", ".join(self.meta.spec),'dim')}\n"""
|
f"""{a.style(", ".join(self.meta.spec),'dim')}\n"""
|
||||||
)
|
)
|
||||||
|
|
||||||
def _tree_leaves(self, items: List[str], indent: str = "") -> str:
|
def _tree_leaves(self, items: List[str], indent: str = "") -> str:
|
||||||
tree_chars = ["├"] * (len(items) - 1) + ["╰"]
|
tree_chars = ["├"] * (len(items) - 1) + ["╰"]
|
||||||
|
@ -1000,7 +1000,9 @@ class Viv:
|
||||||
for _, vivenv in self.vivenvs.items():
|
for _, vivenv in self.vivenvs.items():
|
||||||
vivenv.tree()
|
vivenv.tree()
|
||||||
elif args.json:
|
elif args.json:
|
||||||
sys.stdout.write(json.dumps({k:v.meta.__dict__ for k,v in self.vivenvs.items()}))
|
sys.stdout.write(
|
||||||
|
json.dumps({k: v.meta.__dict__ for k, v in self.vivenvs.items()})
|
||||||
|
)
|
||||||
else:
|
else:
|
||||||
for _, vivenv in self.vivenvs.items():
|
for _, vivenv in self.vivenvs.items():
|
||||||
vivenv.show()
|
vivenv.show()
|
||||||
|
|
Loading…
Reference in a new issue