diff options
author | Vincent Driessen <vincent@3rdcloud.com> | 2014-05-05 10:49:29 +0200 |
---|---|---|
committer | Vincent Driessen <vincent@3rdcloud.com> | 2014-05-05 10:50:02 +0200 |
commit | 38ec259b6e436d7868af8e99d55305340d5375ce (patch) | |
tree | 0bd75642ba20a2f5717d282545a00c2adb6e928b /examples | |
parent | 4746602c57ebe258ede3bfef517d6719a59cb24b (diff) | |
download | rq-38ec259b6e436d7868af8e99d55305340d5375ce.tar.gz |
Enable the most modern Python syntax.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/fib.py | 5 | ||||
-rw-r--r-- | examples/run_example.py | 8 | ||||
-rw-r--r-- | examples/run_worker.py | 5 |
3 files changed, 16 insertions, 2 deletions
diff --git a/examples/fib.py b/examples/fib.py index 2130b3c..91606cb 100644 --- a/examples/fib.py +++ b/examples/fib.py @@ -1,3 +1,8 @@ +# -*- coding: utf-8 -*- +from __future__ import (absolute_import, division, print_function, + unicode_literals) + + def slow_fib(n): if n <= 1: return 1 diff --git a/examples/run_example.py b/examples/run_example.py index cbcc6e9..d19a6dc 100644 --- a/examples/run_example.py +++ b/examples/run_example.py @@ -1,6 +1,12 @@ +# -*- coding: utf-8 -*- +from __future__ import (absolute_import, division, print_function, + unicode_literals) + import os import time -from rq import Queue, Connection + +from rq import Connection, Queue + from fib import slow_fib diff --git a/examples/run_worker.py b/examples/run_worker.py index 7c8adae..4feb217 100644 --- a/examples/run_worker.py +++ b/examples/run_worker.py @@ -1,5 +1,8 @@ -from rq import Queue, Worker, Connection +# -*- coding: utf-8 -*- +from __future__ import (absolute_import, division, print_function, + unicode_literals) +from rq import Connection, Queue, Worker if __name__ == '__main__': # Tell rq what Redis connection to use |