Other than the action serials of the 1930s and 40s there was very very few leading roles for women as the hero. Most leading roles at the time were primarily drama, mother of a family struggling to keep the family together and such or a woman trying to become a star was another popular theme. But there the odd hero role for women.
Starting in the silent film era there was the odd western about a female gunfighter. 1918 had The Gun Woman. In the 1935 Annie Oakley a bio-pic about the sharp shooter starred Barbara Stanwyck, in 1935 The Plainsman starring Gary Cooper as Wild Bill had Jean Arthur as Calamity Jane but only in a non fighting side role. 1941 had the romanticized bio-pic Belle Starr (Gene Tierney) the notorious outlaw although the movie makes her more sympathetic, less of robbing criminal and more of a patriotic freedom fighter.
In 1948 Jane Russell co-starred in The Paleface as Calamity Jane with Bob Hope. In this comedy Jane is working for the government trying to stop a gun runner by going undercover. She ends up using hopeless Bob Hope as cover. Hope is a terrible dentist and coward but Jane pretends that he is really the crack shot defeating all the bad guys in an attempt to use him as bait to draw out the really bad guys. Comedy and songs ensue.