blob: 9dc201f57cefbbc306b606f946ae1a2f007a2291 [file] [log] [blame] [edit]
[build-system]
build-backend = "setuptools.build_meta"
requires = [ "setuptools>=61" ]
[project]
name = "json5"
description = "A Python implementation of the JSON5 data format."
readme = "README.md"
keywords = [ "json5" ]
license = { file = "LICENSE" }
authors = [
{ name = "Dirk Pranke", email = "dpranke@chromium.org" },
]
requires-python = ">=3.8.0"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
]
dynamic = [ "version" ]
urls.Changelog = "https://github.com/dpranke/pyjson5/blob/master/README.md"
urls.Issues = "https://github.com/dpranke/pyjson5/issues"
urls.Repository = "https://github.com/dpranke/pyjson5"
scripts.pyjson5 = "json5.tool:main"
[dependency-groups]
# Note that not everything is guaranteed to work on 3.8.
dev = [
"build>=1.2.2.post1; python_version<'3.9'",
"build>=1.3; python_version>='3.9'",
"coverage==7.5.4; python_version<'3.9'",
"coverage==7.8; python_version>='3.9' and python_version<'3.10'",
"coverage>=7.12; python_version>='3.10'",
"mypy==1.14.1; python_version<'3.9'",
"mypy>=1.19; python_version>='3.9'",
"pip>=25.3; python_version>='3.9'",
"pylint==3.2.7; python_version<'3.9'",
"pylint==3.3.6; python_version>='3.9' and python_version<'3.10'",
"pylint>=4.0.4; python_version>='3.10'",
"ruff>=0.14.7",
"twine==6.1; python_version<'3.10'",
"twine>=6.2; python_version>='3.10'",
]
[tool.setuptools]
packages = [ "json5" ]
[tool.setuptools.dynamic]
version = { attr = "json5.__version__" }
[tool.uv]
# 0.9.0 is the first version supporting Python 3.14
required-version = ">=0.9.0"
# By default, do not install/resolve to packages published within
# the past 30 days; this gives us some protection against automatically
# upgrading to a package that might have been newly compromised.
exclude-newer = "30 days"
[tool.ruff]
line-length = 79
include = [ "*/*.py", "run" ]
format.quote-style = "single"
[tool.pylint.basic]
# By default, pylint wants method names to be at most 31 chars long,
# but we want to allow up to 49 to allow for longer test names.
method-rgx = "[a-zA-Z_][a-zA-Z0-9_]{0,48}$"
# By default, pylint only allows UPPER_CASE constants, but we want to
# allow snake_case as well in some situations.
const-rgx = "[a-zA-Z_][a-zA-Z0-9_]{0,30}$"
# By default, pylint wants all parameter names to be at least two chars long,
# but we want to allow single-char parameter names as well.
argument-rgx = "[a-z_][a-z0-9_]{0,30}$"
# By default, pylint wants all variable names to be at least two chars long,
# but we want to allow single-char variable names as well.
variable-rgx = "[a-z_][a-z0-9_]{0,30}$"
[tool.pylint.main]
persistent = "yes"
[tool.pylint."message control"]
disable = [
"broad-except",
"fixme",
"global-statement",
"locally-disabled",
"missing-docstring",
"too-many-arguments",
"too-few-public-methods",
"too-many-branches",
"too-many-instance-attributes",
"too-many-lines",
"too-many-locals",
"too-many-positional-arguments",
"too-many-public-methods",
"too-many-return-statements",
"too-many-statements",
"unidiomatic-typecheck",
]
[tool.pylint.reports]
reports = "no"
score = "no"