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
7c6b53f0
Commit
7c6b53f0
authored
Sep 10, 2022
by
ento
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pylint: Fix or disable used-before-assignment
parent
150ba0d2
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
11 additions
and
7 deletions
+11
-7
src/gevent/_ffi/watcher.py
src/gevent/_ffi/watcher.py
+1
-1
src/gevent/_sslgte279.py
src/gevent/_sslgte279.py
+1
-1
src/gevent/subprocess.py
src/gevent/subprocess.py
+1
-1
src/gevent/tests/test__event.py
src/gevent/tests/test__event.py
+3
-1
src/gevent/tests/test__fileobject.py
src/gevent/tests/test__fileobject.py
+1
-1
src/gevent/tests/test__selectors.py
src/gevent/tests/test__selectors.py
+4
-2
No files found.
src/gevent/_ffi/watcher.py
View file @
7c6b53f0
...
...
@@ -66,7 +66,7 @@ __all__ = [
]
try
:
ResourceWarning
ResourceWarning
# pylint:disable=used-before-assignment
except
NameError
:
class
ResourceWarning
(
Warning
):
"Python 2 fallback"
...
...
src/gevent/_sslgte279.py
View file @
7c6b53f0
...
...
@@ -47,7 +47,7 @@ __imports__ = copy_globals(__ssl__, globals(),
dunder_names_to_keep
=
())
try
:
_delegate_methods
_delegate_methods
# pylint:disable=used-before-assignment
except
NameError
:
# PyPy doesn't expose this detail
_delegate_methods
=
(
'recv'
,
'recvfrom'
,
'recv_into'
,
'recvfrom_into'
,
'send'
,
'sendto'
)
...
...
src/gevent/subprocess.py
View file @
7c6b53f0
...
...
@@ -280,7 +280,7 @@ else:
from
gevent.os
import
fork_and_watch
try
:
BrokenPipeError
BrokenPipeError
# pylint:disable=used-before-assignment
except
NameError
:
# Python 2
class
BrokenPipeError
(
Exception
):
"Never raised, never caught."
...
...
src/gevent/tests/test__event.py
View file @
7c6b53f0
...
...
@@ -269,12 +269,14 @@ class TestAsyncResultCrossThread(greentest.TestCase):
gevent
.
get_hub
().
destroy
(
destroy_loop
=
True
)
thread
=
Thread
()
glet
=
None
try
:
glet
=
gevent
.
spawn
(
thread
.
start
)
result
=
thread
.
async_result
.
wait
(
self
.
BG_WAIT_DELAY
)
finally
:
thread
.
join
(
DELAY
*
15
)
glet
.
join
(
DELAY
)
if
glet
is
not
None
:
glet
.
join
(
DELAY
)
self
.
_check_result
(
result
)
@
greentest
.
ignores_leakcheck
...
...
src/gevent/tests/test__fileobject.py
View file @
7c6b53f0
...
...
@@ -25,7 +25,7 @@ import gevent.testing as greentest
from
gevent.testing
import
sysinfo
try
:
ResourceWarning
ResourceWarning
# pylint:disable=used-before-assignment
except
NameError
:
class
ResourceWarning
(
Warning
):
"Python 2 fallback"
...
...
src/gevent/tests/test__selectors.py
View file @
7c6b53f0
...
...
@@ -32,6 +32,7 @@ class SelectorTestMixin(object):
def
_check_selector
(
self
,
sel
):
server
,
client
=
socket
.
socketpair
()
glet
=
None
try
:
sel
.
register
(
server
,
selectors
.
EVENT_READ
,
self
.
read_from_ready_socket_and_reply
)
glet
=
gevent
.
spawn
(
self
.
run_selector_once
,
sel
)
...
...
@@ -43,8 +44,9 @@ class SelectorTestMixin(object):
sel
.
close
()
server
.
close
()
client
.
close
()
glet
.
join
(
10
)
self
.
assertTrue
(
glet
.
ready
())
if
glet
is
not
None
:
glet
.
join
(
10
)
self
.
assertTrue
(
glet
is
not
None
and
glet
.
ready
())
class
GeventSelectorTest
(
SelectorTestMixin
,
...
...
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