Skip to content

Commit d9366e0

Browse files
blackbit42flashcode
authored andcommitted
typing_counter.py 1.0.1: fix warning messages when loading script
1 parent 5f64841 commit d9366e0

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

python/typing_counter.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@
4646
# 1.0 <nils_2@freenode>:
4747
# make script python3 compatible
4848
# add regular expression for format option
49+
# 1.0.1:
50+
# fix warning messages when loading script
4951
#
5052
# usage:
5153
# add [tc] to your weechat.bar.status.items
@@ -77,7 +79,7 @@
7779

7880
SCRIPT_NAME = "typing_counter"
7981
SCRIPT_AUTHOR = "fauno <[email protected]>"
80-
SCRIPT_VERSION = "1.0"
82+
SCRIPT_VERSION = "1.0.1"
8183
SCRIPT_LICENSE = "GPL3"
8284
SCRIPT_DESC = "Bar item showing typing count and cursor position. Add 'tc' to a bar."
8385

@@ -115,10 +117,10 @@
115117
tc_options = {}
116118

117119
# regexp to match ${color} tags
118-
regex_color=re.compile('\$\{([^\{\}]+)\}')
120+
regex_color=re.compile(r'\$\{([^\{\}]+)\}')
119121

120122
# regexp to match ${optional string} tags
121-
regex_optional_tags=re.compile('%\{[^\{\}]+\}')
123+
regex_optional_tags=re.compile(r'%\{[^\{\}]+\}')
122124

123125
def command_run_cb (data, signal, signal_data):
124126
if tc_options['warn_command'] == '':

0 commit comments

Comments
 (0)