Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fslpy
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Evan Edmond
fslpy
Commits
6b4781db
Commit
6b4781db
authored
4 years ago
by
Paul McCarthy
Browse files
Options
Downloads
Patches
Plain Diff
MNT: style
parent
b02e1bcf
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
fsl/utils/idle.py
+4
-5
4 additions, 5 deletions
fsl/utils/idle.py
with
4 additions
and
5 deletions
fsl/utils/idle.py
+
4
−
5
View file @
6b4781db
...
@@ -89,7 +89,6 @@ except ImportError: import Queue as queue
...
@@ -89,7 +89,6 @@ except ImportError: import Queue as queue
log
=
logging
.
getLogger
(
__name__
)
log
=
logging
.
getLogger
(
__name__
)
class
IdleTask
(
object
):
@functools.lru_cache
()
@functools.lru_cache
()
def
_canHaveGui
():
def
_canHaveGui
():
"""
Return ``True`` if wxPython is installed, and a display is available,
"""
Return ``True`` if wxPython is installed, and a display is available,
...
@@ -118,6 +117,7 @@ def _haveGui():
...
@@ -118,6 +117,7 @@ def _haveGui():
return
False
return
False
class
IdleTask
:
"""
Container object used by the :class:`IdleLoop` class.
"""
Container object used by the :class:`IdleLoop` class.
Used to encapsulate information about a queued task.
Used to encapsulate information about a queued task.
"""
"""
...
@@ -139,7 +139,7 @@ def _haveGui():
...
@@ -139,7 +139,7 @@ def _haveGui():
self
.
kwargs
=
kwargs
self
.
kwargs
=
kwargs
class
IdleLoop
(
object
)
:
class
IdleLoop
:
"""
This class contains logic for running tasks via ``wx.EVT_IDLE`` events.
"""
This class contains logic for running tasks via ``wx.EVT_IDLE`` events.
A single ``IdleLoop`` instance is created when this module is first
A single ``IdleLoop`` instance is created when this module is first
...
@@ -775,7 +775,7 @@ def wait(threads, task, *args, **kwargs):
...
@@ -775,7 +775,7 @@ def wait(threads, task, *args, **kwargs):
return
None
return
None
class
Task
(
object
)
:
class
Task
:
"""
Container object which encapsulates a task that is run by a
"""
Container object which encapsulates a task that is run by a
:class:`TaskThread`.
:class:`TaskThread`.
"""
"""
...
@@ -795,7 +795,6 @@ class TaskThreadVeto(Exception):
...
@@ -795,7 +795,6 @@ class TaskThreadVeto(Exception):
handler (if one has been specified). See the :meth:`TaskThread.enqueue`
handler (if one has been specified). See the :meth:`TaskThread.enqueue`
method for more details.
method for more details.
"""
"""
pass
class
TaskThread
(
threading
.
Thread
):
class
TaskThread
(
threading
.
Thread
):
...
@@ -1025,7 +1024,7 @@ def mutex(*args, **kwargs):
...
@@ -1025,7 +1024,7 @@ def mutex(*args, **kwargs):
return
MutexFactory
(
*
args
,
**
kwargs
)
return
MutexFactory
(
*
args
,
**
kwargs
)
class
MutexFactory
(
object
)
:
class
MutexFactory
:
"""
The ``MutexFactory`` is a placeholder for methods which have been
"""
The ``MutexFactory`` is a placeholder for methods which have been
decorated with the :func:`mutex` decorator. When the method of a class
decorated with the :func:`mutex` decorator. When the method of a class
is decorated with ``@mutex``, a ``MutexFactory`` is created.
is decorated with ``@mutex``, a ``MutexFactory`` is created.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment