Skip to content

demonstrate similarity for discussion purposes #18126

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

Closed
wants to merge 3 commits into from

Conversation

jbrockmendel
Copy link
Member

This is a demonstration rather than an actual PR.

There is some very similar logic in internals.make_block and internals.form_blocks. For demonstration this PR separates the relevant bits out into _get_block_klass and get_block_type, respectively.

Suppose that the small differences in these two new functions were reconciled. Then adding a custom block type would be a matter of adding it to _block_type_klasses along with registering some kind of hook in _get_block_klass.

There would need to be some cleanup at the end of form_blocks to map block types to _foo_blockify functions.

ref #17144
noci

@pep8speaks
Copy link

pep8speaks commented Nov 5, 2017

Hello @jbrockmendel! Thanks for updating the PR.

Cheers ! There are no PEP8 issues in this Pull Request. 🍻

Comment last updated on November 05, 2017 at 18:17 Hours UTC

@jbrockmendel jbrockmendel deleted the blocking branch December 8, 2017 19:40
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.

2 participants