fastai / fastcore

Python supercharged for the fastai library
http://fastcore.fast.ai
Apache License 2.0
954 stars 274 forks source link

fixes 487 #564

Open deven367 opened 3 months ago

deven367 commented 3 months ago

This PR is a continuation of the previous PR #488. The PR closes #487 and closes #488.

review-notebook-app[bot] commented 3 months ago

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

deven367 commented 3 months ago

H/T to @Salehbigdeli for fixing the issue. I created a new PR because I could not push to the existing PR in #488.

@jph00 can you take a look at this?

jph00 commented 3 months ago

Thank you! The fastcore CI test can be ignored -- that was my fault and it's fixed now. Can you check the nbdev integration test? Does this PR change the behavior in a user-facing way?

deven367 commented 3 months ago

@jph00 I don't think the PR changes the behavior in a user facing way.

The integration test fails due to a missing statement in Returns in while processing the DocmentTbl for the function

def _f(a,
        b, #param b
        c  #param c
       ): ...

The variable

_exp_res2 = """
|    | **Details** |
| -- | ----------- |
| a |  |
| b | param b |
| c | param c |
"""

should be

_exp_res2 = """
|    | **Details** |
| -- | ----------- |
| a |  |
| b | param b |
| c | param c |
| **Returns** |  |
"""

So the functions that don't have a specific return type, should they have a returns in the DocmentTbl?

jph00 commented 3 months ago

I think it must be this PR that's causing the test failure. Other PRs to fastcore the last few days haven't triggered it, and this PR is changing the anno result for 'returns' to an empty string. Could you possibly take a closer look?

deven367 commented 2 months ago

Hi @jph00, I tried to make sense of the failing test case, but I can't understand how is anno result and return is being populated :sweat_smile: