Skip to content
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

Fix documentation build due to class being name shadowed by a singleton #1378

Merged
merged 1 commit into from
Jan 4, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions traits/trait_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class NoDefaultSpecified(object):
pass


NoDefaultSpecified = NoDefaultSpecified()
no_default_specified = NoDefaultSpecified()


class TraitType(BaseTraitHandler):
Expand Down Expand Up @@ -173,7 +173,7 @@ class TraitType(BaseTraitHandler):
#: The metadata for the trait.
metadata = {}

def __init__(self, default_value=NoDefaultSpecified, **metadata):
def __init__(self, default_value=no_default_specified, **metadata):
""" TraitType initializer

This is the only method normally called directly by client code.
Expand All @@ -183,7 +183,7 @@ def __init__(self, default_value=NoDefaultSpecified, **metadata):
Override this method whenever a different method signature or a
validated default value is needed.
"""
if default_value is not NoDefaultSpecified:
if default_value is not no_default_specified:
self.default_value = default_value

if len(metadata) > 0:
Expand Down Expand Up @@ -257,7 +257,7 @@ def get_default_value(self):

return (dvt, dv)

def clone(self, default_value=NoDefaultSpecified, **metadata):
def clone(self, default_value=no_default_specified, **metadata):
""" Copy, optionally modifying default value and metadata.

Clones the contents of this object into a new instance of the same
Expand Down Expand Up @@ -294,7 +294,7 @@ def clone(self, default_value=NoDefaultSpecified, **metadata):

new._metadata.update(metadata)

if default_value is not NoDefaultSpecified:
if default_value is not no_default_specified:
new.default_value = default_value
if self.validate is not None:
try:
Expand Down