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

Read toml using path not file content #465

Merged
merged 1 commit into from
Dec 22, 2023
Merged
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
4 changes: 1 addition & 3 deletions repo_health/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,8 @@
repo_dir: repository path
version: version to look for
"""
# Read the pyproject.toml file
pyproject_toml_file_path = os.path.join(repo_dir, "pyproject.toml")
try:
data = toml.load(get_file_content(pyproject_toml_file_path))
data = toml.load(os.path.join(repo_dir, "pyproject.toml"))

Check warning on line 107 in repo_health/utils.py

View check run for this annotation

Codecov / codecov/patch

repo_health/utils.py#L107

Added line #L107 was not covered by tests
classifiers = data.get('project', {}).get('classifiers', [])
if version_type == "python":
return any(f"Programming Language :: Python :: {version}" in classifier for classifier in classifiers)
Expand Down