If you’re using an editable install of nbdev, you can git pull the latest nbdev code and this should start working for you. This new nbdev code should be available via the regular pip installer in a couple of weeks.
If you can’t use an editable install, you can add the thing you’re patching to __all__. e.g.: _all_ = ['Tensor'].
There’s an autogenerated file called _nbdev.py inside your lib folder. I pushed the changes done in my library but forgot push the changes occured in _nbdev.py file (auto-generated). After pushing those changes as well, it solved my issue. But lately, it’s occurring more frequently I don’t know any other cause for the same.
No nbdev allows you to write code outside notebooks for your library also. Therefore we don’t delete files for you with the assumption that you may have created that manually.