1. make metrics in commands_typed
    be agnostic of fastapi, django;
  2. implement ping wrapper for rest.py in checks;
  3. use env settings to specify hosts to ping;
  4. add pyright, ruff into Makefile;
  5. test in production;
		
	
			
		
			
				
	
	
		
			174 lines
		
	
	
		
			4.5 KiB
		
	
	
	
		
			TOML
		
	
	
	
	
	
			
		
		
	
	
			174 lines
		
	
	
		
			4.5 KiB
		
	
	
	
		
			TOML
		
	
	
	
	
	
[project]
 | 
						|
description = 'checks service'
 | 
						|
requires-python = '>= 3.10'
 | 
						|
maintainers = [
 | 
						|
  { name = 'Siarhei Siniak', email = 'siarheisiniak@gmail.com' },
 | 
						|
]
 | 
						|
classifiers = [
 | 
						|
  'Programming Language :: Python',
 | 
						|
]
 | 
						|
 | 
						|
name = 'online.fxreader.pr34.checks'
 | 
						|
 | 
						|
[tool.ruff]
 | 
						|
line-length = 160
 | 
						|
target-version = 'py310'
 | 
						|
include = [
 | 
						|
    '*.py',
 | 
						|
    '*/**/*.py',
 | 
						|
    '*/**/*.pyi',
 | 
						|
]
 | 
						|
exclude = [
 | 
						|
    '.venv',
 | 
						|
]
 | 
						|
 | 
						|
[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
 | 
						|
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 = [
 | 
						|
    '*/**/*.py',
 | 
						|
]
 | 
						|
extraPaths = [
 | 
						|
    '.',
 | 
						|
]
 | 
						|
 | 
						|
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"
 | 
						|
 |