Apply suggestions from code review
Apply suggestions from code review

Co-authored-by: Tom Aldcroft <828568294c42bba1e6aaba03091b03d85160ad3c@gmail.com>
larrybradley/astropy,larrybradley/astropy,lpsinger/astropy,mhvk/astropy,mhvk/astropy,pllim/astropy,lpsinger/astropy,astropy/astropy,lpsinger/astropy,astropy/astropy,larrybradley/astropy,pllim/astropy,larrybradley/astropy,mhvk/astropy,pllim/astropy,lpsinger/astropy,astropy/astropy,astropy/astropy,pllim/astropy,pllim/astropy,mhvk/astropy,astropy/astropy,larrybradley/astropy,lpsinger/astropy,mhvk/astropy