Skip to content

Commit

Permalink
Pay attention to WARN_COLUMN_ARGS for issuing the args order warning
Browse files Browse the repository at this point in the history
  • Loading branch information
taldcroft committed Feb 7, 2013
1 parent 69ed301 commit f91436c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions astropy/table/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Licensed under a 3-clause BSD style license - see LICENSE.rst
from .table import Column, Table, TableColumns, Row, MaskedColumn
from .table import Column, Table, TableColumns, Row, MaskedColumn, WARN_COLUMN_ARGS

# Import routines that connect readers/writers to astropy.table
from ..io.ascii import connect
from ..io.misc import connect
from ..io.votable import connect
from ..io.votable import connect
2 changes: 1 addition & 1 deletion astropy/table/table.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def _check_column_new_args(func):
"""
@functools.wraps(func)
def wrapper(*args, **kwargs):
if len(args) > 1:
if len(args) > 1 and WARN_COLUMN_ARGS():
cls = args[0] # Column or MaskedColumn class from __new__(cls, ..)
warnings.warn(WARN_COLUMN_ARGS_MESSAGE.format(class_name=cls.__name__))
return func(*args, **kwargs)
Expand Down

0 comments on commit f91436c

Please sign in to comment.