Earlier quoted context omitted.
This depends a lot on local climate and topography. Seattle has kind of been a bust with them because the hills really reduce the amount of charge, and on top of that the existing bus depots are already full, so switching to electric only would mean having to find and locate space for more bus depots, which is quite difficult.
Hills should never reduce the range, because the energy lost during climbing up is recovered when going downhill. This is one of the great advantages of electric vehicles with batteries, when properly designed. Electric buses with batteries are even more suitable for cities with hills than for cities without hills, because they provide greater energy savings over buses with ICEs. While I have never used buses with ba…
The other problem is that because battery weight is so large, that in itself becomes a limiting factor for hilly operation where it is not really relevant for trolleybuses. And trolleybuses can feed current from uphill buses to downhill buses through the wires, but there's no such connection on battery buses.