Skip to content
This repository has been archived by the owner on Jan 10, 2025. It is now read-only.

Commit

Permalink
FIX: open pyproject.toml in string mode
Browse files Browse the repository at this point in the history
  • Loading branch information
redeboer committed Jul 11, 2023
1 parent 79e8748 commit 2e029f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/update_pip_constraints/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def __get_package_directory() -> str:
if cfg.has_option("options", "package_dir"):
return cfg.get("options", "package_dir").strip().strip("=")
if os.path.exists("pyproject.toml"):
with open("pyproject.toml", "rb") as f:
with open("pyproject.toml") as f:
pyproject = toml.load(f) # type: ignore[arg-type]
setuptools_config = pyproject.get("tool", {}).get("setuptools", {})
package_dir = setuptools_config.get("package-dir", {})
Expand Down

0 comments on commit 2e029f2

Please sign in to comment.