mirror of
https://github.com/joshuadavidthomas/django-language-server.git
synced 2025-07-07 20:55:02 +00:00
185 lines
4.4 KiB
TOML
185 lines
4.4 KiB
TOML
[build-system]
|
|
requires = ["maturin>=1.0,<2.0"]
|
|
build-backend = "maturin"
|
|
|
|
[dependency-groups]
|
|
dev = [
|
|
"bumpver>=2024.1130",
|
|
"cogapp>=3.4.1",
|
|
"django-stubs>=5.1.1",
|
|
"maturin>=1.7.8",
|
|
"ruff>=0.8.2",
|
|
]
|
|
docs = [
|
|
"mkdocs-material>=9.5.49",
|
|
]
|
|
|
|
[project]
|
|
name = "django-language-server"
|
|
version = "5.2.0a0"
|
|
description = "A language server for the Django web framework"
|
|
readme = "README.md"
|
|
authors = [
|
|
{ name = "Josh Thomas", email = "josh@joshthomas.dev" }
|
|
]
|
|
requires-python = ">=3.9"
|
|
classifiers = [
|
|
"Development Status :: 3 - Alpha",
|
|
"Framework :: Django",
|
|
# [[[cog
|
|
# import subprocess
|
|
# import cog
|
|
#
|
|
# from noxfile import DJ_VERSIONS
|
|
#
|
|
# for version in DJ_VERSIONS:
|
|
# if version == "main":
|
|
# continue
|
|
# cog.outl(f' "Framework :: Django :: {version}",')
|
|
# ]]] -->
|
|
"Framework :: Django :: 4.2",
|
|
"Framework :: Django :: 5.1",
|
|
"Framework :: Django :: 5.2",
|
|
# [[[end]]]
|
|
"Intended Audience :: Developers",
|
|
"License :: OSI Approved :: Apache Software License",
|
|
"Operating System :: OS Independent",
|
|
"Programming Language :: Python",
|
|
"Programming Language :: Python :: 3",
|
|
"Programming Language :: Python :: 3 :: Only",
|
|
# [[[cog
|
|
# import subprocess
|
|
# import cog
|
|
#
|
|
# from noxfile import PY_VERSIONS
|
|
#
|
|
# for version in PY_VERSIONS:
|
|
# cog.outl(f' "Programming Language :: Python :: {version}",')
|
|
# ]]] -->
|
|
"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",
|
|
# [[[end]]]
|
|
"Programming Language :: Python :: Implementation :: CPython",
|
|
"Programming Language :: Rust",
|
|
"Topic :: Software Development",
|
|
"Topic :: Text Editors :: Integrated Development Environments (IDE)"
|
|
]
|
|
|
|
[project.scripts]
|
|
djls = "djls:entrypoint"
|
|
|
|
[project.urls]
|
|
Documentation = "https://django-language-server.readthedocs.io/"
|
|
Issues = "https://github.com/joshuadavidthomas/django-language-server/issues"
|
|
Source = "https://github.com/joshuadavidthomas/django-language-server"
|
|
|
|
[tool.bumpver]
|
|
commit = true
|
|
commit_message = ":bookmark: bump version {old_version} -> {new_version}"
|
|
current_version = "5.2.0-alpha"
|
|
push = true
|
|
tag = false
|
|
version_pattern = "MAJOR.MINOR.PATCH[-TAG[.NUM]]"
|
|
|
|
[tool.bumpver.file_patterns]
|
|
"crates/djls/Cargo.toml" = [
|
|
'version = "{version}"',
|
|
]
|
|
"pyproject.toml" = [
|
|
'version = "{pep440_version}"',
|
|
'current_version = "{version}"',
|
|
]
|
|
|
|
[tool.djlint]
|
|
blank_line_after_tag = "endblock,extends,load"
|
|
blank_line_before_tag = "block"
|
|
format_css = true
|
|
format_js = true
|
|
ignore = "H031" # Don't require `meta` tag keywords
|
|
indent = 2
|
|
profile = "django"
|
|
|
|
[tool.djlint.css]
|
|
indent_size = 2
|
|
|
|
[tool.djlint.js]
|
|
indent_size = 2
|
|
|
|
[tool.maturin]
|
|
manifest-path = "crates/djls/Cargo.toml"
|
|
strip = true
|
|
include = [
|
|
{ path = "LICENSE", format = "sdist" },
|
|
{ path = "rust-toolchain.toml", format = ["sdist", "wheel"] },
|
|
]
|
|
|
|
[tool.ruff]
|
|
# Exclude a variety of commonly ignored directories.
|
|
exclude = [
|
|
".bzr",
|
|
".direnv",
|
|
".eggs",
|
|
".git",
|
|
".github",
|
|
".hg",
|
|
".mypy_cache",
|
|
".ruff_cache",
|
|
".svn",
|
|
".tox",
|
|
".venv",
|
|
"__pypackages__",
|
|
"_build",
|
|
"build",
|
|
"dist",
|
|
"migrations",
|
|
"node_modules",
|
|
"venv"
|
|
]
|
|
extend-include = ["*.pyi?"]
|
|
indent-width = 4
|
|
# Same as Black.
|
|
line-length = 88
|
|
# Assume Python 3.9
|
|
target-version = "py39"
|
|
|
|
[tool.ruff.format]
|
|
# Like Black, indent with spaces, rather than tabs.
|
|
indent-style = "space"
|
|
# Like Black, automatically detect the appropriate line ending.
|
|
line-ending = "auto"
|
|
# Like Black, use double quotes for strings.
|
|
quote-style = "double"
|
|
|
|
[tool.ruff.lint]
|
|
# Allow unused variables when underscore-prefixed.
|
|
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
|
|
# Allow autofix for all enabled rules (when `--fix`) is provided.
|
|
fixable = ["A", "B", "C", "D", "E", "F", "I"]
|
|
ignore = ["E501", "E741"] # temporary
|
|
select = [
|
|
"B", # flake8-bugbear
|
|
"E", # Pycodestyle
|
|
"F", # Pyflakes
|
|
"I", # isort
|
|
"UP" # pyupgrade
|
|
]
|
|
unfixable = []
|
|
|
|
[tool.ruff.lint.isort]
|
|
force-single-line = true
|
|
known-first-party = ["djls"]
|
|
required-imports = ["from __future__ import annotations"]
|
|
|
|
[tool.ruff.lint.per-file-ignores]
|
|
# Tests can use magic values, assertions, and relative imports
|
|
"tests/**/*" = ["PLR2004", "S101", "TID252"]
|
|
|
|
[tool.ruff.lint.pyupgrade]
|
|
# Preserve types, even if a file imports `from __future__ import annotations`.
|
|
keep-runtime-typing = true
|
|
|
|
[tool.uv]
|
|
required-version = ">=0.7"
|