Commit Graph
120 Commits
Author SHA1 Message Date
Mike Auty 31ddbaaa2e Typing: Fix python3 format string/byte output issues 2019-11-27 11:30:14 +00:00
Mike Auty 9a17beb77f Ensure consistency of importing interfaces. 2019-10-02 01:18:46 +01:00
Mike Auty e0b9d72c84 Update the license URL and LICENSE.txt 2019-09-25 21:44:05 +01:00
Mike Auty 421af88c29 Classmethod make_subconfig so other classmethods can use it. 2019-09-08 14:50:48 +01:00
Mike Auty e922cef316 Improve docstrings for all plugins, and reformat all docstrings. 2019-09-07 22:59:54 +01:00
Mike Auty fa58722848 Slight documentation fixes. 2019-09-04 23:53:18 +01:00
Mike Auty c88044db5b Update more API documentation. 2019-09-04 00:34:55 +01:00
Mike Auty a362dc109a Update API documentation. 2019-09-03 21:28:19 +01:00
Mike Auty 9cde94bceb Change the license blurb on all files. 2019-08-27 23:11:00 +01:00
Mike Auty 9ce139d4e2 Allow configs to potentially be accessed before initialization has happened. 2019-04-27 22:06:39 +01:00
Mike Auty f898dca296 Refactor SymbolRequirement to SymbolTableRequirement for clarity. 2019-02-06 21:26:32 +00: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 b13fcb186c Improve typing issues. 2019-01-03 01:13:53 +00:00
Mike Auty ac57e62807 Output the requirement description when it can't be fulfilled. 2018-12-29 00:41:20 +00:00
Mike Auty fdc6efc4ad Add in the LICENSE and the README. 2018-12-19 23:55:03 +00:00
Mike Auty eb2b96e0ad Reorder the sanitization to ensure booleans are stored as bools. 2018-12-19 19:41:46 +00:00
Mike Auty d4cc02025c Add in sanitization to prevent volatility objects leaking into the configuration data. 2018-12-19 18:54:48 +00:00
Mike Auty 5375e154d8 Add in configuration caching to potentially avoid an unnecessary lookup. 2018-12-17 22:17:02 +00:00
Mike Auty 7ca5514b83 Remove long-broken convenience code from ConfigurableInterface.
In the dim and distant past, I seemingly thought it a good idea to copy
all the values out of an object's config and into local private
attributes (I guess to avoid config lookups?).  It turns out, it was
always broken because it looking at the root of the config tree, rather
than under the object's specific config settings.

This first turned up as an issue where self._meta_layer was being
overwritten by None in the vmware layer.  Removing this resolved the
issue.
2018-12-17 22:08:24 +00:00
Mike Auty b61ac3bd47 Many more typing fixes. 2018-12-17 01:17:06 +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 4eb30d5003 Rework the config_value method. 2018-09-23 22:55:10 +01:00
Mike Auty 00a118a06a Reduce return results from find_requirements. 2018-09-23 22:24:44 +01:00
Mike Auty 81bef5ace8 Minor fixes to the requirement framework. 2018-09-23 18:13:58 +01:00
Mike Auty c9ecf5fa2a ConfigurableRequirements should be Requirements. 2018-09-21 11:43:33 +01:00
Mike Auty 190ffaf28b Refactor where certain types of requirement live (given they're more concrete than interface). 2018-09-20 16:14:57 +01:00
Mike Auty 8d5a6ffdd4 Refactor InstanceRequirement into SimpleTypeRequirement. 2018-09-20 14:56:16 +01:00
Mike Auty b1d46f843b Convert documentation to napoleon/Google format docstrings. 2018-08-05 15:52:12 +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 4dbfdcc9dd Fix up typing and metadata usage. 2018-05-01 21:21:12 +01:00
Mike Auty 9512cbe9eb Commit metadata changeset.
Layers now accept metadata dictionaries (and chain/stack them on top of
those from lower layers).  Metadata can only be set at construction
time, and the metadata dictionary is readonly.  The hope is this will
make enumerating metadata keys across the codebase simpler.

The current metadata items that layers hold is:

architecture (Unknown | Intel32 | Intel64)
os (Unknown | Windows | Linux)
pae (bool)
page_map_offset (int)

This patchset may develop further to help enumerate all of these
(through a registration/reporting system).
2018-04-26 12:48:14 +01:00
Mike Auty 623180ddbd Make many typing fixes, based on mypy-0.590. 2018-04-22 20:45:59 +01:00
Mike Auty 4b6b68cf2c Fix up a typo that accidentally got introduced. 2018-04-02 02:20:16 +01:00
Mike Auty e1fed0af20 Rejig configuration deleting again
Had second thoughts and deletion should only remove data, not sub
hierarchies.  If the entire hierarchy needs clearing out, it'll need to
be done manually, or by splicing in an empty HierarchicalDict.
2018-04-02 02:18:20 +01:00
Mike Auty a815e39a0c Fix up the configuration deletion logic. 2018-04-02 02:13:39 +01:00
Mike Auty 0d075e6ee3 Fix major (but easily missable) bug in the configuration system. 2018-04-01 22:54:28 +01:00
Mike Auty eaadd53951 Allow the optional setting of requirements to be changed (for sub-plugins). 2018-03-25 18:16:34 +01:00
Mike Auty 10f65a67c8 Ensure the config/branch methods always return. 2018-03-25 18:13:41 +01:00
Mike Auty 2522d588ea Pylinting and typing fix. 2018-03-21 17:04:10 +00:00
Mike Auty 6766498e4a Fix up saving symbol_space contruction options. 2018-03-11 20:59:47 +00:00
Mike Auty 8b29b1f668 Rework the import ordering for requirements/configurations. 2018-02-12 00:51:05 +00:00
Mike Auty 994bd7c394 Fix up the finding of swap layers so swap actually works. 2018-02-11 21:41:39 +00:00
Mike Auty b7c68f4e98 Rework LayerListRequirement from a ListRequirement to a MultiRequirement. 2018-02-11 18:35:18 +00:00
Mike Auty 7cb0330d04 Fix and correctly type ListRequirements. 2018-02-10 22:41:39 +00:00
Mike Auty c203663f0b Refactor requirements to support a list of swap layers. 2018-01-28 14:48:50 +00:00
Mike Auty f40fae197d Convert to python3.5 syntax (no local type-annotations). 2017-12-13 20:48:52 +00:00
Mike Auty 50b60c0df6 Add in more interfaces (and fix additional errors now that type information is available). 2017-12-13 20:48:52 +00:00
Mike Auty 5536412a5e Add in initial work at interface type-annotations. 2017-12-13 20:48:52 +00:00
Mike Auty d7d13eb19c Add type annotations to most of the automagic files. 2017-12-13 20:48:52 +00:00