Skip to content

Commit 9bfd23a

Browse files
committed
Remove explicit gevent imports
It is enough to monkey patch one time at the top level, which is done in `bin/srv.py` web server script.
1 parent a4be5d8 commit 9bfd23a

File tree

4 files changed

+9
-19
lines changed

4 files changed

+9
-19
lines changed

lib/adapter/cmd.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
"""
22
"""
33

4-
# pylint: disable=relative-import,wrong-import-position,unused-argument,abstract-method
4+
# pylint: disable=unused-argument,abstract-method
55

6-
from gevent.monkey import patch_all
7-
from gevent.subprocess import Popen, PIPE
6+
import os.path
7+
import re
8+
from subprocess import Popen, PIPE
89

910
from .adapter import Adapter
1011

11-
import os.path
12-
import re
1312

1413
def _get_abspath(path):
1514
"""Find absolute path of the specified `path`

lib/adapter/question.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,13 @@
44
path.internal.bin.upstream
55
"""
66

7-
# pylint: disable=relative-import,wrong-import-position,wrong-import-order
7+
# pylint: disable=relative-import
88

99
from __future__ import print_function
1010

11-
from gevent.monkey import patch_all
12-
from gevent.subprocess import Popen, PIPE
13-
1411
import os
1512
import re
13+
from subprocess import Popen, PIPE
1614

1715
from polyglot.detect import Detector
1816
from polyglot.detect.base import UnknownLanguage

lib/fmt/comments.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,15 @@
1818
Configuration parameters:
1919
"""
2020

21-
# pylint: disable=wrong-import-position,wrong-import-order
22-
2321
from __future__ import print_function
2422

25-
from gevent.monkey import patch_all
26-
from gevent.subprocess import Popen
27-
2823
import sys
2924
import os
3025
import textwrap
3126
import hashlib
3227
import re
3328
from itertools import groupby, chain
29+
from subprocess import Popen
3430
from tempfile import NamedTemporaryFile
3531

3632
from config import CONFIG

lib/frontend/html.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,19 @@
55
path.internal.ansi2html
66
"""
77

8-
from gevent.monkey import patch_all
9-
from gevent.subprocess import Popen, PIPE
10-
11-
# pylint: disable=wrong-import-position,wrong-import-order
128
import sys
139
import os
1410
import re
11+
from subprocess import Popen, PIPE
1512

1613
MYDIR = os.path.abspath(os.path.join(__file__, '..', '..'))
1714
sys.path.append("%s/lib/" % MYDIR)
1815

16+
# pylint: disable=wrong-import-position
1917
from config import CONFIG
2018
from globals import error
2119
from buttons import TWITTER_BUTTON, GITHUB_BUTTON, GITHUB_BUTTON_FOOTER
2220
import frontend.ansi
23-
# pylint: disable=wrong-import-position,wrong-import-order
2421

2522
# temporary having it here, but actually we have the same data
2623
# in the adapter module

0 commit comments

Comments
 (0)