| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
I kinda think object.__module__ shouldn't actually exist: >>> object().__module__
Traceback (most recent call last):
File "<string>", line 1, in <module>
AttributeError: 'object' object has no attribute '__module__' |
Sorry, something went wrong.
|
Diff from mypy_primer, showing the effect of this PR on open source code: streamlit (https://github.com/streamlit/streamlit)
+ lib/tests/streamlit/runtime/caching/hashing_test.py:29: note: ... from here:
SinbadCogs (https://github.com/mikeshardmind/SinbadCogs)
+ devtools/core.py:193: error: Cannot assign to class variable "__module__" via instance
yarl (https://github.com/aio-libs/yarl)
+ yarl/_url.py:19: error: Cannot assign to class variable "__module__" via instance [misc]
werkzeug (https://github.com/pallets/werkzeug)
+ src/werkzeug/utils.py:89: error: Cannot assign to class variable "__module__" via instance [misc]
|
Sorry, something went wrong.
|
Looking at them, I'm fine with taking these primer hits, but I'm a little worried about all the stubs that have this. I'm happy to have object.__module__ exist, it's in line with several things we do. There's a small chance removing it wouldn't be the worst, though, since we still have __module__ on type. |
Sorry, something went wrong.
I know, but I'm not sure I'm super jazzed about those things either ¯\_(ツ)_/¯ |
Sorry, something went wrong.
An alternative approach to #8787
#8789 went down like a bag of sick, so if we want to fix this, this does indeed look like the better solution, at least for now :) |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
The reported use case for this isn't particularly compelling, so if this causes too many errors I will close.