| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
LGTM (minor comment about a docstring below)
Sorry, something went wrong.
| def analyze_class_decorator_common( | ||
| self, defn: ClassDef, info: TypeInfo, decorator: Expression | ||
| ) -> None: | ||
| """Common part for all class decorators. |
There was a problem hiding this comment.
| """Common part for all class decorators. | |
| """Common hook for applying class decorators. |
Sorry, something went wrong.
There was a problem hiding this comment.
Done! Thanks, except it is not a hook. By hooks we often mean things like self.plugin.get_customize_class_mro_hook(defn.fullname)
Sorry, something went wrong.
|
According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅ |
Sorry, something went wrong.
|
Nice! pywin32 has some named-tuples it generates dynamically but doesn't expose. https://github.com/python/typeshed/blob/main/stubs/pywin32/win32/lib/win32gui_struct.pyi |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
I've noticed that TypedDict and NamedTuple classes are special cased during semantic analyzisys. They had their own logic for class-level decorators. This is fine, but we need some common ground.
As a side-effect, they can now be type_check_only!