-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #97 from Zuehlke/docs/mypy
Add mypy issues to docs
- Loading branch information
Showing
2 changed files
with
16 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
ConfZ and MyPy | ||
============== | ||
|
||
ConfZ heavily relies on Metaclasses for its lazy loading and singleton design. Unfortunately, MyPy has limited support | ||
for them so far (see `docs <https://mypy.readthedocs.io/en/stable/metaclasses.html>`_). Thus, it is likely that you | ||
will get an error similar to this:: | ||
|
||
Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases | ||
|
||
So far, the only solution is to ignore these errors:: | ||
|
||
class MyConfig(BaseConfig): # type: ignore | ||
my_variable: bool | ||
|
||
Future versions of MyPy might be able to correctly check ConfZ classes. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters