[project] name = "task1" version = "0.1.0" description = "Add your description here" readme = "README.md" authors = [ { name = "Peter Vacho", email = "p_vacho@utb.cz" }, ] requires-python = ">=3.12" dependencies = [] [dependency-groups] lint = [ "pre-commit>=3.3.3", "ruff>=0.9.2", "basedpyright>=1.13.3", ] [tool.basedpyright] pythonPlatform = "All" pythonVersion = "3.12" typeCheckingMode = "all" # Diagnostic behavior settings strictListInference = false strictDictionaryInference = false strictSetInference = false analyzeUnannotatedFunctions = true strictParameterNoneValue = true enableTypeIgnoreComments = true deprecateTypingAliases = true enableExperimentalFeatures = false # Diagnostic rules reportAny = false reportExplicitAny = false reportImplicitStringConcatenation = false reportUnreachable = "hint" reportUnusedParameter = "hint" reportUnannotatedClassAttribute = false reportUnknownArgumentType = false # consider enabling reportUnknownVariableType = false # consider enabling reportUnknownMemberType = false # consider enabling reportUnknownParameterType = false # consider enabling reportUnknownLambdaType = false # consider enabling reportMissingTypeStubs = "information" # consider bumping to warning/error reportUninitializedInstanceVariable = false # until https://github.com/DetachHead/basedpyright/issues/491 reportMissingParameterType = false # ruff's flake8-annotations (ANN) already covers this + gives us more control [tool.ruff] target-version = "py312" line-length = 119 [tool.ruff.lint] select = ["ALL"] ignore = [ "C90", # mccabe "FBT", # flake8-boolean-trap "CPY", # flake8-copyright "EM", # flake8-errmsg "SLF", # flake8-self "ARG", # flake8-unused-arguments "TD", # flake8-todos "FIX", # flake8-fixme "D100", # Missing docstring in public module "D104", # Missing docstring in public package "D105", # Missing docstring in magic method "D107", # Missing docstring in __init__ "D203", # Blank line required before class docstring "D213", # Multi-line summary should start at second line (incompatible with D212) "D301", # Use r""" if any backslashes in a docstring "D405", # Section name should be properly capitalized "D406", # Section name should end with a newline "D407", # Missing dashed underline after section "D408", # Section underline should be in the line following the section's name "D409", # Section underline should match the length of its name "D410", # Missing blank line after section "D411", # Missing blank line before section "D412", # No blank lines allowed between a section header and its content "D413", # Missing blank line after last section "D414", # Section has no content "D416", # Section name should end with a colon "D417", # Missing argument descrition in the docstring "ANN002", # Missing type annotation for *args "ANN003", # Missing type annotation for **kwargs "ANN204", # Missing return type annotation for special method "ANN401", # Dynamically typed expressions (typing.Any) disallowed "SIM102", # use a single if statement instead of nested if statements "SIM108", # Use ternary operator {contents} instead of if-else-block "TC001", # Move application imports used only for annotations into a type-checking block "TC002", # Move 3rd-party imports used only for annotations into a type-checking block "TC003", # Move standard library imports used only for annotations into a type-checking block "TD002", # Missing author in TODO "TD003", # Missing issue link on the line following this TODO "TRY003", # No f-strings in raise statements "EM101", # No string literals in exception init "EM102", # No f-strings in exception init "PLR2004", # Using unnamed numerical constants "PGH003", # Using specific rule codes in type ignores "E731", # Don't assign a lambda expression, use a def "T201", # Print statements ] [tool.ruff.lint.extend-per-file-ignores] "tests/*" = [ "ANN", # flake8-annotations "S101", # Use of assert ] [tool.ruff.lint.pylint] max-args = 20 max-branches = 20 max-returns = 20 max-statements = 250 [tool.ruff.format] line-ending = "lf"