Apply suggestions from code review
Apply suggestions from code review

Co-authored-by: Leo Singer <d04980fe3fcc89807626e3477ce18be5c06e7d79@ligo.org>
StuartLittlefair/astropy,StuartLittlefair/astropy,aleksandr-bakanov/astropy,pllim/astropy,mhvk/astropy,astropy/astropy,astropy/astropy,StuartLittlefair/astropy,StuartLittlefair/astropy,saimn/astropy,pllim/astropy,astropy/astropy,lpsinger/astropy,saimn/astropy,larrybradley/astropy,astropy/astropy,saimn/astropy,astropy/astropy,lpsinger/astropy,lpsinger/astropy,larrybradley/astropy,pllim/astropy,pllim/astropy,larrybradley/astropy,larrybradley/astropy,mhvk/astropy,mhvk/astropy,mhvk/astropy,mhvk/astropy,lpsinger/astropy,saimn/astropy,lpsinger/astropy,pllim/astropy,aleksandr-bakanov/astropy,aleksandr-bakanov/astropy,saimn/astropy,StuartLittlefair/astropy,larrybradley/astropy,aleksandr-bakanov/astropy