Show More
@@ -51,6 +51,7 try: | |||
|
51 | 51 | ClassTypes = (ClassType, type) |
|
52 | 52 | except: |
|
53 | 53 | ClassTypes = (type,) |
|
54 | from warnings import warn | |
|
54 | 55 | |
|
55 | 56 | from .importstring import import_item |
|
56 | 57 | from IPython.utils import py3compat |
@@ -330,6 +331,13 class TraitType(object): | |||
|
330 | 331 | if allow_none is not None: |
|
331 | 332 | self.allow_none = allow_none |
|
332 | 333 | |
|
334 | if 'default' in metadata: | |
|
335 | # Warn the user that they probably meant default_value. | |
|
336 | warn( | |
|
337 | "Parameter 'default' passed to TraitType. " | |
|
338 | "Did you mean 'default_value'?" | |
|
339 | ) | |
|
340 | ||
|
333 | 341 | if len(metadata) > 0: |
|
334 | 342 | if len(self.metadata) > 0: |
|
335 | 343 | self._metadata = self.metadata.copy() |
General Comments 0
You need to be logged in to leave comments.
Login now