This requires some cleanup of ImportOrderChecker and ImportVisitor first.
In particular there needs to be a clearer separation between getting the import data out of the AST and generating the sort keys that are used to check the ordering. We can then use an RawChecker in PyLint to extract the imports and run the check. This is currently a little complicated due to differences in stdlib ast and astdroid.
This requires some cleanup of ImportOrderChecker and ImportVisitor first.
In particular there needs to be a clearer separation between getting the import data out of the AST and generating the sort keys that are used to check the ordering. We can then use an RawChecker in PyLint to extract the imports and run the check. This is currently a little complicated due to differences in stdlib ast and astdroid.