Skip to content

Commit

Permalink
Polish
Browse files Browse the repository at this point in the history
  • Loading branch information
jacob414 committed Jun 12, 2020
1 parent 5f78d1f commit a2887b7
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions kingston/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@

import distutils.cmd

import funcy # type: ignore
import funcy as fy
import pytest # type: ignore

from altered import state # type: ignore
from altered import state, E # type: ignore

import pycodestyle # type: ignore
import mypy.api # type: ignore
Expand All @@ -33,17 +33,6 @@
same = lambda *args, **kwargs: args[0] if len(args) == 1 else args


@contextlib.contextmanager
def bugtrap(*args, **kwargs):
try:
yield (args, kwargs) # 1. Do
except: # 2. Catch
type_, value, tb = sys.exc_info()
import ipdb
ipdb.set_trace() # 3. ?
pass # 4. Profit!


class fixture(object):
@staticmethod
def params(namelist: str, *values: Any) -> Any:
Expand Down Expand Up @@ -116,7 +105,7 @@ def run(self: 'ReviewProject') -> None:
print('ERROR')
print(err)

issues = sum(funcy.walk_values(lambda x: x[0], reports).values())
issues = sum(fy.walk_values(lambda x: x[0], reports).values())
if issues > 0:
ReviewProject.separator_line()
print()
Expand Down

0 comments on commit a2887b7

Please sign in to comment.