Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
evm-store
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wanli
evm-store
Commits
99d0ccd3
Commit
99d0ccd3
authored
Nov 10, 2021
by
wanli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🐞
fix: 打开关闭文件添加格式参数
parent
246189a9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
backend/view/api.py
backend/view/api.py
+5
-5
No files found.
backend/view/api.py
View file @
99d0ccd3
...
...
@@ -398,7 +398,7 @@ def parse_header_files():
config_file
=
"typeconfig.json"
typeconfig
=
{}
if
os
.
path
.
exists
(
config_file
):
with
open
(
config_file
,
"r"
)
as
f
:
with
open
(
config_file
,
"r"
,
encoding
=
"utf-8"
)
as
f
:
typeconfig
=
json
.
loads
(
f
.
read
())
if
len
(
typeconfig
.
keys
())
>
0
:
...
...
@@ -412,7 +412,7 @@ def parse_header_files():
result
=
parse_header_file
(
file
.
resolve
()
.
as_posix
(),
undefined_type
,
error_tips
)
if
result
!=
None
:
target
=
target_path
.
joinpath
(
".json"
.
format
(
file
.
name
))
with
open
(
target
.
resolve
()
.
as_posix
(),
"w+"
)
as
f
:
with
open
(
target
.
resolve
()
.
as_posix
(),
"w+"
,
encoding
=
"utf-8"
)
as
f
:
f
.
write
(
json
.
dumps
(
result
))
result_list
.
append
(
result
)
...
...
@@ -452,7 +452,7 @@ def process_parse():
config_file
=
"typeconfig.json"
typeconfig
=
{}
if
os
.
path
.
exists
(
config_file
):
with
open
(
config_file
,
"r"
)
as
f
:
with
open
(
config_file
,
"r"
,
encoding
=
"utf-8"
)
as
f
:
typeconfig
=
json
.
loads
(
f
.
read
())
if
not
typeconfig
:
typeconfig
=
{}
...
...
@@ -462,7 +462,7 @@ def process_parse():
if
len
(
typeconfig
.
keys
())
>
0
:
conf
=
update_mark_type
(
typeconfig
)
with
open
(
config_file
,
"w"
)
as
f
:
with
open
(
config_file
,
"w"
,
encoding
=
"utf-8"
)
as
f
:
f
.
write
(
json
.
dumps
(
conf
))
try
:
...
...
@@ -477,7 +477,7 @@ def process_parse():
result
=
parse_header_file
(
target_file
.
resolve
()
.
as_posix
(),
undefined_type
,
error_tips
)
if
result
!=
None
:
target
=
target_file
.
parent
.
joinpath
(
"{}.json"
.
format
(
target_file
.
name
))
with
open
(
target
.
resolve
()
.
as_posix
(),
"w+"
)
as
f
:
with
open
(
target
.
resolve
()
.
as_posix
(),
"w+"
,
encoding
=
"utf-8"
)
as
f
:
f
.
write
(
json
.
dumps
(
result
))
result_list
.
append
(
result
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment