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
42b4eea0
Commit
42b4eea0
authored
Nov 29, 2018
by
Jason Madden
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix lint with pylint and astroid 2.2
parent
08d12491
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
9 additions
and
19 deletions
+9
-19
src/gevent/__init__.py
src/gevent/__init__.py
+1
-1
src/gevent/_ident.py
src/gevent/_ident.py
+1
-3
src/gevent/_ssl3.py
src/gevent/_ssl3.py
+1
-1
src/gevent/baseserver.py
src/gevent/baseserver.py
+0
-1
src/gevent/libev/corecffi.py
src/gevent/libev/corecffi.py
+1
-3
src/gevent/libev/watcher.py
src/gevent/libev/watcher.py
+3
-3
src/gevent/libuv/watcher.py
src/gevent/libuv/watcher.py
+1
-1
src/gevent/lock.py
src/gevent/lock.py
+0
-3
src/gevent/pool.py
src/gevent/pool.py
+0
-1
src/gevent/pywsgi.py
src/gevent/pywsgi.py
+0
-1
src/gevent/tests/test___monkey_patching.py
src/gevent/tests/test___monkey_patching.py
+1
-1
No files found.
src/gevent/__init__.py
View file @
42b4eea0
...
@@ -163,7 +163,7 @@ del sys
...
@@ -163,7 +163,7 @@ del sys
# outdated on each major release.
# outdated on each major release.
def
__dependencies_for_freezing
():
# pragma: no cover
def
__dependencies_for_freezing
():
# pragma: no cover
# pylint:disable=unused-
variable
# pylint:disable=unused-
import
from
gevent
import
core
from
gevent
import
core
from
gevent
import
resolver_thread
from
gevent
import
resolver_thread
from
gevent
import
resolver_ares
from
gevent
import
resolver_ares
...
...
src/gevent/_ident.py
View file @
42b4eea0
...
@@ -21,9 +21,7 @@ class ValuedWeakRef(ref):
...
@@ -21,9 +21,7 @@ class ValuedWeakRef(ref):
"""
"""
A weak ref with an associated value.
A weak ref with an associated value.
"""
"""
# This seems entirely spurious; even on Python 2.7
# weakref.ref descends from object
# pylint: disable=slots-on-old-class
__slots__
=
(
'value'
,)
__slots__
=
(
'value'
,)
...
...
src/gevent/_ssl3.py
View file @
42b4eea0
...
@@ -99,7 +99,7 @@ class SSLContext(orig_SSLContext):
...
@@ -99,7 +99,7 @@ class SSLContext(orig_SSLContext):
super
(
orig_SSLContext
,
orig_SSLContext
).
maximum_version
.
__set__
(
self
,
value
)
super
(
orig_SSLContext
,
orig_SSLContext
).
maximum_version
.
__set__
(
self
,
value
)
class
_contextawaresock
(
socket
.
_gevent_sock_class
):
# Python 2: pylint:disable=slots-on-old-class
class
_contextawaresock
(
socket
.
_gevent_sock_class
):
# We have to pass the raw stdlib socket to SSLContext.wrap_socket.
# We have to pass the raw stdlib socket to SSLContext.wrap_socket.
# That method in turn can pass that object on to things like SNI callbacks.
# That method in turn can pass that object on to things like SNI callbacks.
# It wouldn't have access to any of the attributes on the SSLSocket, like
# It wouldn't have access to any of the attributes on the SSLSocket, like
...
...
src/gevent/baseserver.py
View file @
42b4eea0
...
@@ -291,7 +291,6 @@ class BaseServer(object):
...
@@ -291,7 +291,6 @@ class BaseServer(object):
It is not supposed to be called by the user, it is called by :meth:`start` before starting
It is not supposed to be called by the user, it is called by :meth:`start` before starting
the accept loop."""
the accept loop."""
pass
@
property
@
property
def
started
(
self
):
def
started
(
self
):
...
...
src/gevent/libev/corecffi.py
View file @
42b4eea0
...
@@ -218,7 +218,6 @@ class loop(AbstractLoop):
...
@@ -218,7 +218,6 @@ class loop(AbstractLoop):
approx_timer_resolution
=
0.00001
approx_timer_resolution
=
0.00001
error_handler
=
None
error_handler
=
None
_CHECK_POINTER
=
'struct ev_check *'
_CHECK_POINTER
=
'struct ev_check *'
...
@@ -229,8 +228,7 @@ class loop(AbstractLoop):
...
@@ -229,8 +228,7 @@ class loop(AbstractLoop):
def
__init__
(
self
,
flags
=
None
,
default
=
None
):
def
__init__
(
self
,
flags
=
None
,
default
=
None
):
AbstractLoop
.
__init__
(
self
,
ffi
,
libev
,
_watchers
,
flags
,
default
)
AbstractLoop
.
__init__
(
self
,
ffi
,
libev
,
_watchers
,
flags
,
default
)
self
.
_default
=
True
if
libev
.
ev_is_default_loop
(
self
.
_ptr
)
else
False
self
.
_default
=
bool
(
libev
.
ev_is_default_loop
(
self
.
_ptr
))
def
_init_loop
(
self
,
flags
,
default
):
def
_init_loop
(
self
,
flags
,
default
):
c_flags
=
_flags_to_int
(
flags
)
c_flags
=
_flags_to_int
(
flags
)
...
...
src/gevent/libev/watcher.py
View file @
42b4eea0
...
@@ -100,7 +100,7 @@ class watcher(_base.watcher):
...
@@ -100,7 +100,7 @@ class watcher(_base.watcher):
self
.
_flags
|=
2
# now we've told libev
self
.
_flags
|=
2
# now we've told libev
def
_get_ref
(
self
):
def
_get_ref
(
self
):
return
False
if
self
.
_flags
&
4
else
True
return
not
self
.
_flags
&
4
def
_set_ref
(
self
,
value
):
def
_set_ref
(
self
,
value
):
if
value
:
if
value
:
...
@@ -144,7 +144,7 @@ class watcher(_base.watcher):
...
@@ -144,7 +144,7 @@ class watcher(_base.watcher):
@
property
@
property
def
pending
(
self
):
def
pending
(
self
):
return
True
if
self
.
_watcher
and
libev
.
ev_is_pending
(
self
.
_watcher
)
else
False
return
bool
(
self
.
_watcher
and
libev
.
ev_is_pending
(
self
.
_watcher
))
class
io
(
_base
.
IoMixin
,
watcher
):
class
io
(
_base
.
IoMixin
,
watcher
):
...
@@ -218,7 +218,7 @@ class async_(_base.AsyncMixin, watcher):
...
@@ -218,7 +218,7 @@ class async_(_base.AsyncMixin, watcher):
@
property
@
property
def
pending
(
self
):
def
pending
(
self
):
return
True
if
libev
.
ev_async_pending
(
self
.
_watcher
)
else
False
return
bool
(
libev
.
ev_async_pending
(
self
.
_watcher
))
# Provide BWC for those that have async
# Provide BWC for those that have async
locals
()[
'async'
]
=
async_
locals
()[
'async'
]
=
async_
...
...
src/gevent/libuv/watcher.py
View file @
42b4eea0
...
@@ -174,7 +174,7 @@ class watcher(_base.watcher):
...
@@ -174,7 +174,7 @@ class watcher(_base.watcher):
# Convert 1/0 to True/False
# Convert 1/0 to True/False
if
self
.
_watcher
is
None
:
if
self
.
_watcher
is
None
:
return
None
return
None
return
True
if
libuv
.
uv_has_ref
(
self
.
_watcher
)
else
False
return
bool
(
libuv
.
uv_has_ref
(
self
.
_watcher
))
def
_set_ref
(
self
,
value
):
def
_set_ref
(
self
,
value
):
if
value
:
if
value
:
...
...
src/gevent/lock.py
View file @
42b4eea0
...
@@ -158,7 +158,6 @@ class DummySemaphore(object):
...
@@ -158,7 +158,6 @@ class DummySemaphore(object):
.. versionchanged:: 1.1rc3
.. versionchanged:: 1.1rc3
Accept and ignore a *value* argument for compatibility with Semaphore.
Accept and ignore a *value* argument for compatibility with Semaphore.
"""
"""
pass
def
__str__
(
self
):
def
__str__
(
self
):
return
'<%s>'
%
self
.
__class__
.
__name__
return
'<%s>'
%
self
.
__class__
.
__name__
...
@@ -169,7 +168,6 @@ class DummySemaphore(object):
...
@@ -169,7 +168,6 @@ class DummySemaphore(object):
def
release
(
self
):
def
release
(
self
):
"""Releasing a dummy semaphore does nothing."""
"""Releasing a dummy semaphore does nothing."""
pass
def
rawlink
(
self
,
callback
):
def
rawlink
(
self
,
callback
):
# XXX should still work and notify?
# XXX should still work and notify?
...
@@ -180,7 +178,6 @@ class DummySemaphore(object):
...
@@ -180,7 +178,6 @@ class DummySemaphore(object):
def
wait
(
self
,
timeout
=
None
):
def
wait
(
self
,
timeout
=
None
):
"""Waiting for a DummySemaphore returns immediately."""
"""Waiting for a DummySemaphore returns immediately."""
pass
def
acquire
(
self
,
blocking
=
True
,
timeout
=
None
):
def
acquire
(
self
,
blocking
=
True
,
timeout
=
None
):
"""
"""
...
...
src/gevent/pool.py
View file @
42b4eea0
...
@@ -488,7 +488,6 @@ class Group(GroupMappingMixin):
...
@@ -488,7 +488,6 @@ class Group(GroupMappingMixin):
In this implementation, because there are no limits on the number
In this implementation, because there are no limits on the number
of tracked greenlets, this will always return immediately.
of tracked greenlets, this will always return immediately.
"""
"""
pass
# MappingMixin methods
# MappingMixin methods
...
...
src/gevent/pywsgi.py
View file @
42b4eea0
...
@@ -1188,7 +1188,6 @@ class LoggingLogAdapter(object):
...
@@ -1188,7 +1188,6 @@ class LoggingLogAdapter(object):
def
flush
(
self
):
def
flush
(
self
):
"No-op; required to be a file-like object"
"No-op; required to be a file-like object"
pass
def
writelines
(
self
,
lines
):
def
writelines
(
self
,
lines
):
for
line
in
lines
:
for
line
in
lines
:
...
...
src/gevent/tests/test___monkey_patching.py
View file @
42b4eea0
...
@@ -92,7 +92,7 @@ def TESTRUNNER(tests=None):
...
@@ -92,7 +92,7 @@ def TESTRUNNER(tests=None):
if
tests
and
not
sys
.
platform
.
startswith
(
"win"
):
if
tests
and
not
sys
.
platform
.
startswith
(
"win"
):
atexit
.
register
(
os
.
system
,
'rm -f */@test*'
)
atexit
.
register
(
os
.
system
,
'rm -f */@test*'
)
basic_args
=
[
sys
.
executable
,
'-u'
,
'-W'
,
'ignore'
,
'-m'
'gevent.testing.monkey_test'
]
basic_args
=
[
sys
.
executable
,
'-u'
,
'-W'
,
'ignore'
,
'-m'
,
'gevent.testing.monkey_test'
]
for
filename
in
tests
:
for
filename
in
tests
:
if
filename
in
version_tests
:
if
filename
in
version_tests
:
util
.
log
(
"Overriding %s from %s with file from %s"
,
filename
,
test_dir
,
version_test_dir
)
util
.
log
(
"Overriding %s from %s with file from %s"
,
filename
,
test_dir
,
version_test_dir
)
...
...
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