Skip to content

Commit

Permalink
Merge pull request #2 from withshubh/deepsource-fix-7bd5e13d
Browse files Browse the repository at this point in the history
Use literal syntax instead of function calls to create data structure
  • Loading branch information
withshubh authored Nov 30, 2020
2 parents 5078a73 + 99a70a0 commit 9c0b6ad
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion fluentcheck/classes/check.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class Check:

def _import_assertion_modules(self):
ass = importlib.import_module(Check.ASSERTIONS_PACKAGE)
assertion_modules = list()
assertion_modules = []
for _1, module_name, _2 in pkgutil.iter_modules(ass.__path__):
assertion_modules.append(importlib.import_module(ass.__name__ + '.' + module_name))
return assertion_modules
Expand Down
4 changes: 2 additions & 2 deletions fluentcheck/tests/tests_check/test_dicts.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
class TestDictsAssertions(unittest.TestCase):

def test_is_dict(self):
res = Check(dict()).is_dict()
res = Check({}).is_dict()
self.assertIsInstance(res, Check)
try:
Check(123).is_dict()
Expand All @@ -18,7 +18,7 @@ def test_is_not_dict(self):
res = Check(set()).is_not_dict()
self.assertIsInstance(res, Check)
try:
Check(dict()).is_not_dict()
Check({}).is_not_dict()
self.fail()
except CheckError:
pass
Expand Down
4 changes: 2 additions & 2 deletions fluentcheck/tests/tests_is/test_dicts_is.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
class TestIsDictsAssertions(unittest.TestCase):

def test_is_dict_pass(self):
obj = dict()
obj = {}
self.assertIsInstance(Is(obj).dict, Is)

def test_is_dict_fail(self):
Expand All @@ -21,7 +21,7 @@ def test_is_not_dict_pass(self):
self.assertIsInstance(Is(obj).not_dict, Is)

def test_is_not_dict_fail(self):
obj = dict()
obj = {}
with self.assertRaises(CheckError):
Is(obj).not_dict

Expand Down

0 comments on commit 9c0b6ad

Please sign in to comment.