Skip to content

Commit bf9ac8e

Browse files
committed
[U] update format
1 parent 60e3a26 commit bf9ac8e

File tree

10 files changed

+426
-429
lines changed

10 files changed

+426
-429
lines changed

.DS_Store

6 KB
Binary file not shown.

.idea/misc.xml

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

data/config.py

+19-17
Original file line numberDiff line numberDiff line change
@@ -3,34 +3,36 @@
33
-------------------------------------------------
44
File Name: config
55
Description :
6-
Author : klook
6+
Author : vant
77
date: 2021/5/26
88
-------------------------------------------------
99
Change Activity:
10-
2021/5/26:
10+
2022/5/09:
1111
-------------------------------------------------
1212
"""
13-
__author__ = 'klook'
13+
__author__ = 'vant'
1414

1515
import configparser
1616
import os
1717

18+
1819
class Config:
19-
def __init__(self):
20-
BASE_PATH = os.path.split(os.path.dirname(os.path.abspath(__file__)))[0]
21-
CONFIG_FILE = os.path.join(BASE_PATH, 'data', 'config.ini')
22-
self.config = configparser.ConfigParser()
23-
self.config.read(CONFIG_FILE)
20+
def __init__(self):
21+
BASE_PATH = os.path.split(os.path.dirname(os.path.abspath(__file__)))[0]
22+
CONFIG_FILE = os.path.join(BASE_PATH, 'data', 'config.ini')
23+
self.config = configparser.ConfigParser()
24+
self.config.read(CONFIG_FILE)
25+
26+
def get(self, filename, key):
27+
conf = self.config.get(filename, key)
28+
return conf
2429

25-
def get(self,filename,key):
26-
conf = self.config.get(filename,key)
27-
return conf
30+
def path(self):
31+
BASE_PATH = os.path.split(os.path.dirname(os.path.abspath(__file__)))[0]
32+
return BASE_PATH
2833

29-
def path(self):
30-
BASE_PATH = os.path.split(os.path.dirname(os.path.abspath(__file__)))[0]
31-
return BASE_PATH
3234

3335
if __name__ == '__main__':
34-
c = Config()
35-
# print(c.path())
36-
# print(c.get('browserType','browserName'))
36+
c = Config()
37+
print(c.path())
38+
# print(c.get('browserType','browserName'))

test/.DS_Store

6 KB
Binary file not shown.

0 commit comments

Comments
 (0)