Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH: remove tomllkit dependency #93

Merged
merged 1 commit into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading