[tool.poetry]
name = "bili-sync"
version = "1.0.1"
description = ""
authors = ["amtoaer <amtoaer@gmail.com>"]
license = "GPL-3.0"
readme = "README.md"

[tool.poetry.dependencies]
python = "^3.11"
bilibili-api-python = { git = "https://github.com/amtoaer/bilibili-api.git", rev = "dev" }
dataclasses-json = "0.6.2"
tortoise-orm = "0.20.0"
loguru = "0.7.2"
uvloop = "0.19.0"
aiofiles = "23.2.1"
aerich = "0.7.2"

[tool.poetry.group.dev.dependencies]
black = "23.11.0"
ruff = "0.1.6"
ipython = "8.17.2"

[tool.black]
line-length = 80

[tool.ruff]
line-length = 80
select = [
  "F", # https://beta.ruff.rs/docs/rules/#pyflakes-f
  "E",
  "W", # https://beta.ruff.rs/docs/rules/#pycodestyle-e-w
  "I", # https://beta.ruff.rs/docs/rules/#isort-i
  # "N", # https://beta.ruff.rs/docs/rules/#pep8-naming-n
  "UP",  # https://beta.ruff.rs/docs/rules/#pyupgrade-up
  "S",   # https://beta.ruff.rs/docs/rules/#flake8-bandit-s
  "B",   # https://beta.ruff.rs/docs/rules/#flake8-bugbear-b
  "A",   # https://beta.ruff.rs/docs/rules/#flake8-builtins-a
  "C4",  # https://beta.ruff.rs/docs/rules/#flake8-comprehensions-c4
  "ICN", # https://beta.ruff.rs/docs/rules/#flake8-import-conventions-icn
  "G",   # https://beta.ruff.rs/docs/rules/#flake8-logging-format-g
  "PIE", # https://beta.ruff.rs/docs/rules/#flake8-pie-pie
  "T20", # https://beta.ruff.rs/docs/rules/#flake8-print-t20
  "RET", # https://beta.ruff.rs/docs/rules/#flake8-return-ret
  "SIM", # https://beta.ruff.rs/docs/rules/#flake8-simplify-sim
  "TID", # https://beta.ruff.rs/docs/rules/#flake8-tidy-imports-tid
  "PTH", # https://beta.ruff.rs/docs/rules/#flake8-use-pathlib-pth
  "PD",  # https://beta.ruff.rs/docs/rules/#pandas-vet-pd
  # "PL",  # https://beta.ruff.rs/docs/rules/#pylint-pl
  "NPY",    # https://beta.ruff.rs/docs/rules/#numpy-specific-rules-npy
  "RUF100", # https://beta.ruff.rs/docs/configuration/#automatic-noqa-management
]
ignore = [
  "A003", # Class attribute `id` is shadowing a Python builtin
]
exclude = ["migrations"]

[tool.aerich]
tortoise_orm = "constants.TORTOISE_ORM"
location = "./migrations"
src_folder = "./."

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
