Boundary-layer instability is influenced by non-parallel-flow effects, that is, the streamwise variation of the mean flow not only modifies directly the growth rate but also distorts the shape (i.e., the transverse distribution) of the disturbance, thereby affecting the growth rate indirectly. In this paper, we present a simple but effective local approach to spatial instability of three-dimensional boundary layers, which takes into account both direct and indirect effects of non-parallelism. Unlike existing WKB/multi-scale type of methods, the present approach is non-perturbative in which non-parallelism does not need to be a higher-order correction to the leading-order prediction by the parallel-flow approximation. The non-parallel-flow effects are accounted for by expanding the local mean flow and the shape function as Taylor series, and this leads to a sequence of extended eigenvalue problems, depending on the order of truncation of the Taylor series. These eigenvalue problems can be solved effectively by standard numerical methods. In the case of the Blasius boundary layer, the predictions are verified and confirmed by direct numerical simulation results as well as by the non-parallel theory of Gaster. The non-parallel-flow effects on the eigenvalues, eigenfunctions, and neutral curves for planar and oblique Tollmien-Schlichting (T-S) waves are discussed. The distortion of the eigenfunction is found to have a significant effect, which may be stabilizing or destabilizing depending on the ranges of the Reynolds number and frequency.