modernisation for python 3.11
This commit is contained in:
@@ -1,14 +1,13 @@
|
||||
# !/usr/bin/env python3
|
||||
import argparse
|
||||
from pathlib import Path
|
||||
from typing import Dict
|
||||
|
||||
from clan_cli.dirs import user_history_file
|
||||
|
||||
from ..async_cmd import CmdOut, runforcli
|
||||
|
||||
|
||||
async def add_flake(path: Path) -> Dict[str, CmdOut]:
|
||||
async def add_flake(path: Path) -> dict[str, CmdOut]:
|
||||
user_history_file().parent.mkdir(parents=True, exist_ok=True)
|
||||
# append line to history file
|
||||
# TODO: Make this atomic
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
# !/usr/bin/env python3
|
||||
import argparse
|
||||
from pathlib import Path
|
||||
from typing import Dict
|
||||
|
||||
from ..async_cmd import CmdOut, run, runforcli
|
||||
from ..errors import ClanError
|
||||
@@ -10,7 +9,7 @@ from ..nix import nix_command, nix_shell
|
||||
DEFAULT_URL: str = "git+https://git.clan.lol/clan/clan-core?new-clan"
|
||||
|
||||
|
||||
async def create_flake(directory: Path, url: str) -> Dict[str, CmdOut]:
|
||||
async def create_flake(directory: Path, url: str) -> dict[str, CmdOut]:
|
||||
if not directory.exists():
|
||||
directory.mkdir()
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user