Skip to content

Commit

Permalink
Typing
Browse files Browse the repository at this point in the history
  • Loading branch information
meanmail committed Jul 13, 2024
1 parent 16c6aff commit 5b1e52e
Show file tree
Hide file tree
Showing 37 changed files with 1,463 additions and 864 deletions.
278 changes: 278 additions & 0 deletions poetry.lock

Large diffs are not rendered by default.

204 changes: 204 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,204 @@
[tool.poetry]
name = "stepik-utils"
version = "1.4.0"
description = ""
authors = ["Hyperskill Team"]
readme = "README.md"

[tool.poetry.dependencies]
python = "^3.12"

[tool.poetry.group.dev.dependencies]
mypy = "^1.10.1"
pytest = "^8.2.2"
ruff = "^0.5.1"
stepic-common = {git = "https://github.com/StepicOrg/stepic-common.git"}


[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"


[tool.pytest.ini_options]
addopts = "--strict-markers --doctest-modules"
python_files = [
"tests.py",
"test_*.py"
]
norecursedirs = [
".git",
".idea",
"deploy",
"env",
"node_modules",
"out",
"sandbox",
"sandbox_tests",
"tests_data",
"stepic_plugins/quizzes/code/tests/code",
"src/stepic_utils/tests/examples",
]

[tool.ruff]

# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".hg",
".mypy_cache",
".nox",
".pants.d",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"arena",
"buck-out",
"build",
"dist",
"node_modules",
"venv",
"src/stepic_utils/tests/examples",
]
line-length = 110
target-version = "py312"

[tool.ruff.lint]
select = [
"ALL"
]

ignore = [
"A001",
"A003",
"ANN001",
"ANN002",
"ANN003",
"ANN101",
"ANN102",
"ANN201",
"ANN202",
"ANN204",
"ANN206",
"ANN401",
"ARG001",
"ARG002",
"B023",
"BLE001",
"COM812",
"CPY001",
"D100",
"D101",
"D102",
"D103",
"D104",
"D105",
"D106",
"D107",
"D205",
"DTZ001",
"DTZ004",
"DTZ006",
"DTZ012",
"E203",
"E741",
"EXE002",
"F403",
"FBT001",
"FBT002",
"FBT003",
"FIX002",
"INP001",
"ISC001",
"N802",
"N806",
"N818",
"PIE804",
"PLC1901",
"PLR2004",
"PLR6301",
"PLW0603",
"PLW2901",
"PT011",
"PT012",
"PTH100",
"PTH102",
"PTH110",
"PTH111",
"PTH112",
"PTH118",
"PTH120",
"PTH123",
"RUF012",
"S101",
"S105",
"S110",
"S311",
"S602",
"S603",
"S607",
"SIM108",
"SLF001",
"TD002",
"TD003",
"TRY003",
"TRY301",
]

[tool.ruff.lint.mccabe]
max-complexity = 25

[tool.ruff.lint.pydocstyle]
convention = "google"

[tool.ruff.lint.flake8-quotes]
inline-quotes = "double"

[tool.ruff.lint.pylint]
max-args = 8
max-branches = 15
max-returns = 9
max-statements = 32
max-public-methods = 45

[tool.ruff.lint.isort]
combine-as-imports = true
known-third-party = []
order-by-type = false
required-imports = ["from __future__ import annotations"]

[tool.mypy]
python_version = "3.12"
check_untyped_defs = true
disallow_any_generics = true
disallow_untyped_calls = true
disallow_untyped_decorators = true
explicit_package_bases = true
ignore_errors = false
ignore_missing_imports = true
implicit_reexport = true
strict_equality = true
strict_optional = true
warn_no_return = true
warn_redundant_casts = true
warn_unreachable = true
warn_unused_configs = true
warn_unused_ignores = true

exclude = [
".git",
".idea",
"deploy",
"env",
"node_modules",
"out",
"venv",
"src/stepic_utils/tests/examples",
]
1 change: 0 additions & 1 deletion requirements-dev.txt

This file was deleted.

11 changes: 0 additions & 11 deletions setup.py

This file was deleted.

54 changes: 0 additions & 54 deletions src/__init__.py

This file was deleted.

Loading

0 comments on commit 5b1e52e

Please sign in to comment.