Skip to content

Commit

Permalink
Fix toml file open
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunner committed Nov 15, 2024
1 parent 20f2bdc commit 488bc5d
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 97 deletions.
4 changes: 2 additions & 2 deletions .prospector.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ ignore-paths:

mypy:
options:
python-version: '3.10'
python-version: '3.11'

ruff:
options:
target-version: py310
target-version: py311
4 changes: 2 additions & 2 deletions github_app_geo_project/module/versions/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
import re
import subprocess # nosec
import tempfile
import tomllib
from collections.abc import Iterable
from typing import Any

import c2cciutils.configuration
import github
import requests
import security_md
import toml
from pydantic import BaseModel

from github_app_geo_project import module, utils
Expand Down Expand Up @@ -436,7 +436,7 @@ def _get_names(
timeout=30,
).stdout.splitlines():
with open(filename, encoding="utf-8") as file:
data = toml.load(file)
data = tomllib.loads(file)
name = data.get("project", {}).get("name")
names = names_by_datasource.setdefault("pypi", _TransversalStatusNameByDatasource()).names
if name and name not in names:
Expand Down
2 changes: 1 addition & 1 deletion jsonschema-gentypes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ pre_commit:
arguments:
- --color=never

python_version: '3.10'
python_version: '3.11'

generate:
- source: github_app_geo_project/project-schema.json
Expand Down
90 changes: 2 additions & 88 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 2 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ classifiers = [
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Typing :: Typed',
Expand Down Expand Up @@ -46,7 +45,7 @@ pull-request-links = "github_app_geo_project.module.pull_request.links:Links"
delete-old-workflow-runs = "github_app_geo_project.module.delete_old_workflow_runs:DeleteOldWorkflowRuns"

[tool.poetry.dependencies]
python = ">=3.10,<3.13"
python = ">=3.11,<3.13"
c2cwsgiutils = { version = "6.1.3", extras = ["standard", "debug", "dev"] }
c2cciutils = "1.7.1"
security-md = "0.2.3"
Expand Down Expand Up @@ -82,10 +81,9 @@ types-pyyaml = "6.0.12.20240917"
types-setuptools = "75.3.0.20241112"
types-markdown = "3.7.0.20240822"
types-requests = "2.32.0.20241016"
types-toml = "0.10.8.20240310"

[tool.ruff]
target-version = "py310"
target-version = "py311"
line-length = 110

[tool.ruff.lint.pydocstyle]
Expand Down

0 comments on commit 488bc5d

Please sign in to comment.