Skip to content

Commit

Permalink
ENH: remove tomllkit dependency (#93)
Browse files Browse the repository at this point in the history
  • Loading branch information
redeboer authored Oct 14, 2024
1 parent 7a93b70 commit 66a4bd0
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 11 deletions.
1 change: 0 additions & 1 deletion .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
"noreply",
"pyright",
"taplo",
"tomlkit",
"tomllib"
],
"language": "en-US",
Expand Down
2 changes: 0 additions & 2 deletions get-pypi-name/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ runs:
curl -LsSf https://astral.sh/uv/install.sh | sh
source $HOME/.cargo/env
shell: bash
- run: uv pip install --color=always --system tomlkit
shell: bash
- id: determine-name
name: Determine Python package name
run: |
Expand Down
7 changes: 3 additions & 4 deletions get-pypi-name/main.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
"""Print job matrix for a GitHub Actions workflow that runs `pytest`."""

import os
import tomllib
from configparser import ConfigParser

import tomlkit


def main() -> int:
for getter in (
Expand All @@ -29,8 +28,8 @@ def _get_package_name_setup_cfg() -> str | None:
def _get_package_name_pyproject_toml() -> str | None:
if not os.path.exists("pyproject.toml"):
return None
with open("pyproject.toml") as f:
pyproject = tomlkit.load(f)
with open("pyproject.toml", "rb") as f:
pyproject = tomllib.load(f)
return pyproject.get("project", {}).get("name")


Expand Down
4 changes: 0 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,9 @@ dev = [
"compwa-actions[sty]",
]
sty = [
"compwa-actions[types]",
"pre-commit",
"ruff",
]
types = [
"tomlkit",
]

[project.readme]
content-type = "text/markdown"
Expand Down

0 comments on commit 66a4bd0

Please sign in to comment.