Commit Graph
90 Commits
Author SHA1 Message Date
Mike Auty b2da35c05a Revert "Apply relative offsets to type_name as well as symbol_names for modules."
This reverts commit d67fcc9a6a.
2019-08-10 00:23:18 +01:00
Mike Auty d67fcc9a6a Apply relative offsets to type_name as well as symbol_names for modules. 2019-08-09 20:08:05 +01:00
Mike Auty 272224a1b0 Refactor all references to Context.memory to Context.layers. 2019-07-07 17:42:51 +01:00
Mike Auty 5e37080c14 Fix up misnamed get_enum/has_enum. 2019-06-30 13:35:13 +01:00
Mike Auty fcd77b4c5f Update the documentation to support the wrapper with autodoc-typehints. 2019-01-21 22:10:18 +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 6bb927ebfa Fix up terminology to ensure we only refer to layers not spaces. 2019-01-03 00:40:13 +00:00
Mike Auty 2bbb3f7878 Fix up issue identified by atcuno. 2018-12-20 15:46:42 +00:00
Mike Auty ecdc89a282 Fix a stupid typo. 2018-12-20 15:46:42 +00:00
Mike Auty 67c9c7e097 Add in fix for absolute symbol offsets within modules. 2018-12-20 15:46:42 +00:00
Mike Auty fdc6efc4ad Add in the LICENSE and the README. 2018-12-19 23:55:03 +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 9824538bd9 Numerous pycharm warnings resolved
This includes:

* Better ways of checking empty lists
* Not shadowing builtin functions like filter
* Preventing invalid slash warnings by marking strings as regexps
* Removing unnecessary brackets
* Lowercase variable names
* Adding/updating parameters in docstrings
* Removing unused code (lines not chunks)
* Change in not a member tests
* Changing some methods to static
* Shorting range membership checks
* Missing parameters
* Make some exception handlers more specific
* Don't define a lambda to a variable
* A few more instance checks to help type checkers
2018-12-16 13:21:06 +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 1f0888cf19 Remove the functools.wraps because we don't strictly wrap, just proxy. 2018-11-28 16:24:00 +00:00
Mike Auty 68760bff40 Add wrapper convenience function and reorder imports for documentation generation. 2018-11-13 11:53:42 +00:00
Mike Auty 90d13be9a9 Ensure we pass the native_layer_name whenever constructing a subobject. 2018-09-16 15:59:30 +01:00
Mike Auty efd9dffdfe Fix up the passing of native_layer_name to object constructors. 2018-09-16 14:33:24 +01:00
Mike Auty 218567c228 Allow Context.module to create a SizedModule if a size is provided. 2018-08-09 14:53:21 +01:00
Mike Auty 0a55a7c3f2 Introduced SizedModules to simplify when we just don't care about the size. 2018-08-09 14:42:18 +01:00
Mike Auty 366269deb2 Refactor Module in interfaces to ModuleInterface. 2018-08-09 13:55:16 +01:00
Mike Auty b1d46f843b Convert documentation to napoleon/Google format docstrings. 2018-08-05 15:52:12 +01:00
Mike Auty 79d2bab44d A few additional typing fixes. 2018-07-22 13:29:43 +01:00
Mike Auty 4897b7ab81 Fix up some typing errors. 2018-07-22 13:19:20 +01:00
Mike Auty 2f28dfa6c9 Support finding symbols by ranges. 2018-07-19 09:51:51 +01:00
Mike Auty 083fd43890 Ensure get_module_symbols_by_absolute_location only returns modules at the appropriate offset. 2018-07-19 09:22:57 +01:00
Mike Auty 5c41e05876 Improve Module construction.
The hash/size determination takes time, so make the hash generated on
use (so far, only on dedupe) and cache it, since it shouldn't change.

We also cache the Module construction, so that if it's done in a loop
(like pslist), it won't keep recaculating for the same module.
2018-07-18 21:46:56 +01:00
Mike Auty cc5b470602 Remove the caching to see if it's causing the exceptions. 2018-07-18 21:08:50 +01:00
Mike Auty ce05510413 Additional fixes for module collections. 2018-07-18 14:35:54 +01:00
Mike Auty 91e94440fe Add in hashing for module differentiation and additional collection features. 2018-07-18 00:42:48 +01:00
Mike Auty 5fbf923186 Fix documentation and try to guess the size where possible. 2018-07-17 21:15:09 +01:00
Mike Auty 9c06c25fae Add in support for module sizes. 2018-06-25 00:16:17 +01:00
Mike Auty c012842bd6 Refactor the name to be more accurate. 2018-06-21 00:27:38 +01:00
Mike Auty aedcf40fc2 Add support for separate symbol_tables and name in Modules. 2018-06-21 00:25:55 +01:00
Mike Auty f957b2915e Fix up issue having made optional parameters non-optional. 2018-06-04 09:39:38 +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 44ca819869 Minor documentation tweaks. 2018-05-13 01:05:56 +01:00
Mike Auty 3ce9ad93c7 Fix return types for ModuleCollections. 2018-05-10 02:40:26 +01:00
Mike Auty f23c4b51e4 Add in ModuleCollections for identifying symbols. 2018-05-07 00:05:01 +01:00
Mike Auty 623180ddbd Make many typing fixes, based on mypy-0.590. 2018-04-22 20:45:59 +01:00
Mike Auty 937fc5a289 Ensure that passing a type to be constructed doesn't wipe out pre-configured information. 2018-03-21 18:48:57 +00:00
Mike Auty ac12098317 Add type-annotations for reamining layer files. 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 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 2cc456e847 Finish off the automagic directory type annotations. 2017-12-13 20:48:52 +00:00
Mike Auty 0599ec8f36 Slightly improve potential error condition. 2017-09-03 23:17:07 +01: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 f520176b2b Move the wrapper out to stop it seeming like a method. 2017-04-26 15:01:49 +01:00