I has a task to analyze Cpython’s source code quality, I know Cpython need to obey PEP7, but I don’t know which tool can help me to analyze code quality automatically. Can you help me?
I’m no expert at C, but PEP 7 mostly covers code style rather than code quality, with a few arguable exceptions. At least in a general sense, any C code quality tool should give a (perhaps opinionated) idea of where and how CPython measures up, and a simple Google search reveals numerous free and open source automatic code quality analysis tools for C to choose from. If you’re looking for something more specific, it would be helpful to clarify.
PEP 7 practically starts by noting that its “rules are there to be broken”. It lists best practices, not rules that can be checked automatically. (And PEP8, the document about Python code style, is very similar in this.)
You should probably first define what exactly you mean by “source code quality”, and go from there. Be prepared to find that metrics that are easily measured are often not very important.