Skip to content

Commit

Permalink
refactor(spy): remove ununsed try/catch (#56)
Browse files Browse the repository at this point in the history
  • Loading branch information
mcous authored Aug 5, 2021
1 parent 780785c commit 12ecb88
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
6 changes: 1 addition & 5 deletions decoy/spy.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,7 @@ def __getattr__(self, name: str) -> Any:
child_is_async = False

if isclass(self._spec):
try:
child_hint = _get_type_hints(self._spec).get(name)
except Exception:
child_hint = None

child_hint = _get_type_hints(self._spec).get(name)
child_spec = getattr_static(self._spec, name, child_hint)

if isinstance(child_spec, property):
Expand Down
5 changes: 4 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ pytest = "^6.1.2"
pytest-asyncio = "^0.15.1"
pytest-mypy-plugins = "^1.6.1"
pytest-xdist = "^2.1.0"
coverage = "^5.5"
coverage = {extras = ["toml"], version = "^5.5"}

[tool.poetry.plugins."pytest11"]
"decoy" = "decoy.pytest_plugin"
Expand All @@ -51,6 +51,9 @@ plugins = ["decoy/mypy/plugin.py"]
strict = true
show_error_codes = true

[tool.coverage.report]
exclude_lines = ["@overload"]

[build-system]
requires = ["poetry_core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

0 comments on commit 12ecb88

Please sign in to comment.