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

Rename DateTime trait to Datetime trait #814

Merged
merged 2 commits into from
Jan 24, 2020
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion traits/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
Symbol,
WeakRef,
Date,
DateTime,
Datetime,
Time,
Supports,
)
Expand Down
8 changes: 4 additions & 4 deletions traits/editor_factories.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,17 +170,17 @@ def _datetime_to_datetime_str(datetime_obj, format="%Y-%m-%dT%H:%M:%S"):

def datetime_editor():
""" Factory function that returns an editor with date & time for
editing DateTime values.
editing Datetime values.
"""

try:
from traitsui.api import DateTimeEditor
from traitsui.api import DatetimeEditor

return DateTimeEditor()
return DatetimeEditor()

except ImportError:

logger.warn(msg="Could not import DateTimeEditor from "
logger.warn(msg="Could not import DatetimeEditor from "
"traitsui.api, using TextEditor instead")

from traitsui.api import TextEditor
Expand Down
4 changes: 2 additions & 2 deletions traits/trait_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -3588,8 +3588,8 @@ def resolve_class(self, object, name, value):
Date = BaseInstance(datetime.date, editor=date_editor)


# -- DateTime Trait definition ------------------------------------------------
DateTime = BaseInstance(datetime.datetime, editor=datetime_editor)
# -- Datetime Trait definition ------------------------------------------------
Datetime = BaseInstance(datetime.datetime, editor=datetime_editor)


# -- Time Trait definition ----------------------------------------------------
Expand Down