Analyticity of solitary wave solutions to generalized Kadomtsev—Petviashvili equations