Mike Auty
3977a3c356
objects: Fixes for the comments in #159
2020-01-10 12:47:06 +00:00
Mike Auty
fba6511486
Objects: Add size to ObjectInfo so it can be statically access later
2020-01-10 12:47:06 +00:00
Mike Auty
83a8afba6b
Objects: Simplify get_symbol_table to get_symbol_table_name.
2019-12-04 23:41:27 +00:00
Mike Auty
9ac622afa0
Fix up import style to be consistent.
2019-10-01 23:46:02 +01:00
Mike Auty
dfcbd78a8a
Remove object validate method.
...
With agreement from @attrc and @imhlv2, I'm removing the useless
validate method from the object. It defaulted to returning inaccurate
information (validity undetermined, but validate returned True as if
validation had happened) and is better handled by individual classes
implementing is_valid (which seems the preferred nomenclature) and
throwing exceptions if it's called on a class that doesn't have it.
2019-09-27 01:49:42 +01:00
Mike Auty
e0b9d72c84
Update the license URL and LICENSE.txt
2019-09-25 21:44:05 +01:00
Mike Auty
72567e1c50
Yapf-0.28.0 rerun across the whole codebase.
2019-09-21 21:08:23 +01:00
Mike Auty
a248bdc804
Fix up old code and docstring indent issue.
2019-09-17 18:15: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
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
9cde94bceb
Change the license blurb on all files.
2019-08-27 23:11:00 +01:00
Mike Auty
991b30e056
Typing fix-ups.
2019-08-14 20:50:42 +01:00
Mike Auty
4cde0da8a9
Support passing through functions from specific to generic template.
2019-08-10 00:25:21 +01:00
Mike Auty
272224a1b0
Refactor all references to Context.memory to Context.layers.
2019-07-07 17:42:51 +01:00
Mike Auty
8c76a25b2d
Allow VolTemplateProxies to include additional useful methods.
2019-04-17 23:53:36 +01:00
Mike Auty
45268245ca
Add in base __getattr__ to appease ObjectInterface vs Struct issues.
...
Consider revisiting this at some point, it immediately throws an
exception, so should cause significant slow downs (none detected on a
reasonably fast machine, although buildbot will give a better idea).
Without this a lot more specific typing will be required on the
expectation that Structs will be returned rather than any other type of
object.
2019-04-07 19:08:48 +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
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
2288f54a44
Raise exception instead of returning None.
2018-10-11 14:26:37 +01:00
Mike Auty
fa552aa3b0
Add in the native_layer_name concept to ObjectInformation.
2018-09-12 22:45:34 +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
981d333195
Fix ObjectInterface __getattr__ making objects that don't override return None rather than raising an AttributeError.
2018-08-17 10:52:48 +01:00
Mike Auty
b1d46f843b
Convert documentation to napoleon/Google format docstrings.
2018-08-05 15:52:12 +01:00
Mike Auty
c0ec52822b
Add some typing fixes.
2018-06-16 14:19:36 +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
1bae0f26c9
Make sure we don't get in getattr loops.
2018-04-04 00:40:30 +01:00
Mike Auty
efada8a15f
Bring relative_child_offset typing in line with practice.
2018-03-23 16:04:03 +00:00
Mike Auty
942de5f166
Finish adding type-annotations thoughout the code.
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
def6de51bd
Add in the ability to get a symbol table from a specific object (often self.get_symbol_table).
2017-11-09 23:11:05 +00:00
Mike Auty
6523364c90
Add a validate method to all objects to allow for (optional) validation of data on construction.
2017-09-22 09:57:01 +01:00
Mike Auty
cd2eaeab06
Rename the imported context interface to match other examples in the code.
2017-01-23 01:12:44 +00:00
Mike Auty
547a3d94bb
Fix up the documentation and leave a note about cast accepting short type names.
2017-01-04 22:10:27 +00: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
8f6f5f6403
Update object interface documentation.
2016-12-30 02:36:06 +00:00
Mike Auty
433f47c458
Allow casting to inherit the symbol table of its parent.
2016-12-25 18:34:14 +00:00
Mike Auty
e230bbf6a8
Ensure we don't ever get in a loop looking up ._vol (could happen when pickling/unpickling).
2016-12-25 00:02:11 +00:00
Mike Auty
2323e15ec3
Clarify in the documentation that these updates are transient.
2016-12-18 19:38:22 +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
6b973f1538
Expose VolTemplateProxy.vol values in the Proxy (to allow for enumeration access in a template).
2016-12-18 02:19:46 +00:00
Mike Auty
bd3762a81c
Improve exception returns in TemplateProxy.
2016-12-18 01:52:06 +00:00
Mike Auty
2c60747355
Minor fix, small but might as well fix it.
2016-12-14 00:27:41 +00:00
Mike Auty
797e51608e
Move the masking code into the data layer.
2016-12-07 09:50:59 +00:00