-
Notifications
You must be signed in to change notification settings - Fork 231
Add @Documented to all annotations in org.python.expose. #415
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
2cca372
e4dc7af
b352dc6
d6f713f
b424d93
3eb2969
444d229
38da62c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -4,6 +4,7 @@ | |||||||||||
| import java.lang.annotation.Retention; | ||||||||||||
| import java.lang.annotation.RetentionPolicy; | ||||||||||||
| import java.lang.annotation.Target; | ||||||||||||
| import java.lang.annotation.Documented; | ||||||||||||
|
|
||||||||||||
| import org.python.core.PyNewWrapper; | ||||||||||||
| import org.python.core.PyObject; | ||||||||||||
|
|
@@ -12,6 +13,7 @@ | |||||||||||
| /** | ||||||||||||
| * Indicates a given class should be made visible to Python code as a builtin type. | ||||||||||||
| */ | ||||||||||||
| @Documented | ||||||||||||
| @Retention(RetentionPolicy.RUNTIME) | ||||||||||||
| @Target(ElementType.TYPE) | ||||||||||||
| public @interface ExposedType { | ||||||||||||
|
|
@@ -22,18 +24,18 @@ | |||||||||||
| String name() default ""; | ||||||||||||
|
|
||||||||||||
| /** | ||||||||||||
| * @return the base type of this type. Must be another class anotated with ExposedType. If | ||||||||||||
| * unspecified, the base is set to object, or PyObject.class. | ||||||||||||
| * @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}. | ||||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If the
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, that's the typical way. My intention was to keep changes minimal and to bring everything into consistent form. Since some class used plainly So, if we would build with e.g. Java 17 or later, The solution would be using inline
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, this makes sense for the long description of |
||||||||||||
| */ | ||||||||||||
| Class base() default Object.class; | ||||||||||||
|
|
||||||||||||
| /** | ||||||||||||
| * @return Whether this type allows subclassing. | ||||||||||||
| * @return whether this type allows subclassing. | ||||||||||||
| */ | ||||||||||||
| boolean isBaseType() default true; | ||||||||||||
|
|
||||||||||||
| /** | ||||||||||||
| * Returns the __doc__ String for this type. | ||||||||||||
| * @return the {@code __doc__} string for this type. | ||||||||||||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @jeff5 You see, here I changed it just for consistency. The previous method |
||||||||||||
| */ | ||||||||||||
| String doc() default ""; | ||||||||||||
| } | ||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
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.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose, AE is more in line with PSF standard, so "initializing" it will be. Also, my dict says it's somewhat acceptable in BE unlike the other way round.