diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 55f6447..067368e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -18,7 +18,7 @@ repos: hooks: - id: pydocstyle files: rl_exercises - additional_dependencies: ["toml"] # Needed to parse pyproject.toml + additional_dependencies: ["tomli"] # Needed to parse pyproject.toml - repo: https://github.com/pre-commit/mirrors-mypy rev: v1.4.1 diff --git a/pyproject.toml b/pyproject.toml index 1bfc8b4..d230607 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,32 +1,28 @@ # For TOML reference # https://learnxinyminutes.com/docs/toml/ -[tool.pytest.ini_options] -testpaths = ["tests"] # path to the test directory -minversion = "3.8" -addopts = "--cov=rl_exercises" # Should be package name - -[tool.coverage.run] -branch = true -context = "rl_exercises" # Should be package name -omit = [ - "rl_exercises/__init__.py", # Has variables only needed for setup.py -] - -[tool.coverage.report] -show_missing = true -skip_covered = true -exclude_lines = [ - "pragma: no cover", - '\.\.\.', - "raise NotImplementedError", - "if TYPE_CHECKING", -] # These are lines to exclude from coverage - [tool.black] target-version = ['py38'] line-length = 120 +[tool.isort] +py_version = "38" +profile = "black" # Play nicely with black +src_paths = ["rlsolutions", "tests"] +known_types = ["typing", "abc"] # We put these in their own section "types" +known_test = ["tests"] +known_first_party = ["rlsolutions"] +sections = [ + "FUTURE", + "TYPES", + "STDLIB", + "THIRDPARTY", + "FIRSTPARTY", + "TEST", + "LOCALFOLDER", +] # section ordering +multi_line_output = 3 # https://pycqa.github.io/isort/docs/configuration/multi_line_output_modes.html + [tool.pydocstyle] convention = "numpy" add-ignore = [ # http://www.pydocstyle.org/en/stable/error_codes.html