Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gevent
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gevent
Commits
e820c958
Commit
e820c958
authored
Mar 10, 2016
by
Jason Madden
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
landscape/pylint cleanups.
parent
e52414db
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
19 additions
and
10 deletions
+19
-10
.landscape.yml
.landscape.yml
+3
-0
.pylintrc
.pylintrc
+4
-0
gevent/_ssl2.py
gevent/_ssl2.py
+3
-7
gevent/_sslgte279.py
gevent/_sslgte279.py
+4
-0
gevent/socket.py
gevent/socket.py
+5
-3
No files found.
.landscape.yml
View file @
e820c958
...
...
@@ -20,6 +20,9 @@ ignore-paths:
-
util
# likewise with scripts
-
scripts/
# This file has invalid syntax for Python 3, which is how
# landscape.io runs things
-
gevent/_util_py2.py
ignore-patterns
:
# disabled code
-
greentest/xtest_.*py
...
...
.pylintrc
View file @
e820c958
...
...
@@ -28,6 +28,10 @@ disable=wrong-import-position,
locally-disabled,
# most of these are deferred imports
cyclic-import,
# these are almost always because that's what the stdlib does
too-many-arguments,
# likewise: these tend to be keyword arguments like len= in the stdlib
redefined-builtin,
[FORMAT]
# duplicated from setup.cfg
...
...
gevent/_ssl2.py
View file @
e820c958
...
...
@@ -9,14 +9,11 @@ This module implements cooperative SSL socket wrappers.
from
__future__
import
absolute_import
# Our import magic sadly makes this warning useless
# pylint: disable=undefined-variable
# pylint: disable=undefined-variable
,arguments-differ,no-member
import
ssl
as
__ssl__
try
:
_ssl
=
__ssl__
.
_ssl
except
AttributeError
:
_ssl
=
__ssl__
.
_ssl2
_ssl
=
__ssl__
.
_ssl
import
sys
import
errno
...
...
@@ -443,8 +440,7 @@ def get_server_certificate(addr, ssl_version=PROTOCOL_SSLv23, ca_certs=None):
If 'ca_certs' is specified, validate the server cert against it.
If 'ssl_version' is specified, use it in the connection attempt."""
host
,
port
=
addr
if
(
ca_certs
is
not
None
):
if
ca_certs
is
not
None
:
cert_reqs
=
CERT_REQUIRED
else
:
cert_reqs
=
CERT_NONE
...
...
gevent/_sslgte279.py
View file @
e820c958
...
...
@@ -8,6 +8,10 @@ This module implements cooperative SSL socket wrappers.
"""
from
__future__
import
absolute_import
# Our import magic sadly makes this warning useless
# pylint: disable=undefined-variable
import
ssl
as
__ssl__
_ssl
=
__ssl__
.
_ssl
...
...
gevent/socket.py
View file @
e820c958
...
...
@@ -10,6 +10,8 @@ in this module only block the current greenlet and let the others run.
For convenience, exceptions (like :class:`error <socket.error>` and :class:`timeout <socket.timeout>`)
as well as the constants from the :mod:`socket` module are imported into this module.
"""
# Our import magic sadly makes this warning useless
# pylint: disable=undefined-variable
import
sys
from
gevent.hub
import
PY3
...
...
@@ -62,7 +64,7 @@ def create_connection(address, timeout=_GLOBAL_DEFAULT_TIMEOUT, source_address=N
host
,
port
=
address
err
=
None
for
res
in
getaddrinfo
(
host
,
port
,
0
if
has_ipv6
else
AF_INET
,
SOCK_STREAM
):
af
,
socktype
,
proto
,
_
canonname
,
sa
=
res
af
,
socktype
,
proto
,
_
,
sa
=
res
sock
=
None
try
:
sock
=
socket
(
af
,
socktype
,
proto
)
...
...
@@ -78,12 +80,12 @@ def create_connection(address, timeout=_GLOBAL_DEFAULT_TIMEOUT, source_address=N
# that does not happen with regular sockets though, because _socket.socket.connect() is a built-in.
# this is similar to "getnameinfo loses a reference" failure in test_socket.py
if
not
PY3
:
sys
.
exc_clear
()
sys
.
exc_clear
()
# pylint:disable=no-member
if
sock
is
not
None
:
sock
.
close
()
err
=
ex
if
err
is
not
None
:
raise
err
raise
err
# pylint:disable=raising-bad-type
else
:
raise
error
(
"getaddrinfo returns an empty list"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment