ruff.tomlā¢1.86 kB
# Ruff configuration for SleekChat API
target-version = "py313"
line-length = 120
[lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
"Q", # flake8-quotes
"SIM", # flake8-simplify
"TID", # flake8-tidy-imports
"TCH", # flake8-type-checking
"PTH", # flake8-use-pathlib
"DTZ", # flake8-datetimez (timezone-aware datetime)
]
ignore = [
"E501", # line too long (handled by line-length)
"B008", # function call in default argument
"UP007", # Use `X | Y` for union types (we allow Optional for clarity)
"TC003", # Move import into TYPE_CHECKING block (can be overly strict)
]
# Allow autofix for all enabled rules (when `--fix`) is provided.
fixable = ["ALL"]
unfixable = []
# Exclude auto-generated files and other directories
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".hg",
".mypy_cache",
".nox",
".pants.d",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"venv",
"migrations",
]
[lint.per-file-ignores]
# Tests can have more flexible rules
"tests/**/*.py" = [
"B011", # assert False
"S101", # use of assert
"SIM117", # combine multiple with statements
]
# Ignore import order in __init__.py files
"**/__init__.py" = ["F401", "I001"]
[lint.isort]
known-first-party = ["apppublicapi", "libagentic", "libshared"]
combine-as-imports = true
force-wrap-aliases = true
[lint.flake8-quotes]
inline-quotes = "double"
multiline-quotes = "double"
[lint.flake8-tidy-imports]
ban-relative-imports = "all"
[format]
quote-style = "double"
indent-style = "space"
line-ending = "auto"