mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-07 13:36:54 +00:00
Make flake8 use built-in mock from unittest, if available (Python 3.4+)
This commit is contained in:
parent
121ea4f056
commit
5faa1df46a
21 changed files with 84 additions and 21 deletions
|
|
@ -2,7 +2,10 @@
|
|||
import ast
|
||||
import tokenize
|
||||
|
||||
import mock
|
||||
try:
|
||||
from unittest import mock
|
||||
except (ImportError, AttributeError):
|
||||
import mock
|
||||
import pytest
|
||||
|
||||
from flake8 import processor
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue