Got to admit I’ve not heard of it, though I have heard of “pettish”, of similar meaning.
OED says “unknown origin” but gives you plenty of options to consider…
Etymology: Origin unknown. Compare the apparent derivative pettish adj., which is first attested earlier.
Perhaps related to pet n.2, in which case pettish adj. may have been formed originally from pet n.2.2; however, a strong argument against is presented by the early geographical distribution of the words, pet n.2 being in early use distinctively Scots and northern English, whereas the present word is found also in the south from its earliest attestations onwards, and pettish adj. is apparently not found in Older Scots.
For a suggestion of an etymology from a spec. sense of French pet pet n.1 see L. Spitzer in Language 26 (1950) 533–8.
pet n.1 = fart
pet n.2.2 = “A person who is indulged, spoiled, or treated as a favourite”, “An indulged, spoiled, or favourite, child.”