from lml.loader import scan_plugins
from pyexcel.internal.plugins import PARSER, RENDERER  # noqa
from pyexcel.internal.source_plugin import SOURCE  # noqa
from pyexcel.internal.generators import SheetStream, BookStream  # noqa


BLACK_LIST = [
    "pyexcel_io",
    "pyexcel_webio",
    "pyexcel_xlsx",
    "pyexcel_xls",
    "pyexcel_ods3",
    "pyexcel_ods",
    "pyexcel_odsr",
    "pyexcel_xlsxw",
]
WHITE_LIST = [
    "pyexcel.plugins.parsers",
    "pyexcel.plugins.renderers",
    "pyexcel.plugins.sources",
]


scan_plugins("pyexcel_", "pyexcel", BLACK_LIST, WHITE_LIST)

from lml.loader import scan_plugins
from pyexcel.internal.plugins import PARSER, RENDERER  # noqa
from pyexcel.internal.source_plugin import SOURCE  # noqa
from pyexcel.internal.generators import SheetStream, BookStream  # noqa


BLACK_LIST = [
    "pyexcel_io",
    "pyexcel_webio",
    "pyexcel_xlsx",
    "pyexcel_xls",
    "pyexcel_ods3",
    "pyexcel_ods",
    "pyexcel_odsr",
    "pyexcel_xlsxw",
]
WHITE_LIST = [
    "pyexcel.plugins.parsers",
    "pyexcel.plugins.renderers",
    "pyexcel.plugins.sources",
]


scan_plugins_regex("^pyexcel_.+$", "pyexcel", BLACK_LIST, WHITE_LIST)

Remove use of deprecated `scan_plugins` method
Remove use of deprecated `scan_plugins` method 

`scan_plugins` has been deprecated in favour of `scan_plugins_regex`. This 
is causing warnings to be logged.

The new method takes a regular expression as its first argument, rather than a 
simple prefix string. This commit adds a regular expression which does the same 
thing as the prefix argument used to do.

For source code see: https://lml.readthedocs.io/en/latest/_modules/lml/loader.html
  from lml.loader import scan_plugins
  from pyexcel.internal.plugins import PARSER, RENDERER  # noqa
  from pyexcel.internal.source_plugin import SOURCE  # noqa
  from pyexcel.internal.generators import SheetStream, BookStream  # noqa
  
  
  BLACK_LIST = [
      "pyexcel_io",
      "pyexcel_webio",
      "pyexcel_xlsx",
      "pyexcel_xls",
      "pyexcel_ods3",
      "pyexcel_ods",
      "pyexcel_odsr",
      "pyexcel_xlsxw",
  ]
  WHITE_LIST = [
      "pyexcel.plugins.parsers",
      "pyexcel.plugins.renderers",
      "pyexcel.plugins.sources",
  ]
  
  
- scan_plugins("pyexcel_", "pyexcel", BLACK_LIST, WHITE_LIST)
+ scan_plugins_regex("^pyexcel_.+$", "pyexcel", BLACK_LIST, WHITE_LIST)
  
Remove use of deprecated `scan_plugins` method
## Code Before:
from lml.loader import scan_plugins
from pyexcel.internal.plugins import PARSER, RENDERER  # noqa
from pyexcel.internal.source_plugin import SOURCE  # noqa
from pyexcel.internal.generators import SheetStream, BookStream  # noqa


BLACK_LIST = [
    "pyexcel_io",
    "pyexcel_webio",
    "pyexcel_xlsx",
    "pyexcel_xls",
    "pyexcel_ods3",
    "pyexcel_ods",
    "pyexcel_odsr",
    "pyexcel_xlsxw",
]
WHITE_LIST = [
    "pyexcel.plugins.parsers",
    "pyexcel.plugins.renderers",
    "pyexcel.plugins.sources",
]


scan_plugins("pyexcel_", "pyexcel", BLACK_LIST, WHITE_LIST)

## Instruction:
Remove use of deprecated `scan_plugins` method
## Code After:
from lml.loader import scan_plugins
from pyexcel.internal.plugins import PARSER, RENDERER  # noqa
from pyexcel.internal.source_plugin import SOURCE  # noqa
from pyexcel.internal.generators import SheetStream, BookStream  # noqa


BLACK_LIST = [
    "pyexcel_io",
    "pyexcel_webio",
    "pyexcel_xlsx",
    "pyexcel_xls",
    "pyexcel_ods3",
    "pyexcel_ods",
    "pyexcel_odsr",
    "pyexcel_xlsxw",
]
WHITE_LIST = [
    "pyexcel.plugins.parsers",
    "pyexcel.plugins.renderers",
    "pyexcel.plugins.sources",
]


scan_plugins_regex("^pyexcel_.+$", "pyexcel", BLACK_LIST, WHITE_LIST)
