That means that it is not possible to create a custom style that extends the behaviour of the AppNexus or Edited styles (ie. that uses application-package-names option) unless that style also uses the same name.
I would suggest that instead of comparing the name, a property be added the base Style class like accepts_application_package_names which is set to False in the Style class but set to True in the AppNexus and Edited classes. Then the logic in checker.py should be changed to check for this flag in the style class.
Currently,
checker.py
uses theapplication-package-names
option only if the name of the style matches a whitelist:['appnexus', 'edited']
: https://github.com/PyCQA/flake8-import-order/blob/35434d29ddc9c1a580ae0c9ff14b8f00a288fd99/flake8_import_order/checker.py#L44That means that it is not possible to create a custom style that extends the behaviour of the
AppNexus
orEdited
styles (ie. that usesapplication-package-names
option) unless that style also uses the same name.I would suggest that instead of comparing the name, a property be added the base
Style
class likeaccepts_application_package_names
which is set toFalse
in theStyle
class but set toTrue
in theAppNexus
andEdited
classes. Then the logic inchecker.py
should be changed to check for this flag in the style class.