Apply suggestions from code review
Apply suggestions from code review

Co-Authored-By: Adrian Price-Whelan <3738087e476317196ac2db7cf211c8325d8d8040@gmail.com>
larrybradley/astropy,mhvk/astropy,astropy/astropy,pllim/astropy,aleksandr-bakanov/astropy,StuartLittlefair/astropy,mhvk/astropy,saimn/astropy,dhomeier/astropy,lpsinger/astropy,lpsinger/astropy,pllim/astropy,dhomeier/astropy,pllim/astropy,astropy/astropy,saimn/astropy,pllim/astropy,pllim/astropy,astropy/astropy,saimn/astropy,lpsinger/astropy,StuartLittlefair/astropy,mhvk/astropy,dhomeier/astropy,astropy/astropy,mhvk/astropy,dhomeier/astropy,larrybradley/astropy,StuartLittlefair/astropy,aleksandr-bakanov/astropy,lpsinger/astropy,aleksandr-bakanov/astropy,dhomeier/astropy,mhvk/astropy,saimn/astropy,larrybradley/astropy,lpsinger/astropy,larrybradley/astropy,StuartLittlefair/astropy,aleksandr-bakanov/astropy,astropy/astropy,saimn/astropy,larrybradley/astropy,StuartLittlefair/astropy