The Pirates are six games over .500 for the second time this season in the wake of Sunday afternoon’s sweep-completing, 5-3 victory over Colorado.

It hasn’t happened by accident.

“We’ve been playing our best baseball since the calendar turned into May,” manager Clint Hurdle assessed. “We’ve gotten incrementally better. Obviously, in June we sparked. We’re in a good place in July.”

The 2-5 road trip to St. Louis and Cincinnati just prior to the All-Star break reminded us the Pirates are a flawed team, and that they’re going to have to figure out a way to play better baseball against the better teams on their schedule, especially on the road.

But that said the Brewers, Cardinals and Reds are likewise flawed.

And the Pirates, while imperfect, have played good enough baseball for a long enough time now that they have to be considered a legitimate contender in the NL Central right along with Milwaukee, St. Louis and Cincinnati.

That was a tough argument to make when the Pirates were 10-18 two games into May.

Their 42-28 record since confirms what they’re capable of when they play the game the way it needs to be played.

The most encouraging collective development this season is the Pirates apparently have a firm grasp of what’s required along those lines.

“It’s the same equation for any club,” Hurdle continued. “You need the starts off the mound. You need guys out of the bullpen picking things up. And offensively we’ve probably improved more this year than we have collectively as a group in any other year in terms of on-base percentage, execution, the overall aggressive mentality on the bases.

“On-base percentage is at an all-time high for us, guys are working counts. We’ve been able to get starters out earlier than in years past whether it be by runs or by pitch counts and getting to the bullpen. Every team wants to get a starter out where you can get that other side of the bullpen, not the bridge to the closer. We’ve been able to do that with some consistency.”

Solving the Pedro Alvarez problem at the plate and in the field would go a long way toward curing what ails the lineup.

And it would likewise be nice if first base wasn’t a relative black hole.

But imperfect as they are the Pirates emerged from the Rockies series leading the majors in on-base percentage (.333).

Their four stolen bases in the series finale upped their season total to 71, MLB’s fifth-highest total.

And we’re still waiting for the outfield trio of Starling Marte, Andrew McCutchen and Gregory Polanco to solidify in terms of consistent availability and productivity as a threesome. That should happen sooner rather than later, which should take some of the pressure off McCutchen to be consistently brilliant.

What the Pirates have become offensively this season has allowed them to survive having had to consistently cobble together a starting rotation, having had to work around Francisco Liriano and Gerrit Cole having less than Cy Young-caliber seasons to this juncture.

The division and wild-card races are tight and figure to stay that way.

The Pirates don’t appear to be a team that’s poised to run away from the pack in either instance.

But nor do they look like a team that isn’t capable of staying in the thick of the chase the rest of the way.

That’s been the plan all along.

And so far the plan has proven well worth following.