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
3f7c7fda
Commit
3f7c7fda
authored
Oct 09, 2015
by
MinchinWeb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix PEP257 D202 (selected)
No blank lines allowed after function docstring
parent
4204a657
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
1 addition
and
23 deletions
+1
-23
test/TestDepCommand.py
test/TestDepCommand.py
+0
-1
test/TestTodoBase.py
test/TestTodoBase.py
+0
-2
test/TestTodoList.py
test/TestTodoList.py
+0
-4
topydo/cli/CLIApplicationBase.py
topydo/cli/CLIApplicationBase.py
+0
-1
topydo/cli/Prompt.py
topydo/cli/Prompt.py
+0
-1
topydo/commands/ListCommand.py
topydo/commands/ListCommand.py
+0
-1
topydo/lib/Filter.py
topydo/lib/Filter.py
+0
-1
topydo/lib/IcalPrinter.py
topydo/lib/IcalPrinter.py
+1
-0
topydo/lib/PrettyPrinter.py
topydo/lib/PrettyPrinter.py
+0
-1
topydo/lib/PrettyPrinterFilter.py
topydo/lib/PrettyPrinterFilter.py
+0
-1
topydo/lib/RelativeDate.py
topydo/lib/RelativeDate.py
+0
-1
topydo/lib/Sorter.py
topydo/lib/Sorter.py
+0
-1
topydo/lib/TodoBase.py
topydo/lib/TodoBase.py
+0
-4
topydo/lib/TodoFile.py
topydo/lib/TodoFile.py
+0
-1
topydo/lib/TodoList.py
topydo/lib/TodoList.py
+0
-2
topydo/lib/TodoListBase.py
topydo/lib/TodoListBase.py
+0
-1
No files found.
test/TestDepCommand.py
View file @
3f7c7fda
...
...
@@ -126,7 +126,6 @@ class DepCommandTest(CommandTest):
Helper function that checks the removal of the dependency from todo 1
to todo 3.
"""
command
=
DepCommand
(
p_args
,
self
.
todolist
,
self
.
out
,
self
.
error
)
command
.
execute
()
...
...
test/TestTodoBase.py
View file @
3f7c7fda
...
...
@@ -110,14 +110,12 @@ class TodoBaseTester(TopydoTest):
def
test_tag_empty_value
(
self
):
""" Tag should not be recorded when there is no value. """
todo
=
TodoBase
(
"(C) Foo foo:"
)
self
.
assertFalse
(
todo
.
has_tag
(
'foo'
))
def
test_tag_empty_key
(
self
):
""" Tag should not be recorded when there is no key. """
todo
=
TodoBase
(
"(C) Foo :bar"
)
self
.
assertFalse
(
todo
.
has_tag
(
''
))
...
...
test/TestTodoList.py
View file @
3f7c7fda
...
...
@@ -216,13 +216,11 @@ class TodoListTester(TopydoTest):
"""
Must be able to handle integers when text identifiers are enabled.
"""
config("test/data/todolist-uid.conf")
self.assertRaises(InvalidTodoException, self.todolist.todo, 1)
def test_new_uid(self):
""" Make sure that item has new text ID after append. """
config("test/data/todolist-uid.conf")
todo = self.todolist.todo('
t5c
')
self.todolist.append(todo, "A")
...
...
@@ -282,7 +280,6 @@ class TodoListDependencyTester(TopydoTest):
Make sure that previous add_dependency invocation stored the
edge_id properly.
"""
todo1 = self.todolist.todo(1)
todo4 = self.todolist.todo(4)
todo5 = self.todolist.todo(5)
...
...
@@ -297,7 +294,6 @@ class TodoListDependencyTester(TopydoTest):
"""
Test that projects are not added double.
"""
todo6 = self.todolist.todo(6)
todo7 = self.todolist.todo(7)
projects = todo7.projects().copy()
...
...
topydo/cli/CLIApplicationBase.py
View file @
3f7c7fda
...
...
@@ -78,7 +78,6 @@ def write(p_file, p_string):
def
error
(
p_string
):
""" Writes an error on the standard error. """
write
(
sys
.
stderr
,
p_string
)
...
...
topydo/cli/Prompt.py
View file @
3f7c7fda
...
...
@@ -72,7 +72,6 @@ class PromptApplication(CLIApplicationBase):
If the modification time of the todo.txt file is equal to the last time
it was checked, nothing will be done.
"""
current_mtime
=
_todotxt_mtime
()
if
not
self
.
todofile
or
self
.
mtime
!=
current_mtime
:
...
...
topydo/commands/ListCommand.py
View file @
3f7c7fda
...
...
@@ -75,7 +75,6 @@ class ListCommand(ExpressionCommand):
printing). If a format was specified on the commandline, this format is
sent to the output.
"""
if
self
.
printer
is
None
:
# create a standard printer with some filters
indent
=
config
().
list_indent
()
...
...
topydo/lib/Filter.py
View file @
3f7c7fda
...
...
@@ -26,7 +26,6 @@ class Filter(object):
Filters a list of todos. Truncates the list after p_limit todo
items (or no maximum limit if omitted).
"""
return
[
t
for
t
in
p_todos
if
self
.
match
(
t
)]
def
match
(
self
,
_
):
...
...
topydo/lib/IcalPrinter.py
View file @
3f7c7fda
...
...
@@ -98,6 +98,7 @@ class IcalPrinter(Printer):
Gets a unique ID from a todo item, stored by the ical tag. If the
tag is not present, a random value is assigned to it and returned.
"""
def
generate_uid
(
p_length
=
4
):
"""
Generates a random string of the given length, used as
...
...
topydo/lib/PrettyPrinter.py
View file @
3f7c7fda
...
...
@@ -73,7 +73,6 @@ class PrettyPrinter(Printer):
def
pretty_printer_factory
(
p_todolist
,
p_additional_filters
=
None
):
""" Returns a pretty printer suitable for the ls and dep subcommands. """
p_additional_filters
=
p_additional_filters
or
[]
printer
=
PrettyPrinter
()
...
...
topydo/lib/PrettyPrinterFilter.py
View file @
3f7c7fda
...
...
@@ -47,7 +47,6 @@ class PrettyPrinterColorFilter(PrettyPrinterFilter):
def
filter
(
self
,
p_todo_str
,
p_todo
):
""" Applies the colors. """
colorscheme
=
Colors
()
priority_colors
=
colorscheme
.
get_priority_colors
()
project_color
=
colorscheme
.
get_project_color
()
...
...
topydo/lib/RelativeDate.py
View file @
3f7c7fda
...
...
@@ -95,7 +95,6 @@ def relative_date_to_date(p_date, p_offset=None):
* 'today' or 'tomorrow'
* days of the week (in full or abbreviated)
"""
result
=
None
p_date
=
p_date
.
lower
()
p_offset
=
p_offset
or
date
.
today
()
...
...
topydo/lib/Sorter.py
View file @
3f7c7fda
...
...
@@ -101,7 +101,6 @@ class Sorter(object):
sort operation is done first, relying on the stability of the sorted()
function.
"""
sorted_todos
=
p_todos
for
function
,
order
in
reversed
(
self
.
functions
):
sorted_todos
=
sorted
(
sorted_todos
,
key
=
function
,
...
...
topydo/lib/TodoBase.py
View file @
3f7c7fda
...
...
@@ -58,7 +58,6 @@ class TodoBase(object):
Returns a list of all tag values associated with p_key. Returns
empty list if p_key does not exist.
"""
tags
=
self
.
fields
[
'tags'
]
matches
=
[
tag
[
1
]
for
tag
in
tags
if
tag
[
0
]
==
p_key
]
return
matches
if
len
(
matches
)
else
[]
...
...
@@ -69,7 +68,6 @@ class TodoBase(object):
value is passed, it will only return true when there exists a tag with
the given key-value combination.
"""
result
=
[
t
for
t
in
self
.
tag_values
(
p_key
)
if
p_value
==
""
or
t
==
p_value
]
return
len
(
result
)
>
0
...
...
@@ -92,7 +90,6 @@ class TodoBase(object):
When p_old_value is set, all tags having this value will be set to the
new value.
"""
if
p_value
==
""
:
self
.
remove_tag
(
p_key
,
p_old_value
)
return
...
...
@@ -146,7 +143,6 @@ class TodoBase(object):
Priority remains unchanged when an invalid priority is given, or when
the task was completed.
"""
if not self.is_completed() and (p_priority is None or
is_valid_priority(p_priority)):
self.fields['
priority
'] = p_priority
...
...
topydo/lib/TodoFile.py
View file @
3f7c7fda
...
...
@@ -49,7 +49,6 @@ class TodoFile(object):
p_todos can be a list of todo items, or a string that is just written
to the file.
"""
todofile
=
codecs
.
open
(
self
.
path
,
'w'
,
encoding
=
"utf-8"
)
if
p_todos
is
list
:
...
...
topydo/lib/TodoList.py
View file @
3f7c7fda
...
...
@@ -58,7 +58,6 @@ class TodoList(TodoListBase):
Makes sure that the dependency graph is consistent according to the
given todo.
"""
dep_id
=
p_todo
.
tag_value
(
'id'
)
# maintain dependency graph
if
dep_id
:
...
...
@@ -226,6 +225,5 @@ class TodoList(TodoListBase):
This is used for calculating the average importance, that requires
access to a todo's parents.
"""
for
todo
in
self
.
_todos
:
todo
.
attributes
[
'parents'
]
=
self
.
parents
(
todo
)
topydo/lib/TodoListBase.py
View file @
3f7c7fda
...
...
@@ -89,7 +89,6 @@ class TodoListBase(object):
When the identifier is a number but has leading zeros, the result
will be None.
"""
result
=
None
if
config
().
identifiers
()
!=
'text'
:
...
...
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