Skip to content

Added @Documented to all annotations in org.python.expose.#415

Open
Stewori wants to merge 4 commits intojython:masterfrom
Stewori:exposed_annotations_documented
Open

Added @Documented to all annotations in org.python.expose.#415
Stewori wants to merge 4 commits intojython:masterfrom
Stewori:exposed_annotations_documented

Conversation

@Stewori
Copy link
Copy Markdown
Member

@Stewori Stewori commented Mar 4, 2026

Closes #388

@Stewori
Copy link
Copy Markdown
Member Author

Stewori commented Mar 4, 2026

This should be a safe one. (heard that before^^, little did they know)
However, tests support this opinion. I'll leave it here for others to take a look for typos @jeff5 @ohumbel
Will merge in a couple of days if nobody speaks up.

@ohumbel
Copy link
Copy Markdown
Contributor

ohumbel commented Mar 9, 2026

I checked the changes very carefully and could not spot any typos...
Looks safe to me.

@jeff5
Copy link
Copy Markdown
Member

jeff5 commented Apr 17, 2026

Yes to @Documented in general, but I see you've tidied up some Javadoc, so I'll read carefully.

* that object. See {@link PyInteger#int_new} for an example of this type of ExposedNew.
*<p>
* {@code PyNewWrapper new_, boolean init, PyType subtype, PyObject[] args, String[] keywords}.
* In this case, the method has full responsibility for creating and initiating the object and
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* In this case, the method has full responsibility for creating and initiating the object and
* In this case, the method has full responsibility for creating and initialising the object and

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Except of course now we run into US vs UK English. (I won't object to either.)

* that object. See {@link PyInteger#int_new} for an example of this type of ExposedNew.
*<p>
* {@code PyNewWrapper new_, boolean init, PyType subtype, PyObject[] args, String[] keywords}.
* In this case, the method has full responsibility for creating and initiating the object and
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Except of course now we run into US vs UK English. (I won't object to either.)

Comment on lines +27 to +28
* @return the base type of this type. Must be another class annotated with {@code ExposedType}.
* If unspecified, the base is set to {@code object}, or {@code PyObject.class}.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the @return has to be qualified I would probably give the full version in the Javadoc body, and a minimal one in the @return.

Comment on lines +27 to +28
* @return the base type of this type. Must be another class annotated with {@code ExposedType}.
* If unspecified, the base is set to {@code object}, or {@code PyObject.class}.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* @return the base type of this type. Must be another class annotated with {@code ExposedType}.
* If unspecified, the base is set to {@code object}, or {@code PyObject.class}.
* Return the base type of this type. This must be another class annotated with {@code ExposedType}.
* If not specified (or {@code Object.class} is given), the base is set to Python {@code object}, that is {@code PyObject.class}.
* @return the base type of this type.

@jeff5 jeff5 added this to the 2.7.5 milestone Apr 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

@ExposedType annotation should be @Documented

3 participants