Skip to content

Commit 1c4c684

Browse files
committed
coding: utf8 fix space.
1 parent 1d2997e commit 1c4c684

File tree

13 files changed

+48
-44
lines changed

13 files changed

+48
-44
lines changed

tmuxp/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# -*- coding: utf8 - *-
1+
# -*- coding: utf-8 -*-
22
"""Manage tmux workspaces from JSON and YAML, pythonic API, shell completion.
33
44
tmuxp

tmuxp/__main__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# -*- coding: utf8 - *-
1+
# -*- coding: utf-8 -*-
22
"""For accessing tmuxp as a package.
33
44
tmuxp

tmuxp/_compat.py

Lines changed: 36 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,48 @@
1+
# -*- coding: utf8 -*-
12
import sys
23

34
PY2 = sys.version_info[0] == 2
45

56
_identity = lambda x: x
67

78

8-
if not PY2:
9+
if PY2:
10+
unichr = unichr
11+
text_type = unicode
12+
string_types = (str, unicode)
13+
integer_types = (int, long)
14+
from urllib import urlretrieve
15+
16+
text_to_native = lambda s, enc: s.encode(enc)
17+
18+
iterkeys = lambda d: d.iterkeys()
19+
itervalues = lambda d: d.itervalues()
20+
iteritems = lambda d: d.iteritems()
21+
22+
from cStringIO import StringIO as BytesIO
23+
from StringIO import StringIO
24+
import cPickle as pickle
25+
import ConfigParser as configparser
26+
27+
from itertools import izip, imap
28+
range_type = xrange
29+
30+
cmp = cmp
31+
32+
input = raw_input
33+
from string import lower as ascii_lowercase
34+
import urlparse
35+
36+
def console_to_str(s):
37+
return s.decode('utf_8')
38+
39+
exec('def reraise(tp, value, tb=None):\n raise tp, value, tb')
40+
41+
else:
42+
unichr = chr
943
text_type = str
1044
string_types = (str,)
1145
integer_types = (int, )
12-
unichr = chr
1346

1447
text_to_native = lambda s, enc: s
1548

@@ -31,8 +64,7 @@
3164
from string import ascii_lowercase
3265
import urllib.parse as urllib
3366
import urllib.parse as urlparse
34-
35-
exec('def reraise(tp, value, tb=None):\n raise(tp, value, tb)')
67+
from urllib.request import urlretrieve
3668

3769
console_encoding = sys.__stdout__.encoding
3870

@@ -42,34 +74,6 @@ def console_to_str(s):
4274
return s.decode(console_encoding)
4375
except UnicodeDecodeError:
4476
return s.decode('utf_8')
45-
else:
46-
text_type = unicode
47-
string_types = (str, unicode)
48-
integer_types = (int, long)
49-
50-
text_to_native = lambda s, enc: s.encode(enc)
51-
unichr = unichr
52-
53-
iterkeys = lambda d: d.iterkeys()
54-
itervalues = lambda d: d.itervalues()
55-
iteritems = lambda d: d.iteritems()
56-
57-
from cStringIO import StringIO as BytesIO
58-
from StringIO import StringIO
59-
import cPickle as pickle
60-
import ConfigParser as configparser
61-
62-
from itertools import izip, imap
63-
range_type = xrange
64-
65-
cmp = cmp
66-
67-
input = raw_input
68-
from string import lower as ascii_lowercase
69-
import urlparse
70-
71-
def console_to_str(s):
72-
return s.decode('utf_8')
7377

7478
def reraise(tp, value, tb=None):
7579
if value.__traceback__ is not tb:

tmuxp/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# -*- coding: utf8 - *-
1+
# -*- coding: utf-8 -*-
22
"""Command line tool for managing tmux workspaces and tmuxp configurations.
33
44
tmuxp.cli

tmuxp/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# -*- coding: utf8 - *-
1+
# -*- coding: utf-8 -*-
22
"""Configuration parsing and export for tmuxp.
33
44
tmuxp.config

tmuxp/exc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# -*- coding: utf8 - *-
1+
# -*- coding: utf-8 -*-
22
"""Exceptions for tmuxp.
33
44
tmuxp.exc

tmuxp/formats.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# -*- coding: utf8 - *-
1+
# -*- coding: utf-8 -*-
22
"""Format variables for tmux objects.
33
44
tmuxp.formats

tmuxp/log.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env python
2-
# -*- coding: utf8 - *-
2+
# -*- coding: utf-8 -*-
33
"""Log utilities for tmuxp.
44
55
tmuxp.log

tmuxp/pane.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# -*- coding: utf8 - *-
1+
# -*- coding: utf-8 -*-
22
"""Pythonization of the :ref:`tmux(1)` pane.
33
44
tmuxp.pane

tmuxp/server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# -*- coding: utf8 - *-
1+
# -*- coding: utf-8 -*-
22
"""Pythonization of the :term:`tmux(1)` server.
33
44
tmuxp.server

tmuxp/session.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# -*- coding: utf8 - *-
1+
# -*- coding: utf-8 -*-
22
"""Pythonization of the :term:`tmux(1)` session.
33
44
tmuxp.session

tmuxp/util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# -*- coding: utf8 - *-
1+
# -*- coding: utf-8 -*-
22
"""Utility and helper methods for tmuxp.
33
44
tmuxp.util

tmuxp/window.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# -*- coding: utf8 - *-
1+
# -*- coding: utf-8 -*-
22
"""Pythonization of the :term:`tmux(1)` window.
33
44
tmuxp.window

0 commit comments

Comments
 (0)