freelance-project-34-market.../python/pyproject.toml
LLM 2c013d6be4 [+] fix pr34 build: exclude archlinux from ruff/pyrefly, import overload from typing
1. exclude archlinux namespace from pr34 ruff and pyrefly configs;
  2. import overload from typing (available since py3.5) instead of typing_extensions;
  3. add --no-annotate --no-header to uv pip compile;
  4. read version from pyproject.toml in archlinux meson.build;
  5. exclude archlinux from pr34 meson.build find;
2026-04-06 07:43:37 +00:00

265 lines
6.6 KiB
TOML

[project]
description = 'set of tools for software development'
requires-python = '>= 3.10'
maintainers = [
{ name = 'Siarhei Siniak', email = 'siarheisiniak@gmail.com' },
]
classifiers = [
'Programming Language :: Python',
]
name = "online.fxreader.pr34"
# version = '0.1.5.16+27.7'
dynamic = [
'version',
]
dependencies = [
#"-r requirements.txt",
'mypy',
'marisa-trie',
'pydantic',
'pydantic-settings',
'tomlkit',
'pip==23.3.2',
]
[project.optional-dependencies]
crypto = [
'cryptography',
]
early = [
'numpy',
'cryptography',
'yq',
'toml-cli',
'ninja',
'patchelf',
# 'tomlkit',
]
archlinux = [
'solv==0.7.35',
]
lint = [
'tomli',
# 'tomllib',
'mypy',
'pyright',
'pyrefly',
'ruff',
# 'tomlkit',
]
[project.scripts]
online-fxreader-pr34-commands = 'online.fxreader.pr34.commands:commands_cli'
[tool.online-fxreader-pr34]
early_features = ["default", "early", "lint"]
modules = [
{ name = 'online.fxreader.pr34', tool = { 'online-fxreader-pr34' = { early_features = ['default', 'early', 'lint'] } } },
]
[build-system]
requires = ["meson-python", "pybind11"]
build-backend = "mesonpy"
[tool.ruff]
line-length = 160
target-version = 'py310'
# builtins = ['_', 'I', 'P']
include = [
# 'follow_the_leader/**/*.py',
#'*.py',
# '*.recipe',
'*.py',
'online/**/*.py',
'online/**/*.pyi',
]
exclude = [
'.venv',
'online/fxreader/pr34/commands_typed/archlinux',
]
[tool.ruff.format]
quote-style = 'single'
indent-style = 'tab'
skip-magic-trailing-comma = false
[tool.ruff.lint]
ignore = [
'E402', 'E722', 'E741', 'W191', 'E101', 'E501', 'I001', 'F401', 'E714',
'E713',
# remove lambdas later on
'E731',
# fix this too
'E712',
'E703',
# remove unused variables, or fix a bug
'F841',
# fix * imports
'F403',
# don't care about trailing new lines
'W292',
]
select = ['E', 'F', 'I', 'W', 'INT']
[tool.ruff.lint.isort]
detect-same-package = true
# extra-standard-library = ["aes", "elementmaker", "encodings"]
# known-first-party = ["calibre_extensions", "calibre_plugins", "polyglot"]
# known-third-party = ["odf", "qt", "templite", "tinycss", "css_selectors"]
relative-imports-order = "closest-to-furthest"
split-on-trailing-comma = true
section-order = [
# '__python__',
"future",
"standard-library", "third-party", "first-party", "local-folder"
]
force-wrap-aliases = true
# [tool.ruff.lint.isort.sections]
# '__python__' = ['__python__']
[tool.pylsp-mypy]
enabled = false
[tool.pyright]
include = [
#'../../../../../follow_the_leader/views2/payments.py',
#'../../../../../follow_the_leader/logic/payments.py',
#'../../../../../follow_the_leader/logic/paypal.py',
'online/fxreader/pr34/commands_typed/**/*.py',
]
# stubPath = '../mypy-stubs'
extraPaths = [
'.',
'../mypy-stubs',
'../mypy-stubs/types-debugpy',
'../mypy-stubs/types-solv',
'../mypy-stubs/marisa-trie-types',
# '../../../../../',
]
#strict = ["src"]
analyzeUnannotatedFunctions = true
disableBytesTypePromotions = true
strictParameterNoneValue = true
enableTypeIgnoreComments = true
enableReachabilityAnalysis = true
strictListInference = true
strictDictionaryInference = true
strictSetInference = true
deprecateTypingAliases = false
enableExperimentalFeatures = false
reportMissingTypeStubs ="error"
reportMissingModuleSource = "warning"
reportInvalidTypeForm = "error"
reportMissingImports = "error"
reportUndefinedVariable = "error"
reportAssertAlwaysTrue = "error"
reportInvalidStringEscapeSequence = "error"
reportInvalidTypeVarUse = "error"
reportSelfClsParameterName = "error"
reportUnsupportedDunderAll = "error"
reportUnusedExpression = "error"
reportWildcardImportFromLibrary = "error"
reportAbstractUsage = "error"
reportArgumentType = "error"
reportAssertTypeFailure = "error"
reportAssignmentType = "error"
reportAttributeAccessIssue = "error"
reportCallIssue = "error"
reportGeneralTypeIssues = "error"
reportInconsistentOverload = "error"
reportIndexIssue = "error"
reportInvalidTypeArguments = "error"
reportNoOverloadImplementation = "error"
reportOperatorIssue = "error"
reportOptionalSubscript = "error"
reportOptionalMemberAccess = "error"
reportOptionalCall = "error"
reportOptionalIterable = "error"
reportOptionalContextManager = "error"
reportOptionalOperand = "error"
reportRedeclaration = "error"
reportReturnType = "error"
reportTypedDictNotRequiredAccess = "error"
reportPrivateImportUsage = "error"
reportUnboundVariable = "error"
reportUnhashable = "error"
reportUnusedCoroutine = "error"
reportUnusedExcept = "error"
reportFunctionMemberAccess = "error"
reportIncompatibleMethodOverride = "error"
reportIncompatibleVariableOverride = "error"
reportOverlappingOverload = "error"
reportPossiblyUnboundVariable = "error"
reportConstantRedefinition = "error"
#reportDeprecated = "error"
reportDeprecated = "warning"
reportDuplicateImport = "error"
reportIncompleteStub = "error"
reportInconsistentConstructor = "error"
reportInvalidStubStatement = "error"
reportMatchNotExhaustive = "error"
reportMissingParameterType = "error"
reportMissingTypeArgument = "error"
reportPrivateUsage = "error"
reportTypeCommentUsage = "error"
reportUnknownArgumentType = "error"
reportUnknownLambdaType = "error"
reportUnknownMemberType = "error"
reportUnknownParameterType = "error"
reportUnknownVariableType = "error"
#reportUnknownVariableType = "warning"
reportUnnecessaryCast = "error"
reportUnnecessaryComparison = "error"
reportUnnecessaryContains = "error"
#reportUnnecessaryIsInstance = "error"
reportUnnecessaryIsInstance = "warning"
reportUnusedClass = "error"
#reportUnusedImport = "error"
reportUnusedImport = "none"
# reportUnusedFunction = "error"
reportUnusedFunction = "warning"
#reportUnusedVariable = "error"
reportUnusedVariable = "warning"
reportUntypedBaseClass = "error"
reportUntypedClassDecorator = "error"
reportUntypedFunctionDecorator = "error"
reportUntypedNamedTuple = "error"
reportCallInDefaultInitializer = "none"
reportImplicitOverride = "none"
reportImplicitStringConcatenation = "none"
reportImportCycles = "none"
reportMissingSuperCall = "none"
reportPropertyTypeMismatch = "none"
reportShadowedImports = "none"
reportUninitializedInstanceVariable = "none"
reportUnnecessaryTypeIgnoreComment = "none"
reportUnusedCallResult = "none"
[tool.pyrefly]
project-includes = [
'online/fxreader/pr34/commands_typed/**/*.py',
]
project-excludes = [
'.venv',
'online/fxreader/pr34/commands_typed/archlinux',
]
search-path = [
'.',
'../mypy-stubs/types-debugpy',
'../mypy-stubs/types-solv',
'../mypy-stubs/marisa-trie-types',
]
python-version = '3.13'