33 """<p><i>isort</i> is a Python utility / library to sort imports""" |
29 """<p><i>isort</i> is a Python utility / library to sort imports""" |
34 """ alphabetically, and automatically separated into sections and by""" |
30 """ alphabetically, and automatically separated into sections and by""" |
35 """ type.</p>""", |
31 """ type.</p>""", |
36 ).format(isort.__version__), |
32 ).format(isort.__version__), |
37 ) |
33 ) |
38 |
|
39 |
|
40 @contextlib.contextmanager |
|
41 def suppressStderr(): |
|
42 """ |
|
43 Function to suppress output to stderr. |
|
44 """ |
|
45 stderr = sys.stderr |
|
46 with open(os.devnull, "w") as devnull: |
|
47 sys.stderr = devnull |
|
48 yield |
|
49 sys.stderr = stderr |
|