[project]
name = "yutto-uiya"
version = "1.1.3"
description = ""
readme = "README.md"
requires-python = ">=3.11"
dependencies = [
    "pydantic>=2.10.6",
    "tomli_w==1.2.0",
    "streamlit==1.43.2",
    # special
    #"yutto==2.0.3",
    "yutto",
    "httpx[http2,socks]>=0.28.1",
    "pexpect==4.9.0;sys_platform!='win32'",
    "wexpect-uv==0.0.4;sys_platform=='win32'",
    # "wexpect-uv;sys_platform=='win32'",
    "natsort>=8.4.0",
]
authors = [{ name = "MrXnneHang", email = "XnneHang@gmail.com" }]
keywords = []
license = { text = "MIT" }
classifiers = [
  "Operating System :: OS Independent",
  "License :: OSI Approved :: MIT License",
  "Typing :: Typed",
  "Programming Language :: Python",
  "Programming Language :: Python :: 3",
  "Programming Language :: Python :: 3.11",
  "Programming Language :: Python :: 3.12",
  "Programming Language :: Python :: 3.13",
  "Programming Language :: Python :: Implementation :: CPython",
]

[project.urls]
Homepage = "https://github.com/MrXnneHang/yutto-uiya"
Documentation = "https://github.com/MrXnneHang/yutto-uiya"
Repository = "https://github.com/MrXnneHang/yutto-uiya"
Issues = "https://github.com/MrXnneHang/yutto-uiya/issues"

[dependency-groups]
dev = [
  "pyright>=1.1.391",
  "ruff>=0.9.3",
  "pytest>=8.3.4",
  "pytest-rerunfailures>=15.0",
]

[project.scripts]
test = "uiya.test:main"
tmp = "uiya.tmp:main"

[tool.uv.sources]
yutto = { git = "https://github.com/MrXnneHang/yutto.git", rev = "parse" }
# yutto = { path = "./packages/yutto/dist/yutto-2.0.3-py3-none-any.whl"}
# wexpect-uv = {path="./packages/wexpect-uv/dist/wexpect_uv-0.0.4-py3-none-any.whl"}

[tool.pyright]
include = ["src/uiya"]
pythonVersion = "3.11"
typeCheckingMode = "strict"
reportMissingTypeStubs = false

[tool.ruff]
line-length = 120
target-version = "py311"

[tool.ruff.lint]
select = [
  # Pyflakes
  "F",
  # Pycodestyle
  "E",
  "W",
  # Isort
  "I",
  # Comprehensions
  "C4",
  # Debugger
  "T100",
  # Pyupgrade
  "UP",
  # Flake8-pyi
  "PYI",
  # Bugbear
  "B",
  # Pylint
  "PLE",
  # Flake8-simplify
  "SIM101",
  # Flake8-use-pathlib
  "PTH",
  # Pygrep-hooks
  "PGH004",
  # Flake8-type-checking
  "TC",
  # Flake8-raise
  "RSE",
  # Refurb
  "FURB",
  # Flake8-future-annotations
  "FA",
  # Yesqa
  "RUF100",
]
ignore = [
  "E501", # line too long, duplicate with ruff fmt
  "F401", # imported but unused, duplicate with pyright
  "F841", # local variable is assigned to but never used, duplicate with pyright
]

[tool.ruff.lint.isort]
required-imports = ["from __future__ import annotations"]
known-first-party = ["uiya"]
combine-as-imports = true

[tool.ruff.lint.flake8-type-checking]
runtime-evaluated-base-classes = ["pydantic.BaseModel"]

[tool.hatch.build.targets.wheel]
packages = ["src/uiya"]

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
