Skip to content

Commit

Permalink
style: update pre=commit
Browse files Browse the repository at this point in the history
  • Loading branch information
tlambert03 committed Aug 5, 2023
1 parent e6984fd commit 2899193
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ repos:


- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.0.281
rev: v0.0.282
hooks:
- id: ruff
args: ["--fix"]
Expand Down
2 changes: 1 addition & 1 deletion docs/scripts/_gen_screenshots.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def _write_markdown_result_image(src: str, ns: dict, dest: str) -> None:
if not top_widgets:
print("No top level widgets found for", dest)
if len(top_widgets) > 1:
name = re.search("([^\s\.]+).show\(\)", src, re.DOTALL)[1]
name = re.search(r"([^\s\.]+).show\(\)", src, re.DOTALL)[1]
try:
top_widgets = {ns[name].native}
except KeyError:
Expand Down
6 changes: 2 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,6 @@ matrix.backend.features = [
]


# https://pycqa.github.io/isort/docs/configuration/options.html
[tool.isort]
profile = "black"
src_paths = ["src/magicgui", "tests"]

# https://github.com/charliermarsh/ruff
[tool.ruff]
Expand All @@ -173,13 +169,15 @@ src = ["src", "tests"]
select = [
"E", # style errors
"F", # flakes
"W", # warnings
"D", # pydocstyle
"I", # isort
"UP", # pyupgrade
"C", # flake8-comprehensions
"B", # flake8-bugbear
"A001", # flake8-builtins
"TCH", # type checking
"TID", # tidy imports
"RUF", # ruff-specific rules
]
ignore = [
Expand Down

0 comments on commit 2899193

Please sign in to comment.