-
Notifications
You must be signed in to change notification settings - Fork 784
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
Automated module= field creation in declarative modules #4213
Conversation
95da40e
to
8f9358d
Compare
👍 thanks, I'll try to review later. Also, I find myself wanting to use declarative modules all the time so I'm tempted to call them stable once we merge this! 😁 |
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.
Thanks, I think this implementation looks reasonable to me! Just needs some documenting and then I think we can ship in 0.22!
}; | ||
|
||
#[derive(Default)] | ||
pub struct PyModuleOptions { | ||
krate: Option<CrateAttribute>, | ||
name: Option<syn::Ident>, | ||
module: Option<ModuleAttribute>, |
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.
This new attribute probably needs documenting in the guide.
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.
Done. Sorry for the huge lag
Sets automatically the "module" field of all contained classes and submodules in a declarative module Adds the "module" field to pymodule attributes in order to set the name of the parent modules. By default, the module is assumed to be a root module
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.
Thanks, LGTM!
Sets automatically the "module" field of all contained classes and submodules in a declarative module
Adds the "module" field to
#[pymodule]
attributes in order to set the name of the parent module. By default, the module is assumed to be a root module.