Skip to content

Commit 18eaf61

Browse files
committed
[QA] Added hints for flake8.
1 parent f6db79a commit 18eaf61

4 files changed

Lines changed: 14 additions & 15 deletions

File tree

github2/issues.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
try:
22
from urllib.parse import quote_plus # For Python 3
33
except ImportError:
4-
from urllib import quote_plus
4+
from urllib import quote_plus # NOQA
55

66
from github2.core import (GithubCommand, BaseData, Attribute, DateAttribute,
77
repr_string, requires_auth)

github2/request.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,26 +9,25 @@
99
from http.client import responses
1010
except ImportError: # For Python 2.5-2.7
1111
try:
12-
from httplib import responses
12+
from httplib import responses # NOQA
1313
except ImportError: # For Python 2.4
14-
from BaseHTTPServer import BaseHTTPRequestHandler
15-
responses = dict([(k, v[0])
16-
for k, v in BaseHTTPRequestHandler.responses.items()])
14+
from BaseHTTPServer import BaseHTTPRequestHandler as _BHRH
15+
responses = dict([(k, v[0]) for k, v in _BHRH.responses.items()]) # NOQA
1716
try:
1817
import json as simplejson # For Python 2.6+
1918
except ImportError:
20-
import simplejson
19+
import simplejson # NOQA
2120
from os import (getenv, path)
2221
try:
2322
# For Python 3
2423
from urllib.parse import (parse_qs, quote, urlencode, urlsplit, urlunsplit)
2524
except ImportError:
26-
from urlparse import (urlsplit, urlunsplit)
25+
from urlparse import (urlsplit, urlunsplit) # NOQA
2726
try:
28-
from urlparse import parse_qs
27+
from urlparse import parse_qs # NOQA
2928
except ImportError:
30-
from cgi import parse_qs
31-
from urllib import urlencode, quote
29+
from cgi import parse_qs # NOQA
30+
from urllib import urlencode, quote # NOQA
3231

3332
import httplib2
3433

github2/users.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
try:
22
from urllib.parse import quote_plus # For Python 3
33
except ImportError:
4-
from urllib import quote_plus
4+
from urllib import quote_plus # NOQA
55

66
from github2.core import (BaseData, GithubCommand, DateAttribute, Attribute,
77
enhanced_by_auth, requires_auth)

tests/test_request.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@
44
from urllib.parse import parse_qs # For Python 3
55
except ImportError:
66
try:
7-
from urlparse import parse_qs
7+
from urlparse import parse_qs # NOQA
88
except ImportError: # For Python <2.6
9-
from cgi import parse_qs
9+
from cgi import parse_qs # NOQA
1010

1111
try:
1212
from nose.tools import (assert_dict_contains_subset, assert_dict_equal)
1313
except ImportError: # for Python <2.7
1414
import unittest2
1515

1616
_binding = unittest2.TestCase('run')
17-
assert_dict_contains_subset = _binding.assertDictContainsSubset
18-
assert_dict_equal = _binding.assertDictEqual
17+
assert_dict_contains_subset = _binding.assertDictContainsSubset # NOQA
18+
assert_dict_equal = _binding.assertDictEqual # NOQA
1919

2020

2121
from github2 import request

0 commit comments

Comments
 (0)