Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
lichenggang
/
bom_identify
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
13cfef5b
authored
Jan 25, 2021
by
陈森彬
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
参数的特殊情况
parent
8de26270
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
utils/functions.py
valid_server.py
utils/functions.py
View file @
13cfef5b
...
...
@@ -3,8 +3,8 @@
import
re
from
config
import
unit_map
,
cast_map
,
unit_regex
,
special_tuple
,
encap_list
,
temp_map
,
special_str
,
encap_regex
unit_pattern
=
re
.
compile
(
'(
\
d+|
\
d+[
\\
\
./?]
\
d+)('
+
unit_regex
+
')([.a-zA-Z
\\
-]?)'
)
encap_pattern
=
re
.
compile
(
'.*('
+
encap_regex
+
').*'
)
unit_pattern
=
re
.
compile
(
'(
[.a-zA-Z
\\
-]?)(
\
d+|
\
d+[
\\
\
./?]
\
d+)('
+
unit_regex
+
')([.a-zA-Z
\\
-]?)'
)
encap_pattern
=
re
.
compile
(
'.*('
+
encap_regex
+
').*'
)
def
is_float
(
s
):
...
...
@@ -66,8 +66,9 @@ def check_param(kw):
else
:
new_list
=
[]
for
param
in
check_res
:
if
not
param
[
2
]
.
isalpha
()
and
param
[
2
]
not
in
special_tuple
:
new_list
.
append
(
param
[
0
]
+
param
[
1
])
if
not
param
[
0
]
.
isalpha
()
and
param
[
0
]
not
in
special_tuple
and
not
param
[
3
]
.
isalpha
()
and
param
[
3
]
not
in
special_tuple
:
new_list
.
append
(
param
[
1
]
+
param
[
2
])
check_res
=
new_list
return
check_res
...
...
valid_server.py
View file @
13cfef5b
...
...
@@ -132,7 +132,7 @@ class UCHandler(tornado.web.RequestHandler):
if
check_temp
(
kw_info
):
attrs_list
.
append
(
kw_info
)
else
:
encap_res
=
check_encap
(
kw
)
encap_res
=
check_encap
(
kw
_info
)
if
encap_res
:
encap_list
.
append
(
encap_res
[
0
])
continue
...
...
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