Skip to content

Commit fb14029

Browse files
fix error message and release date
1 parent 0826d94 commit fb14029

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

datajoint/__init__.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
http://dx.doi.org/10.1101/031658
1515
"""
1616

17-
__author__ = "Dimitri Yatsenko, Edgar Y. Walker, and Fabian Sinz at Baylor College of Medicine"
18-
__date__ = "January 14, 2018"
17+
__author__ = "DataJoint Contributors"
18+
__date__ = "February 7, 2019"
1919
__all__ = ['__author__', '__version__',
2020
'config', 'conn', 'Connection',
2121
'schema', 'create_virtual_module', 'get_schema_names',
@@ -26,7 +26,6 @@
2626
'DataJointError', 'DuplicateError', 'key']
2727

2828

29-
# ------------- flatten import hierarchy -------------------------
3029
from .version import __version__
3130
from .settings import config
3231
from .connection import conn, Connection
@@ -38,4 +37,4 @@
3837
from .erd import ERD
3938
from .admin import set_password, kill
4039
from .errors import DataJointError, DuplicateError
41-
from .fetch import key
40+
from .fetch import key

datajoint/declare.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -285,12 +285,10 @@ def compile_attribute(line, in_key, foreign_key_sql):
285285
else:
286286
if match['default']:
287287
quote = match['default'].upper() not in literals and match['default'][0] not in '"\''
288-
match['default'] = ('NOT NULL DEFAULT ' +
289-
('"%s"' if quote else "%s") % match['default'])
288+
match['default'] = 'NOT NULL DEFAULT ' + ('"%s"' if quote else "%s") % match['default']
290289
else:
291290
match['default'] = 'NOT NULL'
292291
match['comment'] = match['comment'].replace('"', '\\"') # escape double quotes in comment
293-
294292
is_configurable = match['type'].startswith(('external', 'blob-', 'attach'))
295293
is_external = False
296294
if is_configurable:
@@ -299,7 +297,7 @@ def compile_attribute(line, in_key, foreign_key_sql):
299297
match['comment'] = ':{type}:{comment}'.format(**match) # insert configurable type into comment
300298
store_name = match['type'].split('-')
301299
if store_name[0] not in ('external', 'blob', 'attach'):
302-
raise DataJointError('Invalid attribute type in:\n%s' % line)
300+
raise DataJointError('Configurable types must be in the form blob-<store> or attach-<store> in:\n%s' % line)
303301
store_name = '-'.join(store_name[1:])
304302
if store_name and not store_name.isidentifier():
305303
raise DataJointError(

0 commit comments

Comments
 (0)