1
Fork 0
mirror of https://github.com/allthingslinux/tux.git synced 2024-10-02 16:43:12 +00:00
tux/pyproject.toml

182 lines
4.1 KiB
TOML
Raw Normal View History

################################################################
# Poetry Configuration
################################################################
[tool.poetry]
authors = ["kaizen <admin@kaizen.wtf>"]
description = "All Things Linux Discord Bot"
name = "tux"
readme = "README.md"
version = "0.1.0"
[tool.poetry.dependencies]
python = "^3.11"
[tool.poetry.group.dev.dependencies]
pre-commit = "^3.6.0"
pyright = "^1.1.343"
ruff = "^0.1.9"
aiohttp = "3.9.1"
colorlog = ">=6.8.0"
discord-py = "^2.3.2"
python-dotenv = ">=1.0.0"
[build-system]
build-backend = "poetry.core.masonry.api"
requires = ["poetry-core"]
################################################################
# Ruff Configuration
# https://docs.astral.sh/ruff/configuration/
################################################################
[tool.ruff]
# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".ipynb_checkpoints",
".mypy_cache",
".nox",
".pants.d",
".pyenv",
".pytest_cache",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
".vscode",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"site-packages",
"venv",
]
# Same as Black.
indent-width = 4
line-length = 88
# Assume Python 3.11
target-version = "py311"
################################################################
# Ruff Linting Configuration
################################################################
[tool.ruff.lint]
# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default.
# Unlike Flake8, Ruff doesn't enable pycodestyle warnings (`W`) or
# McCabe complexity (`C901`) by default.
ignore = []
select = ["E4", "E7", "E9", "F"]
# Allow fix for all enabled rules (when `--fix`) is provided.
fixable = ["ALL"]
unfixable = []
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
################################################################
# Ruff Formatting Configuration
################################################################
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
docstring-code-format = false
docstring-code-line-length = "dynamic"
2023-12-29 14:55:09 +00:00
# Configure how to handle imports sorting and grouping.
[tool.ruff.format.imports]
# Sort imports in sections: "standard", "thirdparty", and "local".
# Default is ["standard", "thirdparty", "local"].
sections = ["standard", "thirdparty", "local"]
# Force separate sections for "from" imports and "import" imports.
force-separate-from-imports = false
# Separate "from" imports within each section.
force-separate-from-imports-in-sections = false
# Group "import" and "from" imports together.
group-imports = true
# Enable or disable sorting imports alphabetically within each section.
sort-within-sections = true
# Enable or disable removing unused imports.
remove-unused-imports = true
# Set the style for multiline imports: "backslash", "parenthesis", "auto".
multiline-style = "auto"
# Specify which module to use for sorting imports.
# Default is "future" (Python 2/3 compatibility).
module-order-style = "future"
################################################################
# Pyright Configuration
# https://microsoft.github.io/pyright/#/configuration
################################################################
[tool.pyright]
defineConstant = {DEBUG = true}
exclude = [
".direnv",
".eggs",
".git",
".hg",
".ipynb_checkpoints",
".mypy_cache",
".nox",
".pants.d",
".pyenv",
".pytest_cache",
".pytype",
".svn",
".tox",
".venv",
".vscode",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"site-packages",
"venv",
]
include = ["."]
typeCheckingMode = "strict"
reportMissingImports = true
reportMissingParameterType = false
reportMissingTypeStubs = false
reportUnknownArgumentType = false
reportUnknownMemberType = false
reportUnknownParameterType = false
pythonPlatform = "all"
pythonVersion = "3.11"
# Unsure?
#
# venv = ".venv"
# venvPath = "."