pycg can‘t find the real function
repo:https://github.com/PaddlePaddle/PaddleClas cmd :pycg --package ppclas $(find ppclas -type f -name "*.py") -o ppclas.json error: funciton:ppcls/arch/backbone/base/theseus_layer.py is subclass paddle.nn.Layer the function train is from nn.Layer but the ppclas.json not show this message e.g.:
PyCG can only analyze the code that it has been given. It can't know what the parent class contains and therefore cannot identify that particular call.
I still have some problems, as you have said, we shouldn‘t get ppadle.nn.Layer.train
but at the top function :engine.py: def train()
PyCG get ppadle.nn.Layer.train
e.g.:

This happens because PyCG tries to do some basic inference about what was the external function that was called based on the imports. More specifically, when PyCG sees something along the lines of
from xyz.pkg import smth
smth()
it can understand that there was a call to the smth() function inside the xyz.pkg module. However, we can't go further than that because we do not have the code for xyz.pkg.