Marco-Sulla / python-frozendict

A simple immutable dictionary for Python
https://github.com/Marco-Sulla/python-frozendict
GNU Lesser General Public License v3.0
133 stars 16 forks source link

[BUG] frozendict.deepfreeze is not in __init__.pyi #99

Closed jclerman closed 5 months ago

jclerman commented 5 months ago

My IDE complains that frozendict.deepfreeze() is not advertised in __init__.pyi.

Steps to reproduce:

  1. In PyCharm, write code that accesses the deepfreeze function, like:
    
    import deepfreeze

def temp(x): return frozendict.deepfreeze(x)



**Actual result:**
I get a warning flagged in PyCharm (even though the code runs fine):

![image](https://github.com/Marco-Sulla/python-frozendict/assets/19315670/5b817820-0689-4359-a20e-b12c87122429)
jclerman commented 5 months ago

NOTE: This also causes mypy to complain thusly:

error: Module has no attribute "deepfreeze"  [attr-defined]
Marco-Sulla commented 5 months ago

ty for the issue. Fixed in 2.4.34

jclerman commented 5 months ago

Thanks for the quick fix!!

By the way, when looking into how this was done I happened upon this notice from GitHub. Not sure if it's worth fixing - looks like maybe the tag was applied to a deleted branch instead of to the main branch?

image

Marco-Sulla commented 5 months ago

I have done some mess with the push. I don't know what happened in detail. Anyway, it seems that 2.4.3 contains only the fix of enum with deepfreeze. I just released 2.4.4, that now contains the fix for this issue.