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
c6960e71
Commit
c6960e71
authored
Feb 27, 2017
by
Bram Schoenmakers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Memoize some (relatively expensive) calls in the Config class
parent
a700f7f2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
topydo/lib/Config.py
topydo/lib/Config.py
+4
-0
No files found.
topydo/lib/Config.py
View file @
c6960e71
...
...
@@ -15,6 +15,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import
configparser
from
functools
import
lru_cache
import
os
import
re
import
shlex
...
...
@@ -328,6 +329,7 @@ class _Config:
return
[]
if
hidden_item_tags
==
''
else
[
tag
.
strip
()
for
tag
in
hidden_item_tags
.
split
(
','
)]
@
lru_cache
(
maxsize
=
26
)
def
priority_color
(
self
,
p_priority
):
"""
Returns a dict with priorities as keys and color numbers as value.
...
...
@@ -394,6 +396,7 @@ class _Config:
except
ValueError
:
return
self
.
defaults
[
'add'
][
'auto_creation_date'
]
==
'1'
@
lru_cache
(
maxsize
=
1
)
def
aliases
(
self
):
"""
Returns dict with aliases names as keys and pairs of actual
...
...
@@ -429,6 +432,7 @@ class _Config:
except
ValueError
:
return
int
(
self
.
defaults
[
'columns'
][
'column_width'
])
@
lru_cache
(
maxsize
=
1
)
def
column_keymap
(
self
):
""" Returns keymap and keystates used in column mode """
keystates
=
set
()
...
...
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