My electrician installed a receptacle that was not childproof, required by code revisions that were ten years old. He installed a precode one bought in, where else, a big box store. So he had to replace it before the inspector came. He knew it too yet didn't advise me until I told him I was setting up the inspection Then he "remembered" and called me to hold off until he replaced the receptacle.
Don't assume the electrician knows either or won't cut corners. I tell my electrician I want him to file everything for a final inspection. That insures he'll do the work correctly to current codes.
Finally, get the Building's Department inspector to sign off the work to avoid issues later when you sell the home. I think it cost me $75 to file the work scope and inspect it. It's worth it.