Skip to content

Commit

Permalink
Fix pre-commit setup
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamc committed Oct 19, 2023
1 parent 0e78001 commit 1c81bdf
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
40 changes: 18 additions & 22 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 1c81bdf

Please sign in to comment.