summaryrefslogtreecommitdiff
path: root/tests/unit/compat/mock.py
diff options
context:
space:
mode:
authorKate Case <kcase@redhat.com>2023-01-25 08:37:58 -0500
committerGitHub <noreply@github.com>2023-01-25 08:37:58 -0500
commite9911888f6dcdf9031f3fdb2e32c52e45815fdbe (patch)
treedc22abb4a329ef04e98685b81d074679dc24c456 /tests/unit/compat/mock.py
parentbcfe61a3b6ff69f08450f3dbd8f0f1827fb18ab3 (diff)
downloadvyos.vyos-e9911888f6dcdf9031f3fdb2e32c52e45815fdbe.tar.gz
vyos.vyos-e9911888f6dcdf9031f3fdb2e32c52e45815fdbe.zip
Add prettier and isort to pre-commit. (#270)
* Add prettier and isort to pre-commit. * Bump line-length to 100 * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Diffstat (limited to 'tests/unit/compat/mock.py')
-rw-r--r--tests/unit/compat/mock.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/unit/compat/mock.py b/tests/unit/compat/mock.py
index b7df24f..4bef4c2 100644
--- a/tests/unit/compat/mock.py
+++ b/tests/unit/compat/mock.py
@@ -24,6 +24,7 @@ __metaclass__ = type
Compat module for Python3.x's unittest.mock module
"""
import sys
+
import _io
# Python 2.7
@@ -102,9 +103,7 @@ if sys.version_info >= (3,) and sys.version_info < (3, 4, 4):
global file_spec
if file_spec is None:
- file_spec = list(
- set(dir(_io.TextIOWrapper)).union(set(dir(_io.BytesIO)))
- )
+ file_spec = list(set(dir(_io.TextIOWrapper)).union(set(dir(_io.BytesIO))))
if mock is None:
mock = MagicMock(name="open", spec=open)