fd1cd1bmodule-08(ex0): refactor and cleanup
1 file changed, +9, -9
author
mogi <git@mogiya.dev> on 21-05-2026 17:57 UTC+1
committer
mogi <git@mogiya.dev> on 21-05-2026 17:57 UTC+1
parent2b3e815
    @@ -10,11 +10,11 @@ def in_venv() -> bool:
1010 def show_py(in_venv: bool, venv_name: str) -> None:
1111     print(f"Current Python: {sys.executable}")
1212     print(
13  -        f"Virtual Environment: {venv_name if in_venv else "None detected\n"}"
  13+        "Virtual Environment:",
  14+        venv_name + "\nEnvironment Path: " + sys.prefix
  15+        if in_venv else "None detected"
1416     )
15  -    if in_venv:
16  -        print("Environment Path:", sys.prefix)
17  -        print()
  17+    print()
1818 
1919 
2020 def show_msg(in_venv: bool) -> None:
    @@ -40,8 +40,7 @@ def show_pkgs(in_venv: bool, venv_name: str) -> None:
4040             if venv_name in p:
4141                 sp = p
4242                 break
43  -        print("Package installation path:")
44  -        print(sp)
  43+        print("Package installation path:\n", sp)
4544 
4645 
4746 def main() -> None:
    @@ -49,10 +48,11 @@ def main() -> None:
4948     is_in_venv = in_venv()
5049 
5150     print(
52  -        f"MATRIX STATUS: "
53  -        f"{"Welcome to the construct"
54  -            if is_in_venv else "You're still plugged in"}\n"
  51+        "\nMATRIX STATUS:",
  52+        "Welcome to the construct" if is_in_venv
  53+        else "You're still plugged in"
5554     )
  55+    print()
5656     show_py(is_in_venv, venv_name)
5757     show_msg(is_in_venv)
5858     show_pkgs(is_in_venv, venv_name)