remove some redundancy when parsing import spec
remove some redundancy when parsing import spec

--HG--
branch : plugin_no_pytest

mbirtwell/pytest,hunse/pytest,davidszotten/pytest,codewarrior0/pytest,abusalimov/pytest,chiller/pytest,Haibo-Wang-ORG/pytest,pfctdayelise/pytest,jb098/pytest,wfxiang08/pytest,mhils/pytest,mhils/pytest,eli-b/pytest,Haibo-Wang-ORG/pytest,Bachmann1234/pytest,pelme/pytest,Bjwebb/pytest,userzimmermann/pytest,mdboom/pytest,rouge8/pytest,ojake/pytest,rmfitzpatrick/pytest,gabrielcnr/pytest,ghostsquad/pytest,wfxiang08/pytest,RonnyPfannschmidt/pytest,ghostsquad/pytest,ropez/pytest,MengJueM/pytest,chiller/pytest,bubenkoff/pytest,ericdill/pytest,tomviner/pytest,Bachmann1234/pytest,codewarrior0/pytest,untitaker/pytest,inirudebwoy/pytest,alfredodeza/pytest,mdboom/pytest,takluyver/pytest,oleg-alexandrov/pytest,Akasurde/pytest,txomon/pytest,The-Compiler/pytest,chillbear/pytest,ojake/pytest,pelme/pytest,icemac/pytest,pytest-dev/pytest,etataurov/pytest,userzimmermann/pytest,mbirtwell/pytest,hpk42/pytest,jb098/pytest,MichaelAquilina/pytest,ionelmc/pytest,malinoff/pytest,bukzor/pytest,Carreau/pytest,hpk42/pytest,doordash/pytest,markshao/pytest,rouge8/pytest,MengJueM/pytest,chillbear/pytest,Carreau/pytest,nicoddemus/pytest,ddboline/pytest,The-Compiler/pytest,omarkohl/pytest,hackebrot/pytest,ionelmc/pytest,takluyver/pytest,nicoddemus/repo-test,inirudebwoy/pytest,tareqalayan/pytest,bubenkoff/pytest,ericdill/pytest,vodik/pytest,hunse/pytest,vmalloc/dessert,omarkohl/pytest,gabrielcnr/pytest,flub/pytest,nicoddemus/pytest,vodik/pytest,ropez/pytest,doordash/pytest,Bjwebb/pytest,tgoodlet/pytest,JonathonSonesen/pytest,icemac/pytest,nicoddemus/repo-test,abusalimov/pytest,lukas-bednar/pytest,skylarjhdownes/pytest,lukas-bednar/pytest,untitaker/pytest,bukzor/pytest,tomviner/pytest,JonathonSonesen/pytest,oleg-alexandrov/pytest,jaraco/pytest