Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
godot
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
community
godot
Commits
619354fb
Commit
619354fb
authored
Mar 30, 2020
by
PouleyKetchoupp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed errors in makerst pre-commit hook
parent
b383484e
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
2 deletions
+9
-2
makerst.py
doc/tools/makerst.py
+1
-1
pre-commit-makerst
misc/hooks/pre-commit-makerst
+8
-1
No files found.
doc/tools/makerst.py
View file @
619354fb
...
...
@@ -353,7 +353,7 @@ def make_rst_class(class_def, state, dry_run, output_dir): # type: (ClassDef, S
class_name
=
class_def
.
name
if
dry_run
:
f
=
open
(
os
.
devnull
,
"w"
)
f
=
open
(
os
.
devnull
,
"w"
,
encoding
=
"utf-8"
)
else
:
f
=
open
(
os
.
path
.
join
(
output_dir
,
"class_"
+
class_name
.
lower
()
+
".rst"
),
"w"
,
encoding
=
"utf-8"
)
...
...
misc/hooks/pre-commit-makerst
View file @
619354fb
...
...
@@ -2,4 +2,11 @@
# Git pre-commit hook that checks the class reference syntax using makerst.py.
doc/tools/makerst.py doc/classes modules
--dry-run
# Workaround because we can't execute the .py file directly on windows
PYTHON
=
python
py_ver
=
$(
$PYTHON
-c
"import sys; print(sys.version_info.major)"
)
if
[[
"
$py_ver
"
!=
"3"
]]
;
then
PYTHON+
=
3
fi
$PYTHON
doc/tools/makerst.py doc/classes modules
--dry-run
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