- Use '/' key to quickly access this field.
- Enter a name of repository, or repository group for quick search.
- Prefix query to allow special search:
user:admin, to search for usernames, always global
user_group:devops, to search for user groups, always global
pr:303, to search for pull request number, title, or description, always global
commit:efced4, to search for commits, scoped to repositories or groups
file:models.py, to search for file paths, scoped to repositories or groups
For advanced full text search visit: repository search
Give subclasses of the Instance traitlet the option of overriding the klass variable to have a default klass....
Give subclasses of the Instance traitlet the option of overriding the klass variable to have a default klass.
This makes it easy to construct traitlets for specific object types and default metadata. For example, we can have a traitlet for numpy arrays that gives default values for `to_json` and `from_json`:
```python
def np_to_list(a):
if a is not None:
return a.tolist()
def np_from_list(a):
if a is not None:
return np.array(a)
class NDArray(Instance):
klass = np.ndarray
metadata = {'to_json': np_to_list,
'from_json': np_from_list}
```
Then the NDArray traitlet will by default have the klass and some custom metadata.