Answer principles round 1: 1 🔴, 7 🟡 (0 misread); every effect is handed in as an argument, no test patches a global, and the traces principle scopes tools that run on their user's machine
CI / tests (pull_request) Successful in 3m43s
CI / tests (pull_request) Successful in 3m43s
This commit is contained in:
+3
-3
@@ -98,14 +98,14 @@ from plan_store.stores import file_plan
|
||||
from project_config.main import located
|
||||
|
||||
|
||||
def main(argv: list[str]) -> int:
|
||||
def main(argv: list[str], home: pathlib.Path) -> int:
|
||||
if argv[:1] in (["-h"], ["--help"]):
|
||||
print(__doc__.strip())
|
||||
return 0
|
||||
args = parse_args(argv)
|
||||
if isinstance(args, Failure):
|
||||
return fail(args)
|
||||
config = located(None, pathlib.Path.home())
|
||||
config = located(None, home)
|
||||
if isinstance(config, Failure):
|
||||
return fail(config)
|
||||
if config.plan_file is None and args == (True, None):
|
||||
@@ -144,4 +144,4 @@ def parse_args(argv: list[str]) -> tuple[bool, pathlib.Path | None] | Failure:
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(main(sys.argv[1:]))
|
||||
sys.exit(main(sys.argv[1:], pathlib.Path.home()))
|
||||
|
||||
Reference in New Issue
Block a user