X Tutup
Skip to content

Commit 469fa38

Browse files
committed
have config.py and controlpanel.py reformatted per black
1 parent 715b50d commit 469fa38

File tree

2 files changed

+421
-166
lines changed

2 files changed

+421
-166
lines changed

winpython/config.py

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,14 @@
1616

1717
def get_module_path(modname):
1818
"""Return module *modname* base path"""
19-
return osp.abspath(osp.dirname(sys.modules[modname].__file__))
19+
return osp.abspath(
20+
osp.dirname(sys.modules[modname].__file__)
21+
)
2022

2123

22-
def get_module_data_path(modname, relpath=None, attr_name='DATAPATH'):
24+
def get_module_data_path(
25+
modname, relpath=None, attr_name='DATAPATH'
26+
):
2327
"""Return module *modname* data path
2428
Note: relpath is ignored if module has an attribute named *attr_name*
2529
@@ -33,12 +37,21 @@ def get_module_data_path(modname, relpath=None, attr_name='DATAPATH'):
3337
if osp.isfile(parentdir):
3438
# Parent directory is not a directory but the 'library.zip' file:
3539
# this is either a py2exe or a cx_Freeze distribution
36-
datapath = osp.abspath(osp.join(osp.join(parentdir, osp.pardir),
37-
modname))
40+
datapath = osp.abspath(
41+
osp.join(
42+
osp.join(parentdir, osp.pardir), modname
43+
)
44+
)
3845
if relpath is not None:
39-
datapath = osp.abspath(osp.join(datapath, relpath))
46+
datapath = osp.abspath(
47+
osp.join(datapath, relpath)
48+
)
4049
return datapath
4150

4251

43-
DATA_PATH = get_module_data_path('winpython', relpath='data')
44-
IMAGE_PATH = get_module_data_path('winpython', relpath='images')
52+
DATA_PATH = get_module_data_path(
53+
'winpython', relpath='data'
54+
)
55+
IMAGE_PATH = get_module_data_path(
56+
'winpython', relpath='images'
57+
)

0 commit comments

Comments
 (0)
X Tutup