Skip to content

Add docs to blocks context postprocessing function#2332

Merged
freddyaboulton merged 1 commit into
gradio-app:mainfrom
Ian-GL:igl-fix-blocks-context-doc-fn
Sep 26, 2022
Merged

Add docs to blocks context postprocessing function#2332
freddyaboulton merged 1 commit into
gradio-app:mainfrom
Ian-GL:igl-fix-blocks-context-doc-fn

Conversation

@Ian-GL
Copy link
Copy Markdown
Contributor

@Ian-GL Ian-GL commented Sep 25, 2022

Description

There is an issue adding 'api_name' to a function that updates a column. The stacktrace showed this was the error:

File "/Users/ian/Development/gradio/gradio/documentation.py", line 45, in document_fn
    doc_lines = doc_str.split("\n")
AttributeError: 'NoneType' object has no attribute 'split'

The function that the doc_str referred to in this case was BlockContext.postprocess, so just adding docs to that function was enough to fix the issue.

Closes: #2251

Checklist:

  • I have performed a self-review of my own code
  • My code follows the style guidelines of this project
  • I have commented my code in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Copy link
Copy Markdown
Collaborator

@freddyaboulton freddyaboulton left a comment

Choose a reason for hiding this comment

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

Thanks @Ian-GL !

@freddyaboulton freddyaboulton merged commit 027bbc0 into gradio-app:main Sep 26, 2022
@Ian-GL Ian-GL deleted the igl-fix-blocks-context-doc-fn branch September 26, 2022 14:57
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.

Cannot add an api name to a function that updates a Column

2 participants