Plugin, library, and reports for reading Conservancy's books
959bda307b
These were tightened up by running mypy with --disallow-any-generics and cleaning up reported errors. There are still a couple of cases I don't know how to deal with right now that prevent me from setting that option permanently: * plugin/__init__.py sets up a dict where the key is a Directive and its value is a set of hooks that correspond to that type of directive. The relationship between key and value is not expressable through the type system, and any other solution would make the code way more involved and less dynamic. * The type variable used in _GenericRange still isn't quite right, in the sense that specifying a value for CT creates more errors I don't know how to deal with. Protocols seem like the right solution for that but they apparently didn't land for Python 3.7 that I can see. |
||
---|---|---|
conservancy_beancount | ||
tests | ||
.gitignore | ||
LICENSE.txt | ||
pytest.ini | ||
README.rst | ||
setup.cfg | ||
setup.py |
Beancount plugin and tools for Conservancy's books ================================================== Running tests ------------- Run:: ./setup.py test Type checking ------------- Most of the code is typed, except for very dynamic loader methods. To run the type checker:: ./setup.py typecheck This is expected to pass just like the unit tests. Legal ----- Copyright © 2020 Brett Smith. Licensed under the `GNU Affero General Public License <https://www.gnu.org/licenses/agpl-3.0.html>`_, either version 3 of the License, or (at your option) any later version.