Commit Graph
49 Commits
Author SHA1 Message Date
Mike Auty 40fcdf9469 exceptions: SymbolErrors now contain specific information 2019-11-13 19:27:00 +00:00
Mike Auty e0b9d72c84 Update the license URL and LICENSE.txt 2019-09-25 21:44:05 +01:00
Mike Auty e922cef316 Improve docstrings for all plugins, and reformat all docstrings. 2019-09-07 22:59:54 +01:00
Mike Auty 9cde94bceb Change the license blurb on all files. 2019-08-27 23:11:00 +01:00
Mike Auty 4cde0da8a9 Support passing through functions from specific to generic template. 2019-08-10 00:25:21 +01:00
Mike Auty 94703d88d8 Fix up enumeration object creation. 2019-06-30 23:05:15 +01:00
Mike Auty 5b0f99229c Remove the VolTemplateProxy method proxying to fix the slowdown. 2019-04-18 01:48:56 +01:00
Mike Auty 8c76a25b2d Allow VolTemplateProxies to include additional useful methods. 2019-04-17 23:53:36 +01:00
Mike Auty c64ed6a8dd Remove validity checking in favour of static-type checking.
This removes the assertions that checked plugin devs didn't do anything
overly bad in favour of using mypy to ensure appropriate type-checking.

It also moves the ProgressCallback typing information to constants in
order to avoid circular imports (since constants doesn't import
anything).
2019-01-20 02:35:49 +00:00
Mike Auty fdc6efc4ad Add in the LICENSE and the README. 2018-12-19 23:55:03 +00:00
Mike Auty e65a00894a Minor style tweaks and mass changes across the codebase because of it. 2018-12-17 12:46:14 +00:00
Mike Auty 19572b6e1e Reformat all python files using yapf with custom volatility style. 2018-12-16 16:50:17 +00:00
Mike Auty 29d41470a4 Mass reformat of typing imports
Relented on the strict import of direct objects/classes for the typing
module only.  Typing module components can be directly imported because
it makes the code really painful to read and write otherwise.

This is still in-line with the python style guide adopted from Google at
http://google.github.io/styleguide/pyguide.html section 2.2.
2018-12-16 13:04:22 +00:00
Mike Auty 059be517fc Fix up minor typing issues. 2018-08-29 23:29:00 +01:00
Mike Auty 3a6b4ad35c Add in the has_member method for objects and templates. 2018-08-29 22:54:56 +01:00
Mike Auty 552101b593 Attempt to reduce the amount of time taken in calling templates. 2018-07-30 23:53:00 +01:00
Mike Auty 7a52ac9deb Fix a large number of typing issues.
There are several instances where mypy didn't detect

if blah is not None:
    blah = thing

and so were rewritten as:

blah = blah or thing
2018-06-04 01:25:02 +01:00
Mike Auty efada8a15f Bring relative_child_offset typing in line with practice. 2018-03-23 16:04:03 +00:00
Mike Auty f50a0b715d Add in object type-annotations. 2017-12-13 20:48:52 +00:00
Mike Auty f40fae197d Convert to python3.5 syntax (no local type-annotations). 2017-12-13 20:48:52 +00:00
Mike Auty 21b4506b7b Add in type-annotations for the remaining interfaces. 2017-12-13 20:48:52 +00:00
Mike Auty d32fc223e2 Fix up additional imports inconsistent with the coding style.
Note: also remove interfaces_configuration where ever possible
(this is not possible in the interfaces directory itself
because it would cause an import loop).
2017-08-09 22:32:44 +01:00
Mike Auty 5e15d522bd Remove automatic IDE-inserted attributions.
They weren't consistent and they show just remind me how slowly
I've been getting vol 3 written!  5:S

There's git commits to track all of that stuff if we need it.
2017-05-14 11:40:49 +01:00
Mike Auty e596c6a1b7 Further documentation updates. 2017-01-03 23:06:39 +00:00
Mike Auty a7ea6e2210 Improve the object/template documentation. 2017-01-01 01:43:08 +00:00
Mike Auty 390ccd330d Remove property from _unresolved, since we manually make it a property when necessary. 2016-12-27 22:32:25 +00:00
Mike Auty 09ee0e6258 Fix fairly deep flaw where resolved templates could be modified by casting or creating an object. 2016-12-18 19:21:27 +00:00
Mike Auty 667014a1fd Attempt to standardize error message display. 2016-10-30 17:51:45 +00:00
Mike Auty d1b58143fe Add in UnresolvedTemplate type.
This template type allows objects that have not been able to be resolved
to exist within the symbol system.  It emits a debug message on creation
so that intermediate format developers can identify potential issues,
but does not raise an exception so as to allow partial tables to be
used.

If the UnresolvedTemplate is called (to create an object) before the
symbol has been added to the symbolspace, it will fail with a
SymbolError (as thrown by the individual SymbolTable).  For this reason,
the class has been made private to the SymbolSpace class to prevent
unexpected use.
2016-10-30 16:54:12 +00:00
Mike Auty e02feed16e Python 3 has a sane super() implementation (no arguments), so convert to using that. 2016-08-14 00:55:02 +01:00
Mike Auty 2d23c93def Completely refactor constants and structures to symbols and types. 2016-05-22 11:51:06 +01:00
Mike Auty bcbfee9016 Refactor the validity function names to make it easier for autocomplete to find. 2015-12-29 22:24:32 +00:00
Mike Auty 49fa45cda1 Clean-up the namespace even more by putting the template proxy code into its own subclass. 2015-01-05 15:57:35 +00:00
Mike Auty 87967853f7 Convert volinfo namespace to vol namespace. 2015-01-05 15:04:40 +00:00
Mike Auty 6770aa1adb Tidy up templates and template interfaces. 2015-01-04 23:09:30 +00:00
Mike Auty 73bd451759 Minor pylinting across the whole project. 2015-01-04 21:14:17 +00:00
Mike Auty ea3ba27a04 Refactor template_* functions. 2015-01-04 20:52:34 +00:00
Mike Auty 95238f7f01 Eradicate **magic where possible and rename where appropriate. 2015-01-04 04:55:17 +00:00
Mike Auty 8560aa8a55 Tidy up the Object calling interface. 2015-01-04 04:38:34 +00:00
Mike Auty 446536d789 Remove the concept of template_info and revert to structure_name alone. 2015-01-04 04:27:52 +00:00
Mike Auty 15b2f6f717 Initial introduction of ObjectInformation class. 2015-01-04 03:41:37 +00:00
Mike Auty 77417b2785 Add in relative_child_offset and refactor to reuse the checking code. 2014-12-30 03:51:02 +00:00
Mike Auty c1d054df10 Rename functions in validity to avoid future member name collisions. 2014-12-30 03:49:31 +00:00
Mike Auty a97bd19988 Reformat and optimize code, including trailing whitespace and end of file newline. 2014-06-10 15:40:50 +01:00
Mike Auty 8e7ad364c7 Alter type/class checking structure so that it can be optimized out (either throws an exception or does nothing). 2014-04-08 00:59:08 +01:00
Mike Auty 5b23325447 Change symbol_names to structure_names. 2014-03-22 13:46:22 +00:00
Mike Auty 26f8d0f7cc Add in write support, and change symbols to be both structures and constants. 2013-12-28 05:30:54 +00:00
Mike Auty 26caf31974 Revisit the decision to try out super, and decide to stick with specific inheritance to avoid **kwargs everywhere. 2013-05-08 19:17:21 +01:00
Mike Auty 9c2e486356 Refactor code locations, tidy up object initializers and add in File Layer. 2013-05-06 17:45:15 +01:00