Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
dynamic
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MostafaMollaali
dynamic
Commits
bf8ae91f
Commit
bf8ae91f
authored
8 years ago
by
Christoph Lehmann
Browse files
Options
Downloads
Patches
Plain Diff
[scr/doc] fixed python format strings
parent
ee2a6349
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
scripts/doc/append-xml-tags.py
+3
-3
3 additions, 3 deletions
scripts/doc/append-xml-tags.py
scripts/doc/normalize-param-cache.py
+4
-4
4 additions, 4 deletions
scripts/doc/normalize-param-cache.py
with
7 additions
and
7 deletions
scripts/doc/append-xml-tags.py
+
3
−
3
View file @
bf8ae91f
...
@@ -18,7 +18,7 @@ github_data_url = "https://github.com/ufz/ogs-data/tree/master"
...
@@ -18,7 +18,7 @@ github_data_url = "https://github.com/ufz/ogs-data/tree/master"
if
len
(
sys
.
argv
)
!=
4
:
if
len
(
sys
.
argv
)
!=
4
:
print
(
"
Usage:
"
)
print
(
"
Usage:
"
)
print
(
"
{} EXT DATADIR DOCAUXDIR
"
.
format
(
sys
.
argv
[
0
]))
print
(
"
{
0
} EXT DATADIR DOCAUXDIR
"
.
format
(
sys
.
argv
[
0
]))
sys
.
exit
(
1
)
sys
.
exit
(
1
)
ext
=
sys
.
argv
[
1
]
ext
=
sys
.
argv
[
1
]
...
@@ -152,9 +152,9 @@ for (dirpath, _, filenames) in os.walk(docdir):
...
@@ -152,9 +152,9 @@ for (dirpath, _, filenames) in os.walk(docdir):
fh
.
write
(
"
- This is a required parameter.
\n
"
)
fh
.
write
(
"
- This is a required parameter.
\n
"
)
datatype
=
info
[
5
]
datatype
=
info
[
5
]
if
datatype
:
fh
.
write
(
"
- Data type: <tt>{}</tt>
\n
"
.
format
(
datatype
))
if
datatype
:
fh
.
write
(
"
- Data type: <tt>{
0
}</tt>
\n
"
.
format
(
datatype
))
fh
.
write
(
"
- Expanded tag path: {}
\n
"
.
format
(
tagpath_expanded
))
fh
.
write
(
"
- Expanded tag path: {
0
}
\n
"
.
format
(
tagpath_expanded
))
fh
.
write
(
"
- Go to source code: [→ ufz/ogs/master]({2}/{0}#L{1})
\n
"
fh
.
write
(
"
- Go to source code: [→ ufz/ogs/master]({2}/{0}#L{1})
\n
"
.
format
(
path
,
line
,
github_src_url
))
.
format
(
path
,
line
,
github_src_url
))
...
...
This diff is collapsed.
Click to expand it.
scripts/doc/normalize-param-cache.py
+
4
−
4
View file @
bf8ae91f
...
@@ -51,7 +51,7 @@ for inline in sys.stdin:
...
@@ -51,7 +51,7 @@ for inline in sys.stdin:
param_or_attr_comment
=
m
.
group
(
1
)
param_or_attr_comment
=
m
.
group
(
1
)
tag_path_comment
=
m
.
group
(
2
).
replace
(
"
__
"
,
"
.
"
)
tag_path_comment
=
m
.
group
(
2
).
replace
(
"
__
"
,
"
.
"
)
debug
(
"
{:>5} //! {}
"
.
format
(
lineno
,
tag_path_comment
))
debug
(
"
{
0
:>5} //! {
1
}
"
.
format
(
lineno
,
tag_path_comment
))
tag_name_comment
=
tag_path_comment
.
split
(
"
.
"
)[
-
1
]
tag_name_comment
=
tag_path_comment
.
split
(
"
.
"
)[
-
1
]
continue
continue
...
@@ -83,7 +83,7 @@ for inline in sys.stdin:
...
@@ -83,7 +83,7 @@ for inline in sys.stdin:
if
state
!=
"
comment
"
or
oldpath
!=
path
:
if
state
!=
"
comment
"
or
oldpath
!=
path
:
write_out
(
"
NODOC
"
,
path
,
lineno
,
"
NONE
"
,
param
,
paramtype
,
method
)
write_out
(
"
NODOC
"
,
path
,
lineno
,
"
NONE
"
,
param
,
paramtype
,
method
)
else
:
else
:
debug
(
"
{:>5} {} {}
"
.
format
(
lineno
,
param
,
paramtype
))
debug
(
"
{
0
:>5} {
1
} {
2
}
"
.
format
(
lineno
,
param
,
paramtype
))
if
param
!=
tag_name_comment
:
if
param
!=
tag_name_comment
:
debug
(
"
error: parameter name from comment and code do not match:
"
debug
(
"
error: parameter name from comment and code do not match:
"
...
@@ -91,7 +91,7 @@ for inline in sys.stdin:
...
@@ -91,7 +91,7 @@ for inline in sys.stdin:
write_out
(
"
NODOC
"
,
path
,
lineno
,
tag_path_comment
,
param
,
paramtype
,
method
)
write_out
(
"
NODOC
"
,
path
,
lineno
,
tag_path_comment
,
param
,
paramtype
,
method
)
elif
lineno
!=
oldlineno
+
1
:
elif
lineno
!=
oldlineno
+
1
:
debug
(
"
error: the associated comment is not on the line preceding this one.
"
debug
(
"
error: the associated comment is not on the line preceding this one.
"
+
"
line numbers {} vs. {}
"
.
format
(
oldlineno
,
lineno
))
+
"
line numbers {
0
} vs. {
1
}
"
.
format
(
oldlineno
,
lineno
))
write_out
(
"
NODOC
"
,
path
,
lineno
,
tag_path_comment
,
param
,
paramtype
,
method
)
write_out
(
"
NODOC
"
,
path
,
lineno
,
tag_path_comment
,
param
,
paramtype
,
method
)
elif
param_or_attr_comment
==
"
param
"
and
m
.
group
(
2
)
!=
"
Param
"
and
m
.
group
(
2
)
!=
"
Subtree
"
:
elif
param_or_attr_comment
==
"
param
"
and
m
.
group
(
2
)
!=
"
Param
"
and
m
.
group
(
2
)
!=
"
Subtree
"
:
debug
(
"
error: comment says param but code says different.
"
)
debug
(
"
error: comment says param but code says different.
"
)
...
@@ -118,7 +118,7 @@ for inline in sys.stdin:
...
@@ -118,7 +118,7 @@ for inline in sys.stdin:
else
:
else
:
if
lineno
!=
oldlineno
+
1
:
if
lineno
!=
oldlineno
+
1
:
debug
(
"
error: the associated comment is not on the line preceding this one.
"
debug
(
"
error: the associated comment is not on the line preceding this one.
"
+
"
line numbers {} vs. {}
"
.
format
(
oldlineno
,
lineno
))
+
"
line numbers {
0
} vs. {
1
}
"
.
format
(
oldlineno
,
lineno
))
write_out
(
"
NODOC
"
,
path
,
lineno
,
"
UNKNOWN
"
,
"
UNKNOWN
"
,
paramtype
,
method
)
write_out
(
"
NODOC
"
,
path
,
lineno
,
"
UNKNOWN
"
,
"
UNKNOWN
"
,
paramtype
,
method
)
elif
param_or_attr_comment
!=
"
special
"
:
elif
param_or_attr_comment
!=
"
special
"
:
debug
(
"
error: comment does not comment a special line.
"
)
debug
(
"
error: comment does not comment a special line.
"
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment