From 797bdfeaded4bc9d4208138d43a510655ea419f3 Mon Sep 17 00:00:00 2001 From: Taher Chegini Date: Sun, 7 May 2023 17:47:13 -0500 Subject: [PATCH] ENH: Use pathlib to open the file. [skip ci] --- noxfile.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/noxfile.py b/noxfile.py index f1b79d8..223fec6 100644 --- a/noxfile.py +++ b/noxfile.py @@ -14,20 +14,20 @@ def get_package_name() -> str: """Get the name of the package.""" - with open("pyproject.toml", "rb") as f: + with Path("pyproject.toml").open("rb") as f: return tomli.load(f)["project"]["name"] def get_extras() -> list[str]: """Get the name of the package.""" - with open("pyproject.toml", "rb") as f: + with Path("pyproject.toml").open("rb") as f: extras = tomli.load(f)["project"]["optional-dependencies"] return [e for e in extras if e not in ("test", "typeguard")] def get_deps() -> list[str]: """Get the name of the package.""" - with open("pyproject.toml", "rb") as f: + with Path("pyproject.toml").open("rb") as f: return tomli.load(f)["project"]["dependencies"]