Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ default_language_version:

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
rev: v6.0.0
hooks:
- id: check-added-large-files
args: [ '--maxkb=500' ]
Expand Down Expand Up @@ -43,7 +43,7 @@ repos:
exclude: ^\.bumpversion\.cfg$

- repo: https://github.com/python-jsonschema/check-jsonschema.git
rev: 0.31.3
rev: 0.33.3
hooks:
- id: check-github-actions
- id: check-github-workflows
Expand Down Expand Up @@ -72,7 +72,7 @@ repos:
exclude: ^docs/_static/.*\.(js|html)$|^src/ridgeplot/.*\.c$

- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.10.0.1
rev: v0.11.0.1
hooks:
- id: shellcheck

Expand Down Expand Up @@ -102,7 +102,7 @@ repos:
additional_dependencies: [setuptools-scm]

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.11.2
rev: v0.12.10
hooks:
- id: ruff-format
- id: ruff
Expand Down
3 changes: 1 addition & 2 deletions cicd_utils/cicd/test_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from importlib.util import module_from_spec, spec_from_file_location
from pathlib import Path
from typing import TYPE_CHECKING, Any, TypeVar, cast
from unittest.mock import MagicMock, patch

if TYPE_CHECKING:
from collections.abc import Iterator
Expand All @@ -22,8 +23,6 @@ def patch_plotly_show() -> Iterator[None]:
and, instead, simply call
:func:`plotly.io._utils.validate_coerce_fig_to_dict()`.
"""
from unittest.mock import MagicMock, patch

from plotly.io._utils import validate_coerce_fig_to_dict

def patched(
Expand Down
49 changes: 26 additions & 23 deletions ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,29 @@ ignore = [
"FBT", # flake8-boolean-trap
"FIX", # flake8-fixme

# flake8-comprehensions
# flake8-commas (COM)
"COM812", # Trailing comma missing

# flake8-comprehensions (C4)
"C408", # Unnecessary `dict` call (rewrite as a literal)

# pydocstyle
# flake8-errmsg (EM)
"EM101", # Exception must not use a string literal, assign to variable first
"EM102", # Exception must not use an f-string literal, assign to variable first
"EM103", # Exception must not use a .format() string directly, assign to variable first

# flake8-return (RET)
"RET504", # Unnecessary variable assignment before `return` statement

# flake8-todos (TD)
"TD001", # Invalid TODO tag: `FIXME`
"TD002", # Missing author in [...]
"TD003", # Missing issue link on the line following this TODO

# flake8-annotations (ANN)
"ANN401", # Dynamically typed expressions (typing.Any) are disallowed in {name}

# pydocstyle (D)
"D101", # Missing docstring in public class
"D102", # Missing docstring in public method
"D103", # Missing docstring in public function
Expand All @@ -36,43 +55,27 @@ ignore = [
"D400", # First line should end with a period
"D415", # First line should end with a period, question mark, or exclamation point

# flake8-return
"RET504", # Unnecessary variable assignment before `return` statement

# eradicate (ERA)
"ERA001", # Found commented-out code

# pandas-vet
# pandas-vet (PD)
"PD015", # Use `.merge` method instead of `pd.merge` function. They have equivalent functionality.
"PD901", # `df` is a bad variable name. Be kinder to your future self.

# pylint
# Convention (PLC)
"PLC0415", # `import` should be at the top-level of a file

# Refactor (PLR)
"PLR0913", # Too many arguments to function call ({x} > 5)
"PLR2004", # Magic value used in comparison, consider replacing {x} with a constant variable

# tryceratops
"TRY003", # Avoid specifying long messages outside the exception class

# flake8-commas (COM)
"COM812", # Trailing comma missing

# flake8-errmsg (EM)
"EM101", # Exception must not use a string literal, assign to variable first
"EM102", # Exception must not use an f-string literal, assign to variable first
"EM103", # Exception must not use a .format() string directly, assign to variable first

# pep8-naming
# (allow for sklearn's naming convention for uppercase `X`)
"N803", # Argument name should be lowercase
"N806", # Variable in function should be lowercase

# flake8-todos (TD)
"TD001", # Invalid TODO tag: `FIXME`
"TD002", # Missing author in [...]
"TD003", # Missing issue link on the line following this TODO

# flake8-annotations (ANN)
"ANN401", # Dynamically typed expressions (typing.Any) are disallowed in {name}
]

[lint.per-file-ignores]
Expand Down