Jukka Lehtosalo
Jukka Lehtosalo
This is derived from a real-world example, where the assignment corresponding to `g = f` was `__nonzero__ = __bool__`, which is probably pretty common in code that originally supported Python...
Your best bet may be to have a function that returns the singleton instance (and constructs it as needed). Then you can add some check in the `__init__` to fail...
This looks like the same issue as #1064. Closing as a duplicate, since the other issue has a smaller reproducer.
> `if isinstance(ops, PrimitiveDescription):` This and the following line can probably be removed, since the `isinstance` check can never be true.
The unreachable code is now removed on master.
I can try to review this -- possibly next week. It would help if the merge conflict was fixed.
I can see how this could be useful., and this shouldn't be hard to implement Random thoughts: * What about `--use-installed-package X` as the option name? The inverse would be...
Ah one more thing before merging: Is the mypy primer output as expected?
Reopening, since the original implementation was reverted due to some issues (#17864).
@Jordandev678 Sure! The original PR can be resubmitted once the issues have been addressed.