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
f42a082e
Commit
f42a082e
authored
Jun 15, 2014
by
Bram Schoenmakers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pylint warnings + docstrings.
parent
2b7ac602
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
View.py
View.py
+9
-1
No files found.
View.py
View file @
f42a082e
""" A view is a list of todos, sorted and filtered. """
from
PrettyPrinter
import
pretty_print
class
View
:
class
View
(
object
):
"""
A view is instantiated by a todo list, usually obtained from a todo.txt
file. Also a sorter and a list of filters should be given that is applied
to the list.
"""
def
__init__
(
self
,
p_sorter
,
p_filters
,
p_todos
):
self
.
_todos
=
p_todos
self
.
_viewdata
=
[]
...
...
@@ -20,6 +27,7 @@ class View:
self
.
_viewdata
=
_filter
.
filter
(
self
.
_viewdata
)
def
pretty_print
(
self
):
""" Pretty prints the view. """
return
'
\
n
'
.
join
(
pretty_print
(
self
.
_todos
,
True
,
True
))
def
__str__
(
self
):
...
...
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