-
Notifications
You must be signed in to change notification settings - Fork 99
Format code examples in the user documentation #1640
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
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
e2f6da9
CLN : Format code examples in docs
a070f64
CLN : Move docs examples into the docs tree
f374b49
CLN : Replace array editor with literalinclude in factories basic
2944737
CLN : literalinclude enum editor in factories basic
aefa4ac
CLN : code formatting in array editor example
0ea8f2e
CLN : literalinclude instance editor selection
5ac7176
CLN : literalinclude key bindings example
51c091b
CLN : literalinclude tree editor example
37d2291
CLN : literalinclude wizard and configure_traits_view_buttons
2d1208a
CLN : literalinclude default_traits_view and multiple_views
d37c329
CLN : literalinclude multi_object_view
7c49ae5
CLN : literalinclude configure_traits_view_group
d3094e5
CLN : literalinclude configure_traits_view
82c895e
CLN : literalinclude handler_override
670d09b
FIX : Ignore wizard in integrationtests
b37b99e
CLN : Minor formatting issues
e37c5bc
CLN : literalinclude default_traits_view2
393695c
CLN : minor formatting changes based on PR review
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| # (C) Copyright 2004-2021 Enthought, Inc., Austin, TX | ||
| # All rights reserved. | ||
| # | ||
| # This software is provided without warranty under the terms of the BSD | ||
| # license included in LICENSE.txt and may be redistributed only under | ||
| # the conditions described in the aforementioned license. The license | ||
| # is also available online at http://www.enthought.com/licenses/BSD.txt | ||
| # | ||
| # Thanks for using Enthought open source! | ||
|
|
||
| # array_editor.py -- Example of using array editors | ||
|
|
||
| import numpy as np | ||
|
|
||
| from traits.api import Array, HasPrivateTraits | ||
| from traitsui.api import ArrayEditor, Item, View | ||
| from traitsui.menu import NoButtons | ||
|
|
||
|
|
||
| class ArrayEditorTest(HasPrivateTraits): | ||
|
|
||
| three = Array(np.int, (3, 3)) | ||
|
|
||
| four = Array( | ||
| np.float, (4, 4), editor=ArrayEditor(width=-50), | ||
| ) | ||
|
|
||
| view = View( | ||
| Item('three', label='3x3 Integer'), | ||
| '_', | ||
| Item('three', label='Integer Read-only', style='readonly'), | ||
| '_', | ||
| Item('four', label='4x4 Float'), | ||
| '_', | ||
| Item('four', label='Float Read-only', style='readonly'), | ||
| buttons=NoButtons, | ||
| resizable=True, | ||
| ) | ||
|
|
||
|
|
||
| if __name__ == '__main__': | ||
| ArrayEditorTest().configure_traits() | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 should almost definitely end up in
traitsui/examples/demo/StandardEditors