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
8ade0c20
Commit
8ade0c20
authored
Oct 09, 2015
by
MinchinWeb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix PEP257 D400 (selected)
First line should end with a period
parent
3f7c7fda
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
19 additions
and
24 deletions
+19
-24
test/TestAddCommand.py
test/TestAddCommand.py
+2
-2
test/TestFilter.py
test/TestFilter.py
+3
-3
test/TestListCommand.py
test/TestListCommand.py
+1
-1
test/TestSortCommand.py
test/TestSortCommand.py
+1
-1
test/TestSorter.py
test/TestSorter.py
+5
-5
topydo/Commands.py
topydo/Commands.py
+1
-2
topydo/commands/TagCommand.py
topydo/commands/TagCommand.py
+1
-1
topydo/lib/Graph.py
topydo/lib/Graph.py
+3
-6
topydo/lib/MultiCommand.py
topydo/lib/MultiCommand.py
+1
-1
topydo/lib/TodoList.py
topydo/lib/TodoList.py
+1
-2
No files found.
test/TestAddCommand.py
View file @
8ade0c20
...
...
@@ -226,7 +226,7 @@ class AddCommandTest(CommandTest):
def
test_add_dep09
(
self
):
"""
The text ID shown after adding and after an 'ls' must be equal.
"
The text ID shown after adding and after an 'ls' must be equal.
By appending the parent's projects, the textual ID may change.
"""
config
(
"test/data/todolist-uid-projects.conf"
)
...
...
@@ -249,7 +249,7 @@ class AddCommandTest(CommandTest):
def
test_add_dep10
(
self
):
"""
The text ID shown after adding and after an 'ls' must be equal.
"
The text ID shown after adding and after an 'ls' must be equal.
By appending the parent's contexts, the textual ID may change.
"""
config
(
"test/data/todolist-uid-contexts.conf"
)
...
...
test/TestFilter.py
View file @
8ade0c20
...
...
@@ -90,7 +90,7 @@ class FilterTest(TopydoTest):
todolist_to_string
(
reference
))
def
test_filter09
(
self
):
""" Test instance filter """
""" Test instance filter
.
"""
todos
=
load_file
(
'test/data/FilterTest1.txt'
)
instance_filter
=
Filter
.
InstanceFilter
(
todos
[
2
:])
...
...
@@ -99,7 +99,7 @@ class FilterTest(TopydoTest):
self
.
assertEqual
(
todos
[
2
:],
filtered_todos
)
def
test_filter10
(
self
):
""" Test instance filter """
""" Test instance filter
.
"""
todos
=
load_file
(
'test/data/FilterTest1.txt'
)
instance_filter
=
Filter
.
InstanceFilter
([])
...
...
@@ -108,7 +108,7 @@ class FilterTest(TopydoTest):
self
.
assertEqual
([],
filtered_todos
)
def
test_filter11
(
self
):
""" Test instance filter """
""" Test instance filter
.
"""
todos
=
load_file
(
'test/data/FilterTest1.txt'
)
instance_filter
=
Filter
.
InstanceFilter
(
todos
[
2
:])
...
...
test/TestListCommand.py
View file @
8ade0c20
...
...
@@ -241,7 +241,7 @@ class ListCommandUnicodeTest(CommandTest):
self
.
todolist
=
load_file_to_todolist
(
"test/data/ListCommandUnicodeTest.txt"
)
def
test_list_unicode1
(
self
):
""" Unicode filters
"""
""" Unicode filters
.
"""
command
=
ListCommand
([
u
(
"
\
u25c4
"
)],
self
.
todolist
,
self
.
out
,
self
.
error
)
command
.
execute
()
...
...
test/TestSortCommand.py
View file @
8ade0c20
...
...
@@ -28,7 +28,7 @@ class SortCommandTest(CommandTest):
self
.
todolist
=
load_file_to_todolist
(
"test/data/SorterTest1.txt"
)
def
test_sort1
(
self
):
""" Alphabetically sorted """
""" Alphabetically sorted
.
"""
command
=
SortCommand
([
"text"
],
self
.
todolist
,
self
.
out
,
self
.
error
)
command
.
execute
()
...
...
test/TestSorter.py
View file @
8ade0c20
...
...
@@ -38,7 +38,7 @@ class SorterTest(TopydoTest):
self
.
assertEqual
(
todolist_to_string
(
todos
),
text_before
)
def
test_sort01
(
self
):
""" Alphabetically sorted """
""" Alphabetically sorted
.
"""
sorter
=
Sorter
(
'text'
)
self
.
sort_file
(
'test/data/SorterTest1.txt'
,
'test/data/SorterTest1-result.txt'
,
sorter
)
...
...
@@ -69,19 +69,19 @@ class SorterTest(TopydoTest):
'test/data/SorterTest3-result.txt'
,
sorter
)
def
test_sort04
(
self
):
""" Ascendingly sorted by due date """
""" Ascendingly sorted by due date
.
"""
sorter
=
Sorter
(
config
().
tag_due
())
self
.
sort_file
(
'test/data/SorterTest4.txt'
,
'test/data/SorterTest4-result.txt'
,
sorter
)
def
test_sort05
(
self
):
""" Descendingly sorted by due date """
""" Descendingly sorted by due date
.
"""
sorter
=
Sorter
(
'desc:due'
)
self
.
sort_file
(
'test/data/SorterTest5.txt'
,
'test/data/SorterTest5-result.txt'
,
sorter
)
def
test_sort06
(
self
):
""" Ascendingly sorted by creation date """
""" Ascendingly sorted by creation date
.
"""
sorter
=
Sorter
(
'creation'
)
self
.
sort_file
(
'test/data/SorterTest6.txt'
,
'test/data/SorterTest6-result.txt'
,
sorter
)
...
...
@@ -93,7 +93,7 @@ class SorterTest(TopydoTest):
'test/data/SorterTest7-result.txt'
,
sorter
)
def
test_sort08
(
self
):
""" Descendingly sorted by importance """
""" Descendingly sorted by importance
.
"""
sorter
=
Sorter
(
'desc:importance'
)
self
.
sort_file
(
'test/data/SorterTest8.txt'
,
'test/data/SorterTest8-result.txt'
,
sorter
)
...
...
topydo/Commands.py
View file @
8ade0c20
...
...
@@ -55,8 +55,7 @@ _SUBCOMMAND_MAP = {
def
get_subcommand
(
p_args
):
"""
Retrieves the to-be executed Command and returns a tuple
(Command, args).
Retrieves the to-be executed Command and returns a tuple (Command, args).
If args is an empty list, then the Command that corresponds with the
default command specified in the configuration will be returned.
...
...
topydo/commands/TagCommand.py
View file @
8ade0c20
...
...
@@ -68,7 +68,7 @@ class TagCommand(Command):
def
_choose
(
self
):
"""
Returns the chosen number of the tag value to process (or "all")
Returns the chosen number of the tag value to process (or "all")
.
"""
answer
=
"all"
...
...
topydo/lib/Graph.py
View file @
8ade0c20
...
...
@@ -38,8 +38,7 @@ class DirectedGraph(object):
def
add_edge
(
self
,
p_from
,
p_to
,
p_id
=
None
):
"""
Adds an edge to the graph. The nodes will be added if they don't
exist.
Adds an edge to the graph. The nodes will be added if they don't exist.
The p_id is the id of the edge, if the client wishes to maintain this.
"""
...
...
@@ -61,15 +60,13 @@ class DirectedGraph(object):
def
incoming_neighbors
(
self
,
p_id
,
p_recursive
=
False
):
"""
Returns a set of the direct neighbors that can reach the given
node.
Returns a set of the direct neighbors that can reach the given node.
"""
return
self
.
reachable_nodes_reverse
(
p_id
,
p_recursive
)
def
outgoing_neighbors
(
self
,
p_id
,
p_recursive
=
False
):
"""
Returns the set of the direct neighbors that the given node can
reach.
Returns the set of the direct neighbors that the given node can reach.
"""
return
self
.
reachable_nodes
(
p_id
,
p_recursive
)
...
...
topydo/lib/MultiCommand.py
View file @
8ade0c20
...
...
@@ -63,7 +63,7 @@ class MultiCommand(ExpressionCommand):
self
.
todos
=
self
.
_view
().
todos
def
get_todos
(
self
):
""" Gets todo objects from supplied todo IDs """
""" Gets todo objects from supplied todo IDs
.
"""
if
self
.
is_expression
:
self
.
get_todos_from_expr
()
else
:
...
...
topydo/lib/TodoList.py
View file @
8ade0c20
...
...
@@ -114,8 +114,7 @@ class TodoList(TodoListBase):
"""
def
id_exists
(
p_id
):
"""
Returns True if there exists a todo with the given parent
ID.
Returns True if there exists a todo with the given parent ID.
"""
for
todo
in
self
.
_todos
:
if
todo
.
has_tag
(
'id'
,
str
(
p_id
)):
...
...
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