Commit Graph

3 Commits (188f704b28460d50fb29e5a7e8fd4cec2855fde7)

Author SHA1 Message Date
Michael Chisholm 24307626b0 Move get_stix2_class_maps() from .utils to .registry (since it's
really just a simple accessor into the class maps table), and
change other code to use it, in places where it was simple and
made sense.
2021-01-20 16:59:38 -05:00
Chris Lenk 7de5c458bb Fix import sort order 2021-01-15 10:27:39 -05:00
Michael Chisholm f51e309775 Refactor stix2.parsing into more focused modules:
- stix2.registry, which contains the class mapping structure
  and code for scanning stix2 modules for its initial population
- stix2.registration, which contains code used to register custom
  STIX types with the registry
- stix2.parsing, which contains code for creating instances of
  registered stix2 classes from raw dicts.

This is intended to reduce circular import problems, by giving
dependent code the ability to import a module which has exactly
the functionality it needs, without pulling a lot of other stuff
it doesn't need.  Fewer imports means less chance of an import
cycle.
2021-01-08 22:08:33 -05:00