Skip to content

Commit a4d3f64

Browse files
committed
Fix: ST2 compatibility issue (#515)
Fixes #515 The python26 of ST2 is too stupid to know about how to define a `set`.
1 parent 78e6655 commit a4d3f64

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

modules/annotation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class SimpleLineAnnotationTemplate(object):
1717
TEMPLATE = '⟢ {line_author} ({line_author_age}) · {line_summary}'
1818

1919
# a list of variables used by this template
20-
variables = {'line_author', 'line_author_age', 'line_summary'}
20+
variables = frozenset(['line_author', 'line_author_age', 'line_summary'])
2121

2222
@classmethod
2323
def render(cls, **kwargs):

modules/blame.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from .utils import line_from_kwargs
66

77
# A set of all supported variables
8-
BLAME_VARIABLES = {
8+
BLAME_VARIABLES = frozenset([
99
'line_commit',
1010
'line_previous',
1111
'line_summary',
@@ -19,7 +19,7 @@
1919
'line_committer_age',
2020
'line_committer_time',
2121
'line_committer_tz'
22-
}
22+
])
2323

2424

2525
def run_blame(git_gutter, **kwargs):

modules/statusbar.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ class SimpleStatusBarTemplate(object):
77
"""A simple template class with the same interface as jinja2's one."""
88

99
# a list of variables used by this template
10-
variables = {
10+
variables = frozenset([
1111
'repo', 'branch', 'compare', 'inserted', 'deleted', 'modified',
1212
'line_author', 'line_author_age'
13-
}
13+
])
1414

1515
@staticmethod
1616
def render(repo=None, branch=None, compare=None, inserted=0, deleted=0,

0 commit comments

Comments
 (0)