def check_astroyear(year, field, config=None, pos=None):
 if ((year is not None) and (re.match(u'^[JB]?[0-9]+([.][0-9]*)?$', year) is None)):
  warn_or_raise(W07, W07, (field, year), config, pos)
  return False
 return True

def check_astroyear ( year , field , config = None , pos = None ) : if ( ( year is not None ) and ( re . match ( u'^[JB]?[0-9]+([.][0-9]*)?$' , year ) is None ) ) : warn_or_raise ( W07 , W07 , ( field , year ) , config , pos ) return False return True
raises a ~astropy .