Let’s assume, hypothetically, that an independent journalist working in Washington somehow obtained a confidential FBI report on the death of a prominent Trump administration official that described its lurid circumstances, including the presence of a woman not his wife and the use of illegal drugs that caused, or at least contributed to, his demise.

Let’s also assume that the Justice Department responded to the disclosure by raiding the journalist’s home and confiscating computers and other tools of his trade, hoping to learn who leaked the report.

Democratic politicians and civil libertarians would erupt in outrage at a heavy-handed government act intended to discourage journalists from delving into areas that officialdom considered off-limits.

So where is that outrage about the San Francisco Police Department’s May 10 assault on journalist Bryan Carmody, who had obtained a police report about the death of San Francisco Public Defender Jeff Adachi under exactly those unbecoming circumstances?

Carmody sold the information to three San Francisco television stations, which is how freelance journalists make their livings, and it obviously tarnished the image of Adachi, who had been something of a heroic figure to those in the city’s left-leaning political culture.

They assumed that someone in the police department had leaked the report to Carmody to damage Adachi’s reputation in retaliation for his many battles with cops in court.

Whatever the motive, no one disputes the accuracy of the report. However, police were under political pressure to find the leaker and felt justified in conducting a paramilitary raid on Carmody’s homethe kind usually associated with gun-toting suspects.

In the aftermath, San Francisco Mayor London Breed, among others, contended that it was fully justified. She said police “went through the appropriate legal process to request a search warrant, which was approved by two judges.”

More that a week later, after the state’s news media had condemned the action, Breed backtracked a little. She said that although she wanted a “thorough investigation” into the leak, “I am not okay with police raids on reporters. We need to do better.”

“However,” she added, “two judges issued the search warrant, and I have to believe that the judges’ decision was legal and warranted, and therefore so was the search. Whether or not the search was legal, warranted and appropriate, however, is another question…. And the more we learn, the less appropriate it looks to me.”

It was the sort of wishy-washy, have-it-both-ways positioning that makes ordinary citizens despise politicians.

Fortunately, not all city officials were as ambivalent. City Supervisors Hillary Ronen, Aaron Peskin and Matt Haney criticized the raid, the latter calling it a “direct attack” on journalists. District Attorney George Gascón was also critical.

What happened to Carmody is reminiscent of what happened when UC Berkeley’s Investigative Reporting Program used California’s Public Records Act to obtain nearly 12,000 names of law enforcement officers or applicants who had committed crimes ranging from shoplifting to murder.

Those convictions themselves are matters of public record, and the compilation came via a PRA request from the Commission on Police Officer Standards and Training (POST).

Although a new law requires records of police misconduct to be made public, state Attorney General Xavier Becerra threatened legal, or even criminal, action against the Investigative Reporting Program.

Becerra demanded that the records be returned or destroyed, saying they shouldn’t have been released, and warned that “unauthorized receipt or possession” of the data is a misdemeanor.

We’ve come to expect harassment and even intimidation of journalists in places like Vladimir Putin’s Russia or Nicolas Maduro’s Venezuela, but in supposedly enlightened and liberal California?