drop python 3.6 support

python 3.6 reached end of life on 2021-12-23
This commit is contained in:
Anthony Sottile 2022-01-18 17:36:17 -05:00
parent d3bdf1403d
commit 04de6a2e57
111 changed files with 401 additions and 286 deletions

View file

@ -1,6 +1,7 @@
from __future__ import annotations
import os.path
from typing import NamedTuple
from typing import Tuple
class Prefix(NamedTuple):
@ -12,6 +13,6 @@ class Prefix(NamedTuple):
def exists(self, *parts: str) -> bool:
return os.path.exists(self.path(*parts))
def star(self, end: str) -> Tuple[str, ...]:
def star(self, end: str) -> tuple[str, ...]:
paths = os.listdir(self.prefix_dir)
return tuple(path for path in paths if path.endswith(end))