Commit graph

168 commits

Author SHA1 Message Date
Rémi Verschelde
c9c941e339
CI: Update static checks to black 23.3.0
And apply it to the codebase, removing empty lines at the start of blocks.
2023-06-19 23:33:02 +02:00
Danil Alexeev
eb391d3302
Display BitField[Enum] in docs to distinguish from Enum 2023-06-15 17:23:02 +03:00
Yuri Sizov
391eccca76 Validate code tags in documentation for potential params
Adds a check to make_rst to look for matches
between the text inside of the [code][/code] tag
and known param identifiers.
Fixes most of what was revealed.
2023-04-26 21:36:04 +02:00
Yuri Sizov
0562decf34 Unexpose AnimationTrackEditPlugin as not implemented 2023-04-25 11:38:17 +02:00
Yuri Sizov
3ae282b452 Create an "Editor-only" section in the online class reference
This helps to find such classes without digging
through the rest of the class reference.
Editor-only classes can still be found under
your normal "Node" and "Resource" types.

This also fixes a typo and a missed case from the recent platform docs PR.
2023-04-24 21:06:55 +02:00
bruvzg
a5128e71bb
[Export docs] Move docs to platform folders. 2023-04-20 11:02:12 +03:00
Hana
026791027f fix conversion of csharp attributes in code blocks 2022-12-05 22:58:47 +01:00
Yuri Sizov
9e71cacd61 Improve layout of generated class references RST pages
- General improvements to the page layout
- Improved formatting for all class (properties, signals, annotations, theme properties, methods, operators, constructors, enumerations, constants)
- Added extra styling opportunities throughout the generated document
- Made generated tables more flexible to their content
- Changed highlighting for self-reference from code to strong
2022-12-05 15:30:09 +03:00
Yuri Sizov
0aba659891
Merge pull request #68848 from Piralein/fix-class-ref
Fix warnings in class ref
2022-11-22 20:27:15 +03:00
Hana
a5e5f1aa50 fix warnings in classref 2022-11-20 19:25:13 +01:00
Yuri Sizov
aac01fbaf8 Improve class reference split, list variant types separately 2022-11-18 15:47:53 +03:00
Yuri Sizov
4a5c179405 Split generated RST for class reference based on the base type 2022-11-18 00:36:09 +03:00
Yuri Sizov
270c810343 Add more call-to-action notes when documentation is missing 2022-11-17 22:33:55 +03:00
Jiri Suchan
c5bd2f9dce ci: add Python static analysis check via mypy 2022-09-30 19:03:17 +07:00
Jason Yundt
7f30e81abe Fix invalid literals in generated rst docs
Before this change, API docs that look like this:

	…adding [param character]s to the right of the string.

would turn into rst files that look like this:

	…adding ``character``s to the right of the string.

That reStructuredText is invalid and causes warnings when the docs repo
is built.
2022-09-12 15:51:39 -04:00
Andy Maloney
e430975b86 [doc] Use f-strings throughout make_rst.py
Based on discussion in #64230
2022-08-30 13:02:25 -04:00
Yuri Sizov
a287276ef0 Make cross-link generation more reliable in RST documentation 2022-08-26 19:13:41 +03:00
Yuri Sizov
03dc8c5d6f
Merge pull request #63635 from asmaloney/add-python-type-hints
Add Python PEP 484/526 type hints to doc/tools/doc_status.py
2022-08-18 13:02:53 +03:00
Yuri Sizov
d953d9590b Improve the make_rst.py parser for BBCode tags 2022-08-15 17:45:10 +03:00
Yuri Sizov
c5d7115038 Rename the argument tag to param in XML documentation 2022-08-08 22:34:31 +03:00
Yuri Sizov
35c1eae8d7 Add support for [param foo] syntax in valid documentation contexts 2022-08-08 22:18:38 +03:00
Yuri Sizov
beceba85da Add checks for empty/unnamed arguments to make_rst.py 2022-08-08 16:36:01 +03:00
Andy Maloney
2748220133 [make_rst] Remove (fake) return types on annotations
Based on discussion in #63561, Yuri mentioned that the return types are not necessary here, so remove the fake "void" return types on annotations.
2022-08-04 20:10:32 -04:00
Andy Maloney
a1428ca3c8 Convert Python type hints in tools/make_rst.py
Since Python 3.5+ is required, we can use proper type hints based on PEP 484. Because we are working on contributor tooling we can assume 3.6+ and use PEP 526 for variable declarations as well.
2022-08-03 13:06:50 -04:00
Andy Maloney
5036dfb0b6 Add Python PEP 484/526 type hints to doc/tools/doc_status.py
Also removes the first divider string which cleans up the extraneous dashes at the top of the page.
2022-07-29 13:27:48 -04:00
Jcrespo
d9b4ece093 Patch the make_rst.py utility to handle specially operators with '<'
When generating rst files from xml class reference, unknown references
to operators were generated, as something like:

:ref:`operator <<class_Vector2_operator_lt_bool>`

was rendered in html as:

operator ( Vector2 right )

-it just needed escaping.

The small addendum checks for operator names containing '<' and
substitutes it with '\<', escaping at rst level and generating
instead the right rendered html:

operator < ( Vector2 right )

This affected mostly the reference pages of the VectorX family of
classes. If in the future more types need escaping, a more
general solution will be needed.
2022-07-28 12:37:30 +02:00
Rémi Verschelde
f66527ddc3 doc: Fix relative paths in make_rst.py generated comment
Follow-up to #63495.
2022-07-27 13:52:46 +02:00
Rémi Verschelde
1bb56d9298
Merge pull request #63495 from YuriSizov/docs-improve-autogen-note 2022-07-27 13:24:03 +02:00
Yuri Sizov
f3561696da Improve the autogenerated note in RST docs for class reference 2022-07-27 13:43:06 +03:00
Andy Maloney
4b3d6f04a8 Add missing Python type hints in tools/make_rst.py 2022-07-26 16:26:47 -04:00
Rémi Verschelde
635d447a69
Merge pull request #62713 from YuriSizov/docs-scripting-annotations 2022-07-06 15:31:19 +02:00
reduz
5ac42cf576 Implement a BitField hint
Allows to specify the binder that an enum must be treated as a bitfield.
2022-07-05 22:13:37 +02:00
Yuri Sizov
a9098e6147 Add support for documenting built-in annotations 2022-07-04 20:21:39 +03:00
Hugo Locurcio
49f94b94c7
makerst: Fix file name not appearing in error message 2022-06-22 12:17:15 +02:00
Rémi Verschelde
126e4d0a5b
Merge pull request #61920 from Calinou/makerst-print-color 2022-06-11 11:42:18 +02:00
Hugo Locurcio
d45351f413
makerst: Print colored output for easier visual grepping
This is automatically enabled on all platforms including
Windows 10 and later, whenever a TTY environment is detected.

In non-TTY environments such as CI, this can be forced using the
`--color` command line argument.
2022-06-11 00:19:36 +02:00
Hugo Locurcio
1163af1756
makerst: Fix duplicate .xml extension in some error messages
Previously, a file name could appear as e.g. `ProjectSettings.xml.xml`
when one of the 3 modified errors was reported.
2022-06-10 22:58:09 +02:00
Rémi Verschelde
826f5358a1
Merge pull request #60771 from snailrhymer/enum-indentation-doc-fix
Indent bullet points in enum descriptions
2022-05-12 21:13:21 +02:00
SnailRhymer
38cf07b768 Indent bullet points in enum descriptions
When converting doc xml files to rst, add an indenation level to bullet points in the text description of enum values.
Also add check to avoid out of bounds error in rstize_text.
2022-05-12 19:34:49 +01:00
Yuri Roubinsky
dbd7a31507 Implement exponential operator (**) to GDScript/Expressions 2022-05-11 16:30:37 +03:00
Hugo Locurcio
f0b860fbad
makerst: Improve error reporting
- List file names before error descriptions, as is common in linters.
- Print the number of errors reported at the end of the list.
- Use double quotes instead of single quotes in messages.
2022-04-11 02:34:37 +02:00
Rémi Verschelde
1bdb82c64e
Fix typos with codespell
Using codespell 2.2-dev from current git.

Added `misc/scripts/codespell.sh` to make it easier to run it once in a
while and update the skip and ignore lists.
2022-02-10 12:30:19 +01:00
Max Hilbrunner
26da72eb4b Fix make_rst.py on Windows 2022-01-24 10:30:07 +01:00
Hugo Locurcio
1b01cef301
Update doc_status script to support constructors and operators docs
- Reorder columns from highest number of items contained within
  to lowest number.
- Remove some obsolete code and fix a typo.
2022-01-07 23:50:10 +01:00
Rémi Verschelde
0905f81c0a
Merge pull request #56162 from akien-mga/i18n-make_rst-more-translatable
i18n: Make more `make_rst.py` strings translatable
2022-01-07 09:23:57 +01:00
Rémi Verschelde
fd1d0c28c2
i18n: Make more make_rst.py strings translatable
For now we leave out the strings which could break rst table formatting.
2022-01-06 21:13:38 +01:00
Haoyu Qiu
a07e2b71fc Fix make_rst.py missing escape in front of some links 2021-12-23 00:50:40 +08:00
Rémi Verschelde
b98785309f
i18n: Add --lang option to make_rst.py to write translated headings
Add a few missing headings to the translation templates.
2021-12-21 13:47:11 +01:00
Haoyu Qiu
9844e36354 Update make_rst.py for non-latin texts 2021-12-21 16:35:47 +08:00
Yuri Sizov
b3992f7e6e Make overridden properties link to parent definition
Co-authored-by: Josh DeGraw <joshmdegraw@gmail.com>
2021-12-03 17:47:22 +03:00