-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Use ruff for linting and formatting instead of black, flake8 an…
…d pylint. A large number of ruff tests are enabled and result in various code quality improvements. This also adds a new `create_temp_node` fixture. fixes: #15, #16
- Loading branch information
1 parent
f012610
commit 0e7ca27
Showing
24 changed files
with
429 additions
and
172 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
sphinx-rtd-theme==1.3.0 | ||
sphinx-copybutton==0.5.2 | ||
sphinx | ||
sphinx-copybutton | ||
sphinx-rtd-theme |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
"""Exceptions raised by pytest-houdini.""" | ||
|
||
# Future | ||
from __future__ import annotations | ||
|
||
# Standard Library | ||
from typing import TYPE_CHECKING | ||
|
||
if TYPE_CHECKING: | ||
import hou | ||
|
||
|
||
# Exceptions | ||
|
||
|
||
class MissingToolError(Exception): | ||
"""Exception raised when a matching tool cannot be found. | ||
Args: | ||
tool_name: The missing tool name. | ||
""" | ||
|
||
def __init__(self, tool_name: str) -> None: | ||
super().__init__(f"Could not find tool: {tool_name}") | ||
|
||
|
||
class NoModuleTestFileError(Exception): | ||
"""Exception raised when a module test file cannot be found. | ||
Args: | ||
test_file: The test file stem (no extension.) | ||
extensions: The extensions which were checked. | ||
""" | ||
|
||
def __init__(self, test_file: str, extensions: tuple[str, ...]) -> None: | ||
msg = f"Could not find a valid test hip: {test_file}{{{','.join(extensions)}}}" | ||
|
||
super().__init__(msg) | ||
|
||
|
||
class NoTestNodeError(Exception): | ||
"""Exception raised when no test node could be found. | ||
Args: | ||
searched_paths: The test node paths which were searched. | ||
""" | ||
|
||
def __init__(self, searched_paths: list[str]) -> None: | ||
super().__init__(f"Could not find any matching test nodes: {', '.join(searched_paths)}") | ||
|
||
|
||
class TestNodeDoesNotContainSOPsError(Exception): | ||
"""Exception raised when a test node does not contain SOP nodes. | ||
Args: | ||
node: The node which does not contain SOP nodes. | ||
""" | ||
|
||
def __init__(self, node: hou.OpNode) -> None: | ||
super().__init__(f"{node.path()} does not contain SOP nodes.") |
Oops, something went wrong.