2026-06-25 23:22:45 +08:00
|
|
|
|
[project]
|
|
|
|
|
|
name = "plyngent"
|
2026-07-20 04:30:07 +08:00
|
|
|
|
version = "0.1.3"
|
2026-06-25 23:22:45 +08:00
|
|
|
|
description = "LLM chat and agent toolkit"
|
|
|
|
|
|
authors = [
|
|
|
|
|
|
{ name = "HivertMoZara", email = "worldmozara@163.com" },
|
|
|
|
|
|
]
|
|
|
|
|
|
dependencies = [
|
|
|
|
|
|
"msgspec>=0.21.1",
|
2026-07-06 18:26:59 +08:00
|
|
|
|
"niquests>=3.20",
|
|
|
|
|
|
"typing-extensions>=4.15.0",
|
|
|
|
|
|
"platformdirs>=4.10.0",
|
2026-07-14 17:19:26 +08:00
|
|
|
|
"tomlkit>=0.15.0",
|
|
|
|
|
|
"sqlalchemy>=2.0.51",
|
2026-07-14 18:29:46 +08:00
|
|
|
|
"aiosqlite>=0.22.1",
|
2026-07-15 13:03:55 +08:00
|
|
|
|
"click>=8.4.2",
|
2026-07-15 20:01:43 +08:00
|
|
|
|
"awaitlet>=0.0.1",
|
2026-07-15 22:21:18 +08:00
|
|
|
|
"pywinpty>=2.0.0; sys_platform == \"win32\"",
|
|
|
|
|
|
"rich>=13"
|
2026-06-25 23:22:45 +08:00
|
|
|
|
]
|
|
|
|
|
|
requires-python = ">=3.14,<4"
|
|
|
|
|
|
readme = "README.md"
|
|
|
|
|
|
license = { text = "MIT" }
|
|
|
|
|
|
|
2026-07-14 18:29:46 +08:00
|
|
|
|
[project.scripts]
|
|
|
|
|
|
plyngent = "plyngent.cli:main"
|
|
|
|
|
|
|
2026-06-25 23:22:45 +08:00
|
|
|
|
[dependency-groups]
|
|
|
|
|
|
dev = [
|
2026-07-20 04:35:26 +08:00
|
|
|
|
"basedpyright==1.39.9",
|
|
|
|
|
|
"ruff==0.15.22",
|
2026-07-06 18:26:59 +08:00
|
|
|
|
"pytest>=9.1.1",
|
2026-07-14 17:19:26 +08:00
|
|
|
|
"pytest-asyncio>=1.4.0",
|
2026-06-25 23:22:45 +08:00
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
[build-system]
|
|
|
|
|
|
requires = ["pdm-backend"]
|
|
|
|
|
|
build-backend = "pdm.backend"
|
|
|
|
|
|
|
|
|
|
|
|
[tool.basedpyright]
|
|
|
|
|
|
typeCheckingMode = "recommended"
|
2026-07-14 22:27:44 +08:00
|
|
|
|
strictGenericNarrowing = true
|
2026-07-15 20:01:43 +08:00
|
|
|
|
# winpty is Windows-only (pywinpty); stubs live under typings/ (pyright default stubPath).
|
|
|
|
|
|
reportMissingModuleSource = "hint"
|
2026-06-25 23:22:45 +08:00
|
|
|
|
reportAny = "hint"
|
|
|
|
|
|
reportExplicitAny = "hint"
|
|
|
|
|
|
reportImplicitStringConcatenation = "hint"
|
|
|
|
|
|
reportImportCycles = "hint"
|
|
|
|
|
|
|
2026-07-15 10:35:30 +08:00
|
|
|
|
[[tool.basedpyright.executionEnvironments]]
|
|
|
|
|
|
root = "tests"
|
|
|
|
|
|
extraPaths = ["src", "."]
|
|
|
|
|
|
reportPrivateUsage = "none"
|
|
|
|
|
|
reportUnreachable = "none"
|
|
|
|
|
|
reportUnusedCallResult = "none"
|
|
|
|
|
|
reportUnannotatedClassAttribute = "none"
|
|
|
|
|
|
reportUnknownArgumentType = "none"
|
|
|
|
|
|
reportUnknownLambdaType = "none"
|
|
|
|
|
|
reportUnknownMemberType = "none"
|
|
|
|
|
|
reportUnknownVariableType = "none"
|
|
|
|
|
|
reportUnknownParameterType = "none"
|
|
|
|
|
|
reportMissingParameterType = "none"
|
|
|
|
|
|
reportUnusedParameter = "none"
|
|
|
|
|
|
reportMissingImports = "none"
|
|
|
|
|
|
reportMissingTypeStubs = "none"
|
|
|
|
|
|
|
2026-07-15 20:01:43 +08:00
|
|
|
|
[[tool.basedpyright.executionEnvironments]]
|
|
|
|
|
|
root = "scripts"
|
|
|
|
|
|
reportUnusedCallResult = "none"
|
|
|
|
|
|
|
2026-07-14 17:25:22 +08:00
|
|
|
|
[tool.pytest.ini_options]
|
|
|
|
|
|
asyncio_mode = "auto"
|
|
|
|
|
|
asyncio_default_fixture_loop_scope = "function"
|
|
|
|
|
|
testpaths = ["tests"]
|
|
|
|
|
|
|
2026-06-25 23:22:45 +08:00
|
|
|
|
[tool.pdm]
|
|
|
|
|
|
distribution = true
|
|
|
|
|
|
|
|
|
|
|
|
[tool.ruff]
|
|
|
|
|
|
line-length = 120
|
|
|
|
|
|
target-version = "py314"
|
|
|
|
|
|
|
|
|
|
|
|
[tool.ruff.format]
|
|
|
|
|
|
line-ending = "lf"
|
|
|
|
|
|
|
|
|
|
|
|
[tool.ruff.lint]
|
|
|
|
|
|
# For more rules, see https://docs.astral.sh/ruff/rules/.
|
|
|
|
|
|
select = [
|
|
|
|
|
|
"F", # Pyflakes
|
|
|
|
|
|
"W", # pycodestyle warnings
|
|
|
|
|
|
"E", # pycodestyle errors
|
|
|
|
|
|
"I", # isort
|
|
|
|
|
|
"C90", # mccabe
|
|
|
|
|
|
"N", # pep8-naming
|
|
|
|
|
|
"PL", # pylint
|
|
|
|
|
|
"UP", # pyupgrade
|
|
|
|
|
|
"YTT", # flake8-2020
|
|
|
|
|
|
"ANN", # flake8-annotations
|
|
|
|
|
|
"ASYNC", # flake8-async
|
|
|
|
|
|
"BLE", # flake8-blind-except
|
|
|
|
|
|
"FBT", # flake8-boolean-trap
|
|
|
|
|
|
"B", # flake8-bugbear
|
|
|
|
|
|
"A", # flake8-builtins
|
|
|
|
|
|
"COM", # flake8-commas
|
|
|
|
|
|
"C4", # flake8-comprehensions
|
|
|
|
|
|
"DTZ", # flake8-datetimez
|
|
|
|
|
|
"T10", # flake8-debugger
|
|
|
|
|
|
"ICN", # flake8-import-conventions
|
|
|
|
|
|
"PIE", # flake8-pie
|
|
|
|
|
|
"T20", # flake8-print
|
|
|
|
|
|
"PYI", # flake8-pyi
|
|
|
|
|
|
"Q", # flake8-quotes
|
|
|
|
|
|
"RSE", # flake8-raise
|
|
|
|
|
|
"RET", # flake8-return
|
|
|
|
|
|
"SIM", # flake8-simplify
|
|
|
|
|
|
"SLOT", # flake8-slots
|
|
|
|
|
|
"TID", # flake8-tidy-imports
|
|
|
|
|
|
"TC", # flake8-type-checking
|
|
|
|
|
|
"ARG", # flake8-unused-arguments
|
|
|
|
|
|
"PTH", # flake8-use-pathlib
|
|
|
|
|
|
# "ERA", # eradicate
|
|
|
|
|
|
"FAST", # FastAPI
|
|
|
|
|
|
"PERF", # Perflint
|
|
|
|
|
|
"PGH", # pygrep-hooks
|
|
|
|
|
|
"FURB", # refurb
|
|
|
|
|
|
"TRY", # tryceratops
|
|
|
|
|
|
"RUF", # Ruff-specific rules
|
|
|
|
|
|
]
|
|
|
|
|
|
ignore = [
|
|
|
|
|
|
"UP037", # quoted-annotation
|
|
|
|
|
|
# "ANN201", # missing-return-type-undocumented-public-function
|
|
|
|
|
|
"ANN202", # missing-return-type-private-function
|
|
|
|
|
|
"ANN401", # any-type
|
|
|
|
|
|
"COM812", # missing-trailing-comma
|
|
|
|
|
|
"PLC0415", # import-outside-top-level
|
|
|
|
|
|
"TID252",
|
2026-07-14 22:22:14 +08:00
|
|
|
|
"PLR0913", # too-many-arguments (common on constructors/composed functions)
|
2026-06-25 23:22:45 +08:00
|
|
|
|
]
|
|
|
|
|
|
allowed-confusables = [
|
|
|
|
|
|
",",
|
|
|
|
|
|
"。",
|
|
|
|
|
|
"“",
|
|
|
|
|
|
"”",
|
|
|
|
|
|
":",
|
|
|
|
|
|
";",
|
|
|
|
|
|
"?",
|
|
|
|
|
|
"!",
|
|
|
|
|
|
"【",
|
|
|
|
|
|
"】",
|
|
|
|
|
|
"《",
|
|
|
|
|
|
"》",
|
|
|
|
|
|
"…",
|
|
|
|
|
|
"—",
|
|
|
|
|
|
"(",
|
|
|
|
|
|
")",
|
|
|
|
|
|
"、"
|
|
|
|
|
|
]
|
2026-07-15 10:35:30 +08:00
|
|
|
|
|
|
|
|
|
|
[tool.ruff.lint.per-file-ignores]
|
|
|
|
|
|
"tests/**" = [
|
|
|
|
|
|
"ANN", # type annotations often noisy in tests
|
|
|
|
|
|
"ARG", # unused fixtures/args are common
|
|
|
|
|
|
"ASYNC240", # pathlib in async tests is fine
|
|
|
|
|
|
"PLR2004", # magic values in asserts
|
|
|
|
|
|
"PLR0911", # many returns in fixtures/helpers
|
|
|
|
|
|
"PLR0912", # branching in scripted clients
|
|
|
|
|
|
"PLR0915", # long test functions
|
|
|
|
|
|
"C901", # complexity in scripted fakes
|
|
|
|
|
|
"S101", # assert is the point of tests
|
|
|
|
|
|
"TC", # TYPE_CHECKING import churn
|
|
|
|
|
|
"TRY003", # long exception messages in tests
|
|
|
|
|
|
"FBT", # boolean positional args in helpers
|
|
|
|
|
|
]
|
2026-07-15 20:01:43 +08:00
|
|
|
|
"scripts/**" = [
|
|
|
|
|
|
"T201", # CLI scripts print status
|
|
|
|
|
|
"PLR0911", # command dispatch returns
|
|
|
|
|
|
]
|