Join GitHub today
Add Class Decorator/Metaclass/Base Class plugin #4328
Sorry for a long delay! This looks good for a start. You can start adding tests to show how it works with
attrs. Also could you please fix lint failures and mypy self check? (see Travis logs)
referenced this pull request
Dec 13, 2017
Thanks! This is almost ready, only some style comments.
Since the plugins are run in the second pass of semantic analysis, I wonder how they will interact with things that happen later during semantic analysis? This might affect forward references at least. It's worth testing this at some point (and maybe writing test cases -- see below). This can happen in a later PR, but it's worth creating an issue to track this.
It's possible to write tests focused on the plugin architecture. It would be nice to have at least a few tests not specific to any real plugin. The file
test-data/unit/check-custom-plugin.test has the existing test cases. This can happen in a separate PR.
TypeAnalyzerPluginInterface to make it clear how it's different from the new ABC?
And sorry for the late minute review!
No problem, thanks! I have opened #4363 to track the tests.
Yes, it makes to have tests specifically for forward references. I created a separate issue for this #4364