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
4534caa0
Commit
4534caa0
authored
Oct 08, 2015
by
MinchinWeb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix PEP8 E261
at least two spaces before inline comment
parent
4c81766f
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
18 additions
and
18 deletions
+18
-18
test/TestDeleteCommand.py
test/TestDeleteCommand.py
+2
-2
test/TestEditCommand.py
test/TestEditCommand.py
+1
-1
topydo/Commands.py
topydo/Commands.py
+1
-1
topydo/cli/CLIApplicationBase.py
topydo/cli/CLIApplicationBase.py
+2
-2
topydo/commands/ListCommand.py
topydo/commands/ListCommand.py
+2
-2
topydo/commands/SortCommand.py
topydo/commands/SortCommand.py
+1
-1
topydo/lib/DCommand.py
topydo/lib/DCommand.py
+1
-1
topydo/lib/HashListValues.py
topydo/lib/HashListValues.py
+2
-2
topydo/lib/IcalPrinter.py
topydo/lib/IcalPrinter.py
+1
-1
topydo/lib/TodoList.py
topydo/lib/TodoList.py
+1
-1
topydo/lib/TodoListBase.py
topydo/lib/TodoListBase.py
+1
-1
topydo/lib/Utils.py
topydo/lib/Utils.py
+3
-3
No files found.
test/TestDeleteCommand.py
View file @
4534caa0
...
...
@@ -73,7 +73,7 @@ class DeleteCommandTest(CommandTest):
command
.
execute
()
self
.
assertTrue
(
self
.
todolist
.
is_dirty
())
self
.
assertEqual
(
self
.
todolist
.
count
(),
3
)
# force won't delete subtasks
self
.
assertEqual
(
self
.
todolist
.
count
(),
3
)
# force won't delete subtasks
self
.
assertEqual
(
self
.
output
,
"| 2| Bar p:1
\
n
Removed: Foo id:1
\
n
"
)
self
.
assertEqual
(
self
.
errors
,
""
)
...
...
@@ -82,7 +82,7 @@ class DeleteCommandTest(CommandTest):
command
.
execute
()
self
.
assertTrue
(
self
.
todolist
.
is_dirty
())
self
.
assertEqual
(
self
.
todolist
.
count
(),
3
)
# force won't delete subtasks
self
.
assertEqual
(
self
.
todolist
.
count
(),
3
)
# force won't delete subtasks
self
.
assertEqual
(
self
.
output
,
"| 2| Bar p:1
\
n
Removed: Foo id:1
\
n
"
)
self
.
assertEqual
(
self
.
errors
,
""
)
...
...
test/TestEditCommand.py
View file @
4534caa0
...
...
@@ -163,7 +163,7 @@ class EditCommandTest(CommandTest):
os
.
environ
[
'EDITOR'
]
=
editor
todotxt
=
config
().
todotxt
()
result
=
self
.
todolist
.
print_todos
()
# copy TodoList content *before* executing command
result
=
self
.
todolist
.
print_todos
()
# copy TodoList content *before* executing command
command
=
EditCommand
([],
self
.
todolist
,
self
.
out
,
self
.
error
,
None
)
command
.
execute
()
...
...
topydo/Commands.py
View file @
4534caa0
...
...
@@ -32,7 +32,7 @@ _SUBCOMMAND_MAP = {
'depri'
:
'DepriCommand'
,
'do'
:
'DoCommand'
,
'edit'
:
'EditCommand'
,
'exit'
:
'ExitCommand'
,
# used for the prompt
'exit'
:
'ExitCommand'
,
# used for the prompt
'ls'
:
'ListCommand'
,
'lscon'
:
'ListContextCommand'
,
'listcon'
:
'ListContextCommand'
,
...
...
topydo/cli/CLIApplicationBase.py
View file @
4534caa0
...
...
@@ -174,9 +174,9 @@ class CLIApplicationBase(object):
def
_help
(
self
,
args
):
if
args
==
None
:
pass
# TODO
pass
# TODO
else
:
pass
# TODO
pass
# TODO
def
_input
(
self
):
"""
...
...
topydo/commands/ListCommand.py
View file @
4534caa0
...
...
@@ -43,7 +43,7 @@ class ListCommand(ExpressionCommand):
"""
try
:
import
icalendar
as
_
except
ImportError
:
# pragma: no cover
except
ImportError
:
# pragma: no cover
self
.
error
(
"icalendar package is not installed."
)
return
False
...
...
@@ -96,7 +96,7 @@ class ListCommand(ExpressionCommand):
try
:
self
.
_process_flags
()
except
SyntaxError
:
# pragma: no cover
except
SyntaxError
:
# pragma: no cover
# importing icalendar failed, most likely due to Python 3.2
self
.
error
(
"icalendar is not supported in this Python version."
)
return
False
...
...
topydo/commands/SortCommand.py
View file @
4534caa0
...
...
@@ -35,7 +35,7 @@ class SortCommand(Command):
except
InvalidCommandArgument
:
expression
=
config
().
sort_string
()
sorter
=
Sorter
(
expression
)
# TODO: validate
sorter
=
Sorter
(
expression
)
# TODO: validate
sorted_todos
=
sorter
.
sort
(
self
.
todolist
.
todos
())
self
.
todolist
.
erase
()
...
...
topydo/lib/DCommand.py
View file @
4534caa0
...
...
@@ -35,7 +35,7 @@ class DCommand(MultiCommand):
self
.
force
=
False
self
.
length
=
len
(
self
.
todolist
.
todos
())
# to determine newly activated todos
self
.
length
=
len
(
self
.
todolist
.
todos
())
# to determine newly activated todos
def
get_flags
(
self
):
return
(
"f"
,
[
"force"
])
...
...
topydo/lib/HashListValues.py
View file @
4534caa0
...
...
@@ -23,8 +23,8 @@ from hashlib import sha1
_TABLE_SIZES
=
{
# we choose a large table size to reduce the chance of collisions.
3
:
46649
,
# largest prime under zzz_36
4
:
1679609
# largest prime under zzzz_36
3
:
46649
,
# largest prime under zzz_36
4
:
1679609
# largest prime under zzzz_36
}
def
_to_base36
(
p_value
):
...
...
topydo/lib/IcalPrinter.py
View file @
4534caa0
...
...
@@ -69,7 +69,7 @@ class IcalPrinter(Printer):
try
:
import
icalendar
self
.
icalendar
=
icalendar
except
ImportError
:
# pragma: no cover
except
ImportError
:
# pragma: no cover
self
.
icalendar
=
None
def
print_list
(
self
,
p_todos
):
...
...
topydo/lib/TodoList.py
View file @
4534caa0
...
...
@@ -37,7 +37,7 @@ class TodoList(TodoListBase):
The string will be parsed.
"""
# initialize these first because the constructor calls add_list
self
.
_tododict
=
{}
# hash(todo) to todo lookup
self
.
_tododict
=
{}
# hash(todo) to todo lookup
self
.
_depgraph
=
DirectedGraph
()
super
(
TodoList
,
self
).
__init__
(
p_todostrings
)
...
...
topydo/lib/TodoListBase.py
View file @
4534caa0
...
...
@@ -75,7 +75,7 @@ class TodoListBase(object):
try
:
result
=
self
.
_id_todo_map
[
p_identifier
]
except
KeyError
:
pass
# we'll try something else
pass
# we'll try something else
return
result
...
...
topydo/lib/Utils.py
View file @
4534caa0
...
...
@@ -32,9 +32,9 @@ def date_string_to_date(p_date):
parsed_date
=
re
.
match
(
r'(\
d{
4})-(\
d{
2})-(\
d{
2})'
,
p_date
)
if
parsed_date
:
result
=
date
(
int
(
parsed_date
.
group
(
1
)),
# year
int
(
parsed_date
.
group
(
2
)),
# month
int
(
parsed_date
.
group
(
3
))
# day
int
(
parsed_date
.
group
(
1
)),
# year
int
(
parsed_date
.
group
(
2
)),
# month
int
(
parsed_date
.
group
(
3
))
# day
)
else
:
raise
ValueError
...
...
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