Skip to content

Commit 4a5e872

Browse files
authored
Merge pull request #109 from 56kyle/refactor-expansion-methods
Refactor expansion methods
2 parents 88ceee1 + 53ac0eb commit 4a5e872

File tree

16 files changed

+1029
-1058
lines changed

16 files changed

+1029
-1058
lines changed

.flake8

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ ignore = E203,E501,RST201,RST203,RST301,W503,B905
44
max-line-length = 80
55
max-complexity = 10
66
docstring-convention = google
7-
per-file-ignores = tests/*:S101,D100,D101,D102,D103,D104
7+
per-file-ignores = tests/*:S101,D100,D101,D102,D103,D104 exceptions.py:D107
88
rst-roles = class,const,func,meth,mod,ref
99
rst-directives = deprecated

.github/workflows/constraints.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
pip==23.1.2
2-
nox==2023.4.22
1+
pip==23.2.1
2+
nox==2022.8.7
33
nox-poetry==1.0.2
4-
poetry==1.4.2
5-
virtualenv==20.14.1
4+
poetry==1.6.1
5+
virtualenv==20.25.0

poetry.lock

Lines changed: 401 additions & 392 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ python = ">=3.8,<4.0"
2828
click = ">=8.0.1"
2929
loguru = "^0.7.0"
3030
tornado = ">=6.3.2"
31+
pytest = "^7.4.3"
32+
typing-extensions = "^4.9.0"
3133

3234

3335
[tool.poetry.dev-dependencies]

src/pytest_static/exceptions.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
"""Custom exception classes used in pytest-static."""
2+
from typing import Any
3+
4+
5+
class ExpandedTypeNotCallableError(TypeError):
6+
"""Exception raised if a non-Callable base_type is being cast as Callable."""
7+
8+
def __init__(self, base_type: Any, *args: Any):
9+
msg: str = (
10+
f"Attempted to cast a non callable type of {type(base_type)} "
11+
f"as callable."
12+
)
13+
super().__init__(msg, *args)

0 commit comments

Comments
 (0)