mypy icon indicating copy to clipboard operation
mypy copied to clipboard

stubgen: fix FunctionContext.fullname for nested classes

Open chadrik opened this issue 1 year ago • 1 comments

This fixes an issue with the computation of FunctionContext.fullname for nested classes.

For a module named spangle, with the following classes:

class Foo:
    class Bar:
        pass

The previous output for the class Bar was "spangle.Bar" and with this fix it is now "spangle.Foo.Bar".

chadrik avatar Oct 16 '24 01:10 chadrik

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

github-actions[bot] avatar Oct 16 '24 02:10 github-actions[bot]

Could you add a test please?

hamdanal avatar Oct 27 '24 10:10 hamdanal

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

github-actions[bot] avatar Oct 28 '24 02:10 github-actions[bot]

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

github-actions[bot] avatar Oct 28 '24 16:10 github-actions[bot]

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

github-actions[bot] avatar Oct 28 '24 16:10 github-actions[bot]

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

github-actions[bot] avatar Oct 28 '24 19:10 github-actions[bot]

@hamdanal Test added and all tests passing.

chadrik avatar Oct 28 '24 20:10 chadrik

bump

chadrik avatar Nov 02 '24 00:11 chadrik