Think of it as whistling past the graveyard, going for a long walk on a short pier or shuffling the deck chairs on the Titanic. Any and all of those images describe how City Hall and Albany are courting disaster by failing to face the facts of the new federal tax law.

Although the vast majority of New Yorkers will get a tax cut, the new limit of $10,000 of state and local tax deductions could yield federal tax hikes for many high earners.

They have been claiming most of the deductions in question because they pay the bulk of city and state income taxes. The changes could hit their wallets hard and give them an extra incentive to leave high-tax states.

And with a combined city and state top rates approaching 13 percent, New York is among the highest of the high. Without changes, the annual migration of wealthy New Yorkers to states with no income taxes could turn into a stampede.

They’ll take their wealth and income with them, creating budget emergencies here that could lead to layoffs and sharply reduced services. It’s not hard to imagine a declining quality of life leading still others to bolt in domino fashion.

Gov. Cuomo and Mayor de Blasio are aware of those grim scenarios, but you would never know it from their actions.

Nearly two months after President Trump signed the new tax law, both continue to spend as if the good times will last forever.

The mayor’s proposed budget is up by 4.7 percent, and Cuomo’s by 4.1 percent, according to analysts. And that’s before the city council and legislature add their wish lists.

Combined, city and state spending is nearing $200 billion for one year alone, but it’s never enough.

Yet instead of talking about the most logical response to the federal law — cutting local spending and tax rates — the two Democrats are acting as if attacking Trump and Republicans will make the problem go away.

It won’t, and Cuomo and de Blasio are wasting precious time they should use to start making New York more attractive to the biggest taxpayers.

Cuomo is at least playing around with two ideas he claims could mitigate the federal changes. One, a complex voluntary payroll-tax plan, aims to help employees of participating companies reduce their federal taxes to make up for the lost deductions.

His second idea would set up charities for health and education programs and let people pay state income taxes there, with payments then supposedly deductible.

Other states are trying similar gimmicks, and like New York, are vowing to sue Washington.

None of those sound like winning ideas. The complexities of the payroll-tax could sink it or severely limit its appeal, and the IRS could rule that the charities gambit is illegal.

As for the lawsuits, it’s hard to imagine the Supreme Court finding the tax law unconstitutional because it’s inconvenient for blue-state politicians.

Then again, Cuomo isn’t so much looking for an answer as buying time to get past his campaign for a third term.

Indeed, his comments about the tax law — it’s an “assault,” a “dagger” and a “missile — suggest he’s more interested in trying out talking points than changing the state’s killer tax-and-spend habits.

“He’s putting off the inevitable,” one insider says. “He gets the issue, but he wants to wait until after the election.”

Then there’s Mayor Putz. He believes the more spending the better, and is adding employees as if they are on sale.

Most city labor contracts expire this year, and with the average employee now costing taxpayers about $140,000 annually in salary and benefits, that number is certain to increase.

Yet, like a broken record — or an ideologue — the mayor has one answer for all problems: tax the rich. That will be hard if they move to Florida.

“He doesn’t believe in spending restraint,” the insider said. “For him, hiring and spending are a religion.”

Unlike the governor, the mayor is term-limited, so he’s probably planning to stick his successor with soaring costs. Meanwhile, he’ll spend his second term trying to create a national profile for himself as someone who is solving income inequality by making the rich poorer.

That’ll sell to the Bernie Sanders crowd, but the mayor should not make his case while standing next to a door in New York. He might get run over in the stampede for the exits.

FBI clues damn bam

“Don’t let up,” a friend living abroad wrote a few weeks ago about corruption at the FBI. “Trump has them all on the run.”

The note came to mind when I saw the weird e-mail Susan Rice wrote to herself on Inauguration Day last year.

At first glance, the e-mail, which purports to recount remarks President Obama made two weeks earlier to Rice, FBI head James Comey and others about the Russia probe, makes no sense. But ask yourself why Rice repeated that Obama wanted everything done “by the book,” and it smells as if she’s preparing a last-minute defense for Obama, and maybe herself.

Senators Chuck Grassley and Lindsey Graham, pit bulls on government misbehavior, wrote to Rice about the e-mail while noting that there were lots of doubts about whether the FBI actually did proceed “by the book.”

Hopefully, she’ll have to give her answer under oath, as should Comey and anybody else in the room.

As for Obama, I always assumed the corruption hunt would end up on his doorstep. I didn’t assume it would get there so quickly.

Times’ bad ‘my bad’

Corrections in The New York Times can obfuscate as well as reveal, and yesterday was a case in point. One began this way: “An Op-Ed essay on Saturday about the dangers of being a sanitation worker misstated the number of such workers killed on the job annually. It was 31 in 2016, not one a day.”

Wait, what? Instead of 365, the number of deaths was 31?

That’s a helluva error, and it sent me to find the essay, where it quickly became apparent that the mistake was hardly incidental. The inflated number was the basis of an original headline — “A Waste Worker Dies Everyday” — and author Carl Zimring used it to invoke Martin Luther King Jr. and his support for striking sanitation workers in Memphis, Tenn., the day before he was assassinated.

Having established an aura of death and the moral high ground, Zimring claimed that current working conditions “aren’t at all unlike those in Memphis in 1968.”

It’s a silly argument made possible only by the grossly inflated death totals. Once the actual numbers are known, the central claim of the entire piece makes no sense. But don’t hold your breath waiting for The Times to admit that.