27 Commits

Author SHA1 Message Date
Bradley Walters
1b13013782 extern.task: replace GLib event loop with asyncio event loop
Signed-off-by: Bradley Walters <oss@walters.app>
2022-05-23 17:59:07 -06:00
JoeLametta
752162a434 Fix two flake8 errors
Signed-off-by: JoeLametta <JoeLametta@users.noreply.github.com>
2020-05-29 14:03:27 +00:00
JoeLametta
e56c636fd3 Improve docstrings
Signed-off-by: JoeLametta <JoeLametta@users.noreply.github.com>
2020-02-22 15:11:22 +00:00
JoeLametta
35201d5290 Address errors, improvements, formatting
- Removed unused code not portable due to buffer() use
- raw_input() does not exist in Python 3
- Fixed octal constant syntax for Python 3
- Fixed TypeError
- Replace if not exists: makedirs(path) with single call: using makedirs(path, exist_ok=True)
- Class inherits from object, can be safely removed from bases in python3: pylint's useless-object-inheritance (W0235) check

Signed-off-by: JoeLametta <JoeLametta@users.noreply.github.com>
2019-11-26 18:46:12 +00:00
Drew DeVault
64dd9d843a Initial pass on python 3 port
Given the imminent end-of-life for Python 2, I didn't bother making the
codebase compatible with both.

Signed-off-by: Drew DeVault <sir@cmpwn.com>
2019-11-26 18:46:10 +00:00
JoeLametta
57d386e82f Remove too verbose logger statements
Related to #278.

Signed-off-by: JoeLametta <JoeLametta@users.noreply.github.com>
2019-07-07 10:00:00 +00:00
JoeLametta
69f8f39c49 Change documentation from epydoc to reStructuredText
Thanks to Freso for all the useful comments!

Signed-off-by: JoeLametta <JoeLametta@users.noreply.github.com>
2019-05-03 20:06:13 +02:00
JoeLametta
9dc5702e19 Fix string concatenation bug 2019-02-02 19:19:50 +01:00
JoeLametta
cf923cc9cc Review existing comments and add new ones
Also clarified a statement
2019-02-02 19:19:50 +01:00
JoeLametta
16b0d8dc29 Make methods static 2019-02-02 19:19:49 +01:00
JoeLametta
5311727572 Avoid shadowing built-ins/variables 2019-02-02 19:19:49 +01:00
JoeLametta
fef7973113 Modernize code for easier Python 3 port
- Replace print statement with function call
- Replace except ..., ...: syntax with except ... as ...:
- Simplify obsolete try ... except ... code block
- Replace some unicode calls with u-prefixed strings
- Do not use `len(SEQUENCE)` to determine if a sequence is empty
- Replace dictionary creation
- Drop support for GObject static bindings
2019-02-02 19:19:49 +01:00
JoeLametta
1349968245 Restore stdout flushing
Otherwise it seems that the output of some lines may appear garbled
2018-12-14 14:29:14 +00:00
JoeLametta
a23b214814 Print empty lines, not parentheses 2018-12-14 14:21:51 +00:00
JoeLametta
e3bb215d4f Convert noisy logger statements to debug level 2018-12-14 14:17:30 +00:00
JoeLametta
c377417108 Replace sys.std{out,err} statements with logger/print calls (#331)
* Change global default log level to 'INFO'

We're going to increase our usage of logger statements instead of print instructions (where deemed opportune).

* Replace sys.std{out,err} statements with logger/print calls

Fixes #303.
2018-12-13 20:21:26 +00:00
Joe
241f44eff6 Merge branch 'master' into python3 2018-06-08 14:32:27 +00:00
Andreas Oberritter
145403705d Switch to PyGObject by default (#271)
* cd/offset: remove unused call to gobject.thread_init()

There are no threads involved.

* task: switch to PyGObject

Python-gobject-2 is deprecated.

* travis: update dependencies for PyGObject and GLib-2.0

* README: Add GObject Introspection
2018-05-24 17:11:37 +02:00
Andreas Oberritter
a5e3b0d325 task: implement logging 2018-05-10 03:48:46 +02:00
JoeLametta
4280dbfafc Convert except X, T to except X as T 2018-05-08 18:39:08 +02:00
JoeLametta
44ece38740 In Python 3 print is a function 2018-05-08 18:39:08 +02:00
Samantha Baldwin
09de58852e Revert "Convert docstrings to reStructuredText"
This reverts commit 3b1bd242d0.
2018-03-02 16:47:12 -05:00
JoeLametta
3b1bd242d0 Convert docstrings to reStructuredText
This commit also includes:

  - whitespace / code formatting fixes
  - slight syntax related changes: except <exception_name>, e -> except <exception_name> as e
  - 3 pointless instructions instances have been rewritten [sorted] (spotted by semi-automatic check)

The unrelated changes shouldn't have any real impact on whipper's behaviour.
2018-01-12 11:42:24 +01:00
JoeLametta
b6fb7e8a86 Solve all flake8 warnings (#163)
Whipper is now fully PEP8 compliant.
Revised version which includes all the changes suggested by Freso.
2017-05-31 23:09:36 +02:00
Frederik “Freso” S. Olesen
52731e97c0 Remove old, commented out code
Some of this seems to be debug code which has been left in, some of it
seems to just be old code that was commented out and never put back in
and probably just forgotten about. Either way, we use git for a reason,
so there's no need for these code snippets to stick around. The code
history can be inspected and old code retrieved that way.
2017-05-19 19:05:11 +02:00
Frederik “Freso” S. Olesen
a20c25258d Remove "Morituri - for those about to RIP" lines. 2017-04-26 23:08:50 +02:00
Frederik “Freso” S. Olesen
ff309e468c Rename "morituri" module to "whipper".
Fixes https://github.com/JoeLametta/whipper/issues/100
2017-04-26 23:08:28 +02:00