-
Notifications
You must be signed in to change notification settings - Fork 31.1k
Enable SIM rules #39806
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
Enable SIM rules #39806
Changes from 1 commit
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 |
|---|---|---|
|
|
@@ -1411,8 +1411,8 @@ def _process_regular_parameters( | |
| param_type = f"[`{class_name}`]" | ||
| else: | ||
| param_type = f"[`{param_type.split('.')[-1]}`]" | ||
| elif param_type == "" and False: # TODO: Enforce typing for all parameters | ||
| print(f"🚨 {param_name} for {func.__qualname__} in file {func.__code__.co_filename} has no type") | ||
| # elif param_type == "" and False: # TODO: Enforce typing for all parameters | ||
| # print(f"🚨 {param_name} for {func.__qualname__} in file {func.__code__.co_filename} has no type") | ||
|
Comment on lines
+1414
to
+1415
Contributor
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. cc @yonigozlan to make sure it's a valid change
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. Not sure what happened here, must have left this when debugging. We can leave it like that and I'll check in another PR if we should enable this back and make it a hard requirement (raise an error) |
||
| param_type = param_type if "`" in param_type else f"`{param_type}`" | ||
| # Format the parameter docstring | ||
| if additional_info: | ||
|
|
@@ -1840,7 +1840,7 @@ def auto_class_docstring(cls, custom_intro=None, custom_args=None, checkpoint=No | |
| docstring += set_min_indent(f"\n{docstring_init}", indent_level) | ||
| elif is_dataclass: | ||
| # No init function, we have a data class | ||
| docstring += "\nArgs:\n" if not docstring_args else docstring_args | ||
| docstring += docstring_args if docstring_args else "\nArgs:\n" | ||
| source_args_dict = get_args_doc_from_source(ModelOutputArgs) | ||
| doc_class = cls.__doc__ if cls.__doc__ else "" | ||
| documented_kwargs, _ = parse_docstring(doc_class) | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.