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
6691d349
Commit
6691d349
authored
Oct 30, 2015
by
Bram Schoenmakers
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'lazy-import'
parents
71e45f5a
8cd2afd0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
topydo/cli/CLIApplicationBase.py
topydo/cli/CLIApplicationBase.py
+4
-3
topydo/commands/ListCommand.py
topydo/commands/ListCommand.py
+2
-2
No files found.
topydo/cli/CLIApplicationBase.py
View file @
6691d349
...
...
@@ -101,12 +101,9 @@ except ConfigError as config_error:
error
(
str
(
config_error
))
sys
.
exit
(
1
)
from
topydo.commands.ArchiveCommand
import
ArchiveCommand
from
topydo.commands.SortCommand
import
SortCommand
from
topydo.lib
import
TodoFile
from
topydo.lib
import
TodoList
from
topydo.lib
import
TodoListBase
from
topydo.lib.ChangeSet
import
ChangeSet
from
topydo.lib.Utils
import
escape_ansi
...
...
@@ -178,6 +175,7 @@ class CLIApplicationBase(object):
self
.
backup
.
add_archive
(
archive
)
if
archive
:
from
topydo.commands.ArchiveCommand
import
ArchiveCommand
command
=
ArchiveCommand
(
self
.
todolist
,
archive
)
command
.
execute
()
...
...
@@ -209,6 +207,8 @@ class CLIApplicationBase(object):
"""
if
config
().
backup_count
()
>
0
and
p_command
and
not
self
.
is_read_only
(
p_command
):
call
=
[
p_command
.
__module__
.
lower
()[
16
:
-
7
]]
+
p_args
# strip "topydo.commands" and "Command"
from
topydo.lib.ChangeSet
import
ChangeSet
self
.
backup
=
ChangeSet
(
self
.
todolist
,
p_call
=
call
)
command
=
p_command
(
...
...
@@ -237,6 +237,7 @@ class CLIApplicationBase(object):
self
.
_archive
()
if
config
().
keep_sorted
():
from
topydo.commands.SortCommand
import
SortCommand
self
.
_execute
(
SortCommand
,
[])
if
self
.
backup
:
...
...
topydo/commands/ListCommand.py
View file @
6691d349
...
...
@@ -16,8 +16,6 @@
from
topydo.lib.Config
import
config
from
topydo.lib.ExpressionCommand
import
ExpressionCommand
from
topydo.lib.IcalPrinter
import
IcalPrinter
from
topydo.lib.JsonPrinter
import
JsonPrinter
from
topydo.lib.PrettyPrinter
import
pretty_printer_factory
from
topydo.lib.PrettyPrinterFilter
import
(
PrettyPrinterHideTagFilter
,
PrettyPrinterIndentFilter
)
...
...
@@ -58,9 +56,11 @@ class ListCommand(ExpressionCommand):
self
.
sort_expression
=
value
elif
opt
==
'-f'
:
if
value
==
'json'
:
from
topydo.lib.JsonPrinter
import
JsonPrinter
self
.
printer
=
JsonPrinter
()
elif
value
==
'ical'
:
if
self
.
_poke_icalendar
():
from
topydo.lib.IcalPrinter
import
IcalPrinter
self
.
printer
=
IcalPrinter
(
self
.
todolist
)
else
:
self
.
printer
=
None
...
...
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