Skip to content

Commit 12ecb88

Browse files
authored
refactor(spy): remove ununsed try/catch (#56)
1 parent 780785c commit 12ecb88

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

decoy/spy.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,7 @@ def __getattr__(self, name: str) -> Any:
100100
child_is_async = False
101101

102102
if isclass(self._spec):
103-
try:
104-
child_hint = _get_type_hints(self._spec).get(name)
105-
except Exception:
106-
child_hint = None
107-
103+
child_hint = _get_type_hints(self._spec).get(name)
108104
child_spec = getattr_static(self._spec, name, child_hint)
109105

110106
if isinstance(child_spec, property):

poetry.lock

Lines changed: 4 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ pytest = "^6.1.2"
3737
pytest-asyncio = "^0.15.1"
3838
pytest-mypy-plugins = "^1.6.1"
3939
pytest-xdist = "^2.1.0"
40-
coverage = "^5.5"
40+
coverage = {extras = ["toml"], version = "^5.5"}
4141

4242
[tool.poetry.plugins."pytest11"]
4343
"decoy" = "decoy.pytest_plugin"
@@ -51,6 +51,9 @@ plugins = ["decoy/mypy/plugin.py"]
5151
strict = true
5252
show_error_codes = true
5353

54+
[tool.coverage.report]
55+
exclude_lines = ["@overload"]
56+
5457
[build-system]
5558
requires = ["poetry_core>=1.0.0"]
5659
build-backend = "poetry.core.masonry.api"

0 commit comments

Comments
 (0)