Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
topydo
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
topydo
Commits
19b5623a
Commit
19b5623a
authored
Dec 31, 2015
by
Bram Schoenmakers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Call super() without parameters now we support Python 3 only
parent
2578521a
Changes
49
Show whitespace changes
Inline
Side-by-side
Showing
49 changed files
with
78 additions
and
78 deletions
+78
-78
test/command_testcase.py
test/command_testcase.py
+1
-1
test/test_add_command.py
test/test_add_command.py
+1
-1
test/test_append_command.py
test/test_append_command.py
+1
-1
test/test_delete_command.py
test/test_delete_command.py
+1
-1
test/test_dep_command.py
test/test_dep_command.py
+1
-1
test/test_depri_command.py
test/test_depri_command.py
+1
-1
test/test_do_command.py
test/test_do_command.py
+1
-1
test/test_edit_command.py
test/test_edit_command.py
+1
-1
test/test_filter.py
test/test_filter.py
+4
-4
test/test_graph.py
test/test_graph.py
+1
-1
test/test_list_command.py
test/test_list_command.py
+2
-2
test/test_list_format.py
test/test_list_format.py
+1
-1
test/test_postpone_command.py
test/test_postpone_command.py
+1
-1
test/test_priority_command.py
test/test_priority_command.py
+1
-1
test/test_recurrence.py
test/test_recurrence.py
+1
-1
test/test_relative_date.py
test/test_relative_date.py
+1
-1
test/test_revert_command.py
test/test_revert_command.py
+1
-1
test/test_sort_command.py
test/test_sort_command.py
+1
-1
test/test_tag_command.py
test/test_tag_command.py
+1
-1
test/test_todo_list.py
test/test_todo_list.py
+3
-3
topydo/cli/CLI.py
topydo/cli/CLI.py
+1
-1
topydo/cli/Prompt.py
topydo/cli/Prompt.py
+1
-1
topydo/commands/AddCommand.py
topydo/commands/AddCommand.py
+2
-2
topydo/commands/AppendCommand.py
topydo/commands/AppendCommand.py
+2
-2
topydo/commands/ArchiveCommand.py
topydo/commands/ArchiveCommand.py
+1
-1
topydo/commands/DeleteCommand.py
topydo/commands/DeleteCommand.py
+1
-1
topydo/commands/DepCommand.py
topydo/commands/DepCommand.py
+2
-2
topydo/commands/DepriCommand.py
topydo/commands/DepriCommand.py
+1
-1
topydo/commands/DoCommand.py
topydo/commands/DoCommand.py
+3
-3
topydo/commands/EditCommand.py
topydo/commands/EditCommand.py
+1
-1
topydo/commands/ExitCommand.py
topydo/commands/ExitCommand.py
+2
-2
topydo/commands/ListCommand.py
topydo/commands/ListCommand.py
+3
-3
topydo/commands/ListContextCommand.py
topydo/commands/ListContextCommand.py
+2
-2
topydo/commands/ListProjectCommand.py
topydo/commands/ListProjectCommand.py
+2
-2
topydo/commands/PostponeCommand.py
topydo/commands/PostponeCommand.py
+1
-1
topydo/commands/PriorityCommand.py
topydo/commands/PriorityCommand.py
+1
-1
topydo/commands/RevertCommand.py
topydo/commands/RevertCommand.py
+2
-2
topydo/commands/SortCommand.py
topydo/commands/SortCommand.py
+2
-2
topydo/commands/TagCommand.py
topydo/commands/TagCommand.py
+2
-2
topydo/lib/DCommand.py
topydo/lib/DCommand.py
+1
-1
topydo/lib/ExpressionCommand.py
topydo/lib/ExpressionCommand.py
+1
-1
topydo/lib/Filter.py
topydo/lib/Filter.py
+10
-10
topydo/lib/IcalPrinter.py
topydo/lib/IcalPrinter.py
+1
-1
topydo/lib/JsonPrinter.py
topydo/lib/JsonPrinter.py
+1
-1
topydo/lib/MultiCommand.py
topydo/lib/MultiCommand.py
+2
-2
topydo/lib/PrettyPrinter.py
topydo/lib/PrettyPrinter.py
+1
-1
topydo/lib/TodoList.py
topydo/lib/TodoList.py
+1
-1
topydo/lib/prettyprinters/Format.py
topydo/lib/prettyprinters/Format.py
+1
-1
topydo/lib/prettyprinters/Numbers.py
topydo/lib/prettyprinters/Numbers.py
+1
-1
No files found.
test/command_testcase.py
View file @
19b5623a
...
...
@@ -20,7 +20,7 @@ from topydo.lib.Utils import escape_ansi
class
CommandTest
(
TopydoTest
):
def
__init__
(
self
,
*
args
,
**
kwargs
):
super
(
CommandTest
,
self
).
__init__
(
*
args
,
**
kwargs
)
super
().
__init__
(
*
args
,
**
kwargs
)
self
.
output
=
""
self
.
errors
=
""
...
...
test/test_add_command.py
View file @
19b5623a
...
...
@@ -33,7 +33,7 @@ except ImportError:
class
AddCommandTest
(
CommandTest
):
def
setUp
(
self
):
super
(
AddCommandTest
,
self
).
setUp
()
super
().
setUp
()
self
.
todolist
=
TodoList
.
TodoList
([])
self
.
today
=
date
.
today
().
isoformat
()
...
...
test/test_append_command.py
View file @
19b5623a
...
...
@@ -23,7 +23,7 @@ from topydo.lib.TodoList import TodoList
class
AppendCommandTest
(
CommandTest
):
def
setUp
(
self
):
super
(
AppendCommandTest
,
self
).
setUp
()
super
().
setUp
()
self
.
todolist
=
TodoList
([])
self
.
todolist
.
add
(
"Foo"
)
...
...
test/test_delete_command.py
View file @
19b5623a
...
...
@@ -33,7 +33,7 @@ def _no_prompt(self):
class
DeleteCommandTest
(
CommandTest
):
def
setUp
(
self
):
super
(
DeleteCommandTest
,
self
).
setUp
()
super
().
setUp
()
todos
=
[
"Foo id:1"
,
"Bar p:1"
,
...
...
test/test_dep_command.py
View file @
19b5623a
...
...
@@ -23,7 +23,7 @@ from topydo.lib.TodoList import TodoList
class
DepCommandTest
(
CommandTest
):
def
setUp
(
self
):
super
(
DepCommandTest
,
self
).
setUp
()
super
().
setUp
()
todos
=
[
"Foo id:1"
,
"Bar p:1"
,
...
...
test/test_depri_command.py
View file @
19b5623a
...
...
@@ -23,7 +23,7 @@ from topydo.lib.TodoList import TodoList
class
DepriCommandTest
(
CommandTest
):
def
setUp
(
self
):
super
(
DepriCommandTest
,
self
).
setUp
()
super
().
setUp
()
todos
=
[
"(A) Foo"
,
"Bar"
,
...
...
test/test_do_command.py
View file @
19b5623a
...
...
@@ -32,7 +32,7 @@ def _no_prompt(self):
class
DoCommandTest
(
CommandTest
):
def
setUp
(
self
):
super
(
DoCommandTest
,
self
).
setUp
()
super
().
setUp
()
todos
=
[
"Foo id:1"
,
"Bar p:1"
,
...
...
test/test_edit_command.py
View file @
19b5623a
...
...
@@ -33,7 +33,7 @@ except ImportError:
class
EditCommandTest
(
CommandTest
):
def
setUp
(
self
):
super
(
EditCommandTest
,
self
).
setUp
()
super
().
setUp
()
todos
=
[
"Foo id:1"
,
"Bar p:1 @test"
,
...
...
test/test_filter.py
View file @
19b5623a
...
...
@@ -301,7 +301,7 @@ class FilterTest(TopydoTest):
class
OrdinalTagFilterTest
(
TopydoTest
):
def
setUp
(
self
):
super
(
OrdinalTagFilterTest
,
self
).
setUp
()
super
().
setUp
()
today
=
date
.
today
()
tomorrow
=
today
+
timedelta
(
1
)
...
...
@@ -381,7 +381,7 @@ class OrdinalTagFilterTest(TopydoTest):
class
CreationFilterTest
(
TopydoTest
):
def
setUp
(
self
):
super
(
CreationFilterTest
,
self
).
setUp
()
super
().
setUp
()
self
.
todo1
=
"2015-12-19 With creation date."
self
.
todo2
=
"Without creation date."
...
...
@@ -415,7 +415,7 @@ class CreationFilterTest(TopydoTest):
class
CompletionFilterTest
(
TopydoTest
):
def
setUp
(
self
):
super
(
CompletionFilterTest
,
self
).
setUp
()
super
().
setUp
()
self
.
todo1
=
"2015-12-19 With creation date."
self
.
todo2
=
"x 2015-12-19 2015-12-18 Without creation date."
...
...
@@ -459,7 +459,7 @@ class CompletionFilterTest(TopydoTest):
class
PriorityFilterTest
(
TopydoTest
):
def
setUp
(
self
):
super
(
PriorityFilterTest
,
self
).
setUp
()
super
().
setUp
()
self
.
todo1
=
"(A) Foo"
self
.
todo2
=
"(B) Bar"
...
...
test/test_graph.py
View file @
19b5623a
...
...
@@ -22,7 +22,7 @@ from topydo.lib.Graph import DirectedGraph
class
GraphTest
(
TopydoTest
):
def
setUp
(
self
):
super
(
GraphTest
,
self
).
setUp
()
super
().
setUp
()
self
.
graph
=
DirectedGraph
()
...
...
test/test_list_command.py
View file @
19b5623a
...
...
@@ -35,7 +35,7 @@ except ImportError:
class
ListCommandTest
(
CommandTest
):
def
setUp
(
self
):
super
(
ListCommandTest
,
self
).
setUp
()
super
().
setUp
()
self
.
todolist
=
load_file_to_todolist
(
"test/data/ListCommandTest.txt"
)
self
.
terminal_size
=
namedtuple
(
'terminal_size'
,
[
'columns'
,
'lines'
])
...
...
@@ -397,7 +397,7 @@ class ListCommandTest(CommandTest):
class
ListCommandUnicodeTest
(
CommandTest
):
def
setUp
(
self
):
super
(
ListCommandUnicodeTest
,
self
).
setUp
()
super
().
setUp
()
self
.
todolist
=
load_file_to_todolist
(
"test/data/ListCommandUnicodeTest.txt"
)
def
test_list_unicode1
(
self
):
...
...
test/test_list_format.py
View file @
19b5623a
...
...
@@ -36,7 +36,7 @@ except ImportError:
@
freeze_time
(
"2015, 11, 06"
)
class
ListFormatTest
(
CommandTest
):
def
setUp
(
self
):
super
(
ListFormatTest
,
self
).
setUp
()
super
().
setUp
()
self
.
todolist
=
load_file_to_todolist
(
"test/data/ListFormat.txt"
)
self
.
terminal_size
=
namedtuple
(
'terminal_size'
,
[
'columns'
,
'lines'
])
...
...
test/test_postpone_command.py
View file @
19b5623a
...
...
@@ -24,7 +24,7 @@ from topydo.lib.TodoList import TodoList
class
PostponeCommandTest
(
CommandTest
):
def
setUp
(
self
):
super
(
PostponeCommandTest
,
self
).
setUp
()
super
().
setUp
()
self
.
today
=
date
.
today
()
self
.
past
=
date
.
today
()
-
timedelta
(
1
)
self
.
future
=
date
.
today
()
+
timedelta
(
1
)
...
...
test/test_priority_command.py
View file @
19b5623a
...
...
@@ -23,7 +23,7 @@ from topydo.lib.TodoList import TodoList
class
PriorityCommandTest
(
CommandTest
):
def
setUp
(
self
):
super
(
PriorityCommandTest
,
self
).
setUp
()
super
().
setUp
()
todos
=
[
"(A) Foo"
,
"Bar"
,
...
...
test/test_recurrence.py
View file @
19b5623a
...
...
@@ -25,7 +25,7 @@ from topydo.lib.Todo import Todo
class
RecurrenceTest
(
TopydoTest
):
def
setUp
(
self
):
super
(
RecurrenceTest
,
self
).
setUp
()
super
().
setUp
()
self
.
todo
=
Todo
(
"Test rec:1w"
)
self
.
stricttodo
=
Todo
(
"Test rec:+1w"
)
...
...
test/test_relative_date.py
View file @
19b5623a
...
...
@@ -25,7 +25,7 @@ from topydo.lib.RelativeDate import relative_date_to_date
@
freeze_time
(
'2015, 11, 06'
)
class
RelativeDateTester
(
TopydoTest
):
def
setUp
(
self
):
super
(
RelativeDateTester
,
self
).
setUp
()
super
().
setUp
()
self
.
yesterday
=
date
(
2015
,
11
,
5
)
self
.
today
=
date
(
2015
,
11
,
6
)
self
.
tomorrow
=
date
(
2015
,
11
,
7
)
...
...
test/test_revert_command.py
View file @
19b5623a
...
...
@@ -35,7 +35,7 @@ from topydo.lib.TodoList import TodoList
class
RevertCommandTest
(
CommandTest
):
def
setUp
(
self
):
super
(
RevertCommandTest
,
self
).
setUp
()
super
().
setUp
()
todos
=
[
"Foo"
,
"Bar"
,
...
...
test/test_sort_command.py
View file @
19b5623a
...
...
@@ -24,7 +24,7 @@ from topydo.lib.Config import config
class
SortCommandTest
(
CommandTest
):
def
setUp
(
self
):
super
(
SortCommandTest
,
self
).
setUp
()
super
().
setUp
()
self
.
todolist
=
load_file_to_todolist
(
"test/data/SorterTest1.txt"
)
def
test_sort1
(
self
):
...
...
test/test_tag_command.py
View file @
19b5623a
...
...
@@ -24,7 +24,7 @@ from topydo.lib.TodoList import TodoList
class
TagCommandTest
(
CommandTest
):
def
setUp
(
self
):
super
(
TagCommandTest
,
self
).
setUp
()
super
().
setUp
()
todos
=
[
"Foo"
,
"Bar due:2014-10-22"
,
...
...
test/test_todo_list.py
View file @
19b5623a
...
...
@@ -29,7 +29,7 @@ from topydo.lib.TodoListBase import InvalidTodoException, TodoListBase
class
TodoListTester
(
TopydoTest
):
def
setUp
(
self
):
super
(
TodoListTester
,
self
).
setUp
()
super
().
setUp
()
self
.
todofile
=
TodoFile
(
'test/data/TodoListTest.txt'
)
lines
=
[
line
for
line
in
self
.
todofile
.
read
()
...
...
@@ -230,7 +230,7 @@ class TodoListTester(TopydoTest):
class TodoListDependencyTester(TopydoTest):
def setUp(self):
super(
TodoListDependencyTester, self
).setUp()
super().setUp()
self.todolist = TodoList([])
self.todolist.add("Foo id:1")
...
...
@@ -383,7 +383,7 @@ class TodoListCleanDependencyTester(TopydoTest):
"""
def setUp(self):
super(
TodoListCleanDependencyTester, self
).setUp()
super().setUp()
self.todolist = TodoList([])
def test_clean_dependencies1(self):
...
...
topydo/cli/CLI.py
View file @
19b5623a
...
...
@@ -41,7 +41,7 @@ class CLIApplication(CLIApplicationBase):
"""
def
__init__
(
self
):
super
(
CLIApplication
,
self
).
__init__
()
super
().
__init__
()
def
run
(
self
):
""" Main entry function. """
...
...
topydo/cli/Prompt.py
View file @
19b5623a
...
...
@@ -59,7 +59,7 @@ class PromptApplication(CLIApplicationBase):
"""
def
__init__
(
self
):
super
(
PromptApplication
,
self
).
__init__
()
super
().
__init__
()
self
.
_process_flags
()
self
.
mtime
=
None
...
...
topydo/commands/AddCommand.py
View file @
19b5623a
...
...
@@ -34,7 +34,7 @@ class AddCommand(Command):
p_out
=
lambda
a
:
None
,
p_err
=
lambda
a
:
None
,
p_prompt
=
lambda
a
:
None
):
super
(
AddCommand
,
self
).
__init__
(
super
().
__init__
(
p_args
,
p_todolist
,
p_out
,
p_err
,
p_prompt
)
self
.
text
=
' '
.
join
(
p_args
)
self
.
from_file
=
None
...
...
@@ -119,7 +119,7 @@ class AddCommand(Command):
def
execute
(
self
):
""" Adds a todo item to the list. """
if
not
super
(
AddCommand
,
self
).
execute
():
if
not
super
().
execute
():
return
False
self
.
printer
.
add_filter
(
PrettyPrinterNumbers
(
self
.
todolist
))
...
...
topydo/commands/AppendCommand.py
View file @
19b5623a
...
...
@@ -24,11 +24,11 @@ class AppendCommand(Command):
p_out
=
lambda
a
:
None
,
p_err
=
lambda
a
:
None
,
p_prompt
=
lambda
a
:
None
):
super
(
AppendCommand
,
self
).
__init__
(
p_args
,
p_todolist
,
p_out
,
p_err
,
super
().
__init__
(
p_args
,
p_todolist
,
p_out
,
p_err
,
p_prompt
)
def
execute
(
self
):
if
not
super
(
AppendCommand
,
self
).
execute
():
if
not
super
().
execute
():
return
False
try
:
...
...
topydo/commands/ArchiveCommand.py
View file @
19b5623a
...
...
@@ -27,7 +27,7 @@ class ArchiveCommand(Command):
TodoListBase class which does no dependency checking, so a better
choice for huge done.txt files.
"""
super
(
ArchiveCommand
,
self
).
__init__
([],
p_todolist
)
super
().
__init__
([],
p_todolist
)
self
.
archive
=
p_archive_list
def
execute
(
self
):
...
...
topydo/commands/DeleteCommand.py
View file @
19b5623a
...
...
@@ -22,7 +22,7 @@ class DeleteCommand(DCommand):
p_out
=
lambda
a
:
None
,
p_err
=
lambda
a
:
None
,
p_prompt
=
lambda
a
:
None
):
super
(
DeleteCommand
,
self
).
__init__
(
super
().
__init__
(
p_args
,
p_todolist
,
p_out
,
p_err
,
p_prompt
)
def
prompt_text
(
self
):
...
...
topydo/commands/DepCommand.py
View file @
19b5623a
...
...
@@ -28,7 +28,7 @@ class DepCommand(Command):
p_out
=
lambda
a
:
None
,
p_err
=
lambda
a
:
None
,
p_prompt
=
lambda
a
:
None
):
super
(
DepCommand
,
self
).
__init__
(
super
().
__init__
(
p_args
,
p_todolist
,
p_out
,
p_err
,
p_prompt
)
try
:
...
...
@@ -109,7 +109,7 @@ class DepCommand(Command):
self
.
error
(
self
.
usage
())
def
execute
(
self
):
if
not
super
(
DepCommand
,
self
).
execute
():
if
not
super
().
execute
():
return
False
dispatch
=
{
...
...
topydo/commands/DepriCommand.py
View file @
19b5623a
...
...
@@ -23,7 +23,7 @@ class DepriCommand(MultiCommand):
p_out
=
lambda
a
:
None
,
p_err
=
lambda
a
:
None
,
p_prompt
=
lambda
a
:
None
):
super
(
DepriCommand
,
self
).
__init__
(
super
().
__init__
(
p_args
,
p_todolist
,
p_out
,
p_err
,
p_prompt
)
def
_execute_multi_specific
(
self
):
...
...
topydo/commands/DoCommand.py
View file @
19b5623a
...
...
@@ -33,17 +33,17 @@ class DoCommand(DCommand):
self
.
strict_recurrence
=
False
self
.
completion_date
=
date
.
today
()
super
(
DoCommand
,
self
).
__init__
(
super
().
__init__
(
p_args
,
p_todolist
,
p_out
,
p_err
,
p_prompt
)
def
get_flags
(
self
):
""" Additional flags. """
opts
,
long_opts
=
super
(
DoCommand
,
self
).
get_flags
()
opts
,
long_opts
=
super
().
get_flags
()
return
(
"d:s"
+
opts
,
[
"date="
,
"strict"
]
+
long_opts
)
def
process_flag
(
self
,
p_opt
,
p_value
):
super
(
DoCommand
,
self
).
process_flag
(
p_opt
,
p_value
)
super
().
process_flag
(
p_opt
,
p_value
)
if
p_opt
==
"-s"
or
p_opt
==
"--strict"
:
self
.
strict_recurrence
=
True
...
...
topydo/commands/EditCommand.py
View file @
19b5623a
...
...
@@ -39,7 +39,7 @@ def _is_edited(p_orig_mtime, p_file):
class
EditCommand
(
MultiCommand
):
def
__init__
(
self
,
p_args
,
p_todolist
,
p_output
,
p_error
,
p_input
):
super
(
EditCommand
,
self
).
__init__
(
p_args
,
p_todolist
,
p_output
,
super
().
__init__
(
p_args
,
p_todolist
,
p_output
,
p_error
,
p_input
)
if
len
(
self
.
args
)
==
0
:
...
...
topydo/commands/ExitCommand.py
View file @
19b5623a
...
...
@@ -26,11 +26,11 @@ class ExitCommand(Command):
"""
def
__init__
(
self
,
p_args
,
p_todolist
,
p_output
,
p_error
,
p_input
):
super
(
ExitCommand
,
self
).
__init__
(
p_args
,
p_todolist
,
p_output
,
p_error
,
super
().
__init__
(
p_args
,
p_todolist
,
p_output
,
p_error
,
p_input
)
def
execute
(
self
):
if
not
super
(
ExitCommand
,
self
).
execute
():
if
not
super
().
execute
():
return
False
sys
.
exit
(
0
)
topydo/commands/ListCommand.py
View file @
19b5623a
...
...
@@ -28,7 +28,7 @@ class ListCommand(ExpressionCommand):
p_out
=
lambda
a
:
None
,
p_err
=
lambda
a
:
None
,
p_prompt
=
lambda
a
:
None
):
super
(
ListCommand
,
self
).
__init__
(
super
().
__init__
(
p_args
,
p_todolist
,
p_out
,
p_err
,
p_prompt
)
self
.
printer
=
None
...
...
@@ -92,7 +92,7 @@ class ListCommand(ExpressionCommand):
Additional filters to select particular todo items given with the -i
flag.
"""
filters
=
super
(
ListCommand
,
self
).
_filters
()
filters
=
super
().
_filters
()
if
self
.
ids
:
def
get_todo
(
p_id
):
...
...
@@ -132,7 +132,7 @@ class ListCommand(ExpressionCommand):
self
.
out
(
self
.
printer
.
print_list
(
self
.
_view
().
todos
))
def
execute
(
self
):
if
not
super
(
ListCommand
,
self
).
execute
():
if
not
super
().
execute
():
return
False
try
:
...
...
topydo/commands/ListContextCommand.py
View file @
19b5623a
...
...
@@ -22,11 +22,11 @@ class ListContextCommand(Command):
p_out
=
lambda
a
:
None
,
p_err
=
lambda
a
:
None
,
p_prompt
=
lambda
a
:
None
):
super
(
ListContextCommand
,
self
).
__init__
(
super
().
__init__
(
p_args
,
p_todolist
,
p_out
,
p_err
,
p_prompt
)
def
execute
(
self
):
if
not
super
(
ListContextCommand
,
self
).
execute
():
if
not
super
().
execute
():
return
False
for
context
in
sorted
(
self
.
todolist
.
contexts
(),
key
=
lambda
s
:
s
.
lower
()):
...
...
topydo/commands/ListProjectCommand.py
View file @
19b5623a
...
...
@@ -22,11 +22,11 @@ class ListProjectCommand(Command):
p_out
=
lambda
a
:
None
,
p_err
=
lambda
a
:
None
,
p_prompt
=
lambda
a
:
None
):
super
(
ListProjectCommand
,
self
).
__init__
(
super
().
__init__
(
p_args
,
p_todolist
,
p_out
,
p_err
,
p_prompt
)
def
execute
(
self
):
if
not
super
(
ListProjectCommand
,
self
).
execute
():
if
not
super
().
execute
():
return
False
for
project
in
sorted
(
self
.
todolist
.
projects
(),
key
=
lambda
s
:
s
.
lower
()):
...
...
topydo/commands/PostponeCommand.py
View file @
19b5623a
...
...
@@ -28,7 +28,7 @@ class PostponeCommand(MultiCommand):
p_out
=
lambda
a
:
None
,
p_err
=
lambda
a
:
None
,
p_prompt
=
lambda
a
:
None
):
super
(
PostponeCommand
,
self
).
__init__
(
super
().
__init__
(
p_args
,
p_todolist
,
p_out
,
p_err
,
p_prompt
)
self
.
move_start_date
=
False
...
...
topydo/commands/PriorityCommand.py
View file @
19b5623a
...
...
@@ -26,7 +26,7 @@ class PriorityCommand(MultiCommand):
p_out
=
lambda
a
:
None
,
p_err
=
lambda
a
:
None
,
p_prompt
=
lambda
a
:
None
):
super
(
PriorityCommand
,
self
).
__init__
(
super
().
__init__
(
p_args
,
p_todolist
,
p_out
,
p_err
,
p_prompt
)
self
.
last_argument
=
True
...
...
topydo/commands/RevertCommand.py
View file @
19b5623a
...
...
@@ -25,11 +25,11 @@ class RevertCommand(Command):
p_out
=
lambda
a
:
None
,
p_err
=
lambda
a
:
None
,
p_prompt
=
lambda
a
:
None
):
super
(
RevertCommand
,
self
).
__init__
(
p_args
,
p_todolist
,
p_out
,
p_err
,
super
().
__init__
(
p_args
,
p_todolist
,
p_out
,
p_err
,
p_prompt
)
def
execute
(
self
):
if
not
super
(
RevertCommand
,
self
).
execute
():
if
not
super
().
execute
():
return
False
archive_file
=
TodoFile
.
TodoFile
(
config
().
archive
())
...
...
topydo/commands/SortCommand.py
View file @
19b5623a
...
...
@@ -24,11 +24,11 @@ class SortCommand(Command):
p_out
=
lambda
a
:
None
,
p_err
=
lambda
a
:
None
,
p_prompt
=
lambda
a
:
None
):
super
(
SortCommand
,
self
).
__init__
(
super
().
__init__
(
p_args
,
p_todolist
,
p_out
,
p_err
,
p_prompt
)
def
execute
(
self
):
if
not
super
(
SortCommand
,
self
).
execute
():
if
not
super
().
execute
():
return
False
try
:
...
...
topydo/commands/TagCommand.py
View file @
19b5623a
...
...
@@ -26,7 +26,7 @@ class TagCommand(Command):
p_out
=
lambda
a
:
None
,
p_err
=
lambda
a
:
None
,
p_prompt
=
lambda
a
:
None
):
super
(
TagCommand
,
self
).
__init__
(
super
().
__init__
(
p_args
,
p_todolist
,
p_out
,
p_err
,
p_prompt
)
self
.
force
=
False
...
...
@@ -124,7 +124,7 @@ class TagCommand(Command):
self
.
_print
()
def
execute
(
self
):
if
not
super
(
TagCommand
,
self
).
execute
():
if
not
super
().
execute
():
return
False
self
.
_process_args
()
...
...
topydo/lib/DCommand.py
View file @
19b5623a
...
...
@@ -31,7 +31,7 @@ class DCommand(MultiCommand):
p_out
=
lambda
a
:
None
,
p_err
=
lambda
a
:
None
,
p_prompt
=
lambda
a
:
None
):
super
(
DCommand
,
self
).
__init__
(
super
().
__init__
(
p_args
,
p_todolist
,
p_out
,
p_err
,
p_prompt
)
self
.
force
=
False
...
...
topydo/lib/ExpressionCommand.py
View file @
19b5623a
...
...
@@ -32,7 +32,7 @@ class ExpressionCommand(Command):
p_out
=
lambda
a
:
None
,
p_err
=
lambda
a
:
None
,
p_prompt
=
lambda
a
:
None
):
super
(
ExpressionCommand
,
self
).
__init__
(
super
().
__init__
(
p_args
,
p_todolist
,
p_out
,
p_err
,
p_prompt
)
self
.
sort_expression
=
config
().
sort_string
()
...
...
topydo/lib/Filter.py
View file @
19b5623a
...
...
@@ -62,7 +62,7 @@ class GrepFilter(Filter):
""" Matches when the todo text contains a text. """
def
__init__
(
self
,
p_expression
,
p_case_sensitive
=
None
):
super
(
GrepFilter
,
self
).
__init__
()
super
().
__init__
()
# convert to string in case we receive integers
self
.
expression
=
p_expression
...
...
@@ -115,7 +115,7 @@ class DependencyFilter(Filter):
Pass on a TodoList instance such that the dependencies can be
looked up.
"""
super
(
DependencyFilter
,
self
).
__init__
()
super
().
__init__
()
self
.
todolist
=
p_todolist
def
match
(
self
,
p_todo
):
...
...
@@ -138,7 +138,7 @@ class InstanceFilter(Filter):
This is handy for constructing a view given a plain list of Todo items.
"""
super
(
InstanceFilter
,
self
).
__init__
()
super
().
__init__
()
self
.
todos
=
p_todos
def
match
(
self
,
p_todo
):
...
...
@@ -154,7 +154,7 @@ class InstanceFilter(Filter):
class
LimitFilter
(
Filter
):
def
__init__
(
self
,
p_limit
):
super
(
LimitFilter
,
self
).
__init__
()
super
().
__init__
()
self
.
limit
=
p_limit
def
filter
(
self
,
p_todos
):
...
...
@@ -167,7 +167,7 @@ class OrdinalFilter(Filter):
""" Base class for ordinal filters. """
def
__init__
(
self
,
p_expression
,
p_pattern
):
super
(
OrdinalFilter
,
self
).
__init__
()
super
().
__init__
()
self
.
expression
=
p_expression
...
...
@@ -206,7 +206,7 @@ _ORDINAL_TAG_MATCH = r"(?P<key>[^:]*):" + _OPERATOR_MATCH + _VALUE_MATCH
class OrdinalTagFilter(OrdinalFilter):
def __init__(self, p_expression):
super(
OrdinalTagFilter, self
).__init__(p_expression, _ORDINAL_TAG_MATCH)
super().__init__(p_expression, _ORDINAL_TAG_MATCH)
def match(self, p_todo):
"""
...
...
@@ -247,7 +247,7 @@ class OrdinalTagFilter(OrdinalFilter):
class _DateAttributeFilter(OrdinalFilter):
def __init__(self, p_expression, p_match, p_getter):
super(
_DateAttributeFilter, self
).__init__(p_expression, p_match)
super().__init__(p_expression, p_match)
self.getter = p_getter
def match(self, p_todo):
...
...
@@ -268,7 +268,7 @@ _CREATED_MATCH = r'creat(ion|ed?):' + _OPERATOR_MATCH + _VALUE_MATCH
class CreationFilter(_DateAttributeFilter):
def __init__(self, p_expression):
super(
CreationFilter, self
).__init__(
super().__init__(
p_expression,
_CREATED_MATCH,
lambda t: t.creation_date() # pragma: no branch
...
...
@@ -280,7 +280,7 @@ _COMPLETED_MATCH = r'complet(ed?|ion):' + _OPERATOR_MATCH + _VALUE_MATCH
class CompletionFilter(_DateAttributeFilter):
def __init__(self, p_expression):
super(
CompletionFilter, self
).__init__(
super().__init__(
p_expression,
_COMPLETED_MATCH,
lambda t: t.completion_date() # pragma: no branch
...
...
@@ -292,7 +292,7 @@ _PRIORITY_MATCH = r"\(" + _OPERATOR_MATCH + r"(?P<value>[A-Z]{1})\)"
class PriorityFilter(OrdinalFilter):
def __init__(self, p_expression):
super(
PriorityFilter, self
).__init__(p_expression, _PRIORITY_MATCH)
super().__init__(p_expression, _PRIORITY_MATCH)
def match(self, p_todo):
"""
...
...
topydo/lib/IcalPrinter.py
View file @
19b5623a
...
...
@@ -66,7 +66,7 @@ class IcalPrinter(Printer):
"""
def
__init__
(
self
,
p_todolist
):
super
(
IcalPrinter
,
self
).
__init__
()
super
().
__init__
()
self
.
todolist
=
p_todolist
try
:
...
...
topydo/lib/JsonPrinter.py
View file @
19b5623a
...
...
@@ -52,7 +52,7 @@ class JsonPrinter(Printer):
"""
def
__init__
(
self
):
super
(
JsonPrinter
,
self
).
__init__
()
super
().
__init__
()
def
print_todo
(
self
,
p_todo
):
return
json
.
dumps
(
_convert_todo
(
p_todo
),
ensure_ascii
=
False
,
...
...
topydo/lib/MultiCommand.py
View file @
19b5623a
...
...
@@ -27,7 +27,7 @@ class MultiCommand(ExpressionCommand):
p_out
=
lambda
a
:
None
,
p_err
=
lambda
a
:
None
,
p_prompt
=
lambda
a
:
None
):
super
(
MultiCommand
,
self
).
__init__
(
super
().
__init__
(
p_args
,
p_todolist
,
p_out
,
p_err
,
p_prompt
)
self
.
todos
=
[]
...
...
@@ -114,7 +114,7 @@ class MultiCommand(ExpressionCommand):
raise
NotImplementedError
def
execute
(
self
):
if
not
super
(
MultiCommand
,
self
).
execute
():
if
not
super
().
execute
():
return
False
self
.
_process_flags
()
...
...
topydo/lib/PrettyPrinter.py
View file @
19b5623a
...
...
@@ -50,7 +50,7 @@ class PrettyPrinter(Printer):
"""
Constructor.
"""
super
(
PrettyPrinter
,
self
).
__init__
()
super
().
__init__
()
self
.
filters
=
[]
def
add_filter
(
self
,
p_filter
):
...
...
topydo/lib/TodoList.py
View file @
19b5623a
...
...
@@ -41,7 +41,7 @@ class TodoList(TodoListBase):
self
.
_tododict
=
{}
# hash(todo) to todo lookup
self
.
_depgraph
=
DirectedGraph
()
super
(
TodoList
,
self
).
__init__
(
p_todostrings
)
super
().
__init__
(
p_todostrings
)
def
todo_by_dep_id
(
self
,
p_dep_id
):
"""
...
...
topydo/lib/prettyprinters/Format.py
View file @
19b5623a
...
...
@@ -25,7 +25,7 @@ from topydo.lib.ListFormat import ListFormatParser
class
PrettyPrinterFormatFilter
(
PrettyPrinterFilter
):
def
__init__
(
self
,
p_todolist
,
p_format
=
None
):
super
(
PrettyPrinterFormatFilter
,
self
).
__init__
()
super
().
__init__
()
self
.
parser
=
ListFormatParser
(
p_todolist
,
p_format
)
def
filter
(
self
,
p_todo_str
,
p_todo
):
...
...
topydo/lib/prettyprinters/Numbers.py
View file @
19b5623a
...
...
@@ -23,7 +23,7 @@ class PrettyPrinterNumbers(PrettyPrinterFilter):
""" Prepends the todo's number, retrieved from the todolist. """
def
__init__
(
self
,
p_todolist
):
super
(
PrettyPrinterNumbers
,
self
).
__init__
()
super
().
__init__
()
self
.
todolist
=
p_todolist
def
filter
(
self
,
p_todo_str
,
p_todo
):
...
...
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