prj/Path
This commit is contained in:
parent
de80d7ecff
commit
cfa9ca9e3c
1 changed files with 5 additions and 4 deletions
|
@ -1,6 +1,7 @@
|
|||
"""Handle projects."""
|
||||
|
||||
from os import path
|
||||
from os.path import realpath
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
class Project:
|
||||
|
@ -8,6 +9,6 @@ class Project:
|
|||
|
||||
def __init__(self, file_path: str) -> None:
|
||||
"""Set file, root & name."""
|
||||
self.file: str = path.realpath(file_path)
|
||||
self.root: str = path.dirname(self.file)
|
||||
self.name: str = path.basename(self.root)
|
||||
self.file: str = realpath(file_path)
|
||||
self.root: str = Path(self.file).parent
|
||||
self.name: str = self.root.name
|
||||
|
|
Loading…
Reference in a new issue