Skip to content

Commit

Permalink
ci: Update ruff configuration in pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
b-butler committed Feb 12, 2024
1 parent a86a7e1 commit e8c0d7a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dupin/preprocessing/filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def calc_mean_shift_with_warn(diff, std):
if zeros_found:
mask = std == 0
diff_zeros = diff == 0
shift[mask & np.logical_not(diff_zeros)] = np.infty
shift[mask & np.logical_not(diff_zeros)] = np.inf
shift[mask & diff_zeros] = 0
warnings.warn(
"MeanShift: Zero standard deviation found.",
Expand Down
8 changes: 5 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ packages = { find = { namespaces = false, exclude = ["tests*", "notebooks*"] } }
[tool.ruff]
include = ["*.py", "*.ipynb"]
line-length = 80

[tool.ruff.lint]
ignore = ["N803", "N806", "A003", "PLR0913", "E741"]
select = [
"A", # flake8-builtins
"B", # flake8-bugbear
Expand All @@ -59,14 +62,13 @@ select = [
"D", # pydocstyle
"I", # isort
]
ignore = ["N803", "N806", "A003", "PLR0913", "E741"]

[tool.ruff.extend-per-file-ignores]
[tool.ruff.lint.extend-per-file-ignores]
"tests/*" = ["D100", "D101", "D102", "D103", "B008"]
"docs/*" = ["D100", "D101", "D102", "D103", "E501"]
"conftest.py" = ["D401"]

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

[tool.coverage.run]
Expand Down

0 comments on commit e8c0d7a

Please sign in to comment.