diff --git a/pyproject.toml b/pyproject.toml index 302659e..d5fc3b0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -34,10 +34,6 @@ dependencies = [ rattail_mailchimp = "rattail_mailchimp.config:MailchimpConfigExtension" -[project.entry-points."rattail.subcommands"] -import-mailchimp = "rattail_mailchimp.commands:ImportMailChimp" - - [project.entry-points."rattail.typer_imports"] rattail_mailchimp = "rattail_mailchimp.commands" diff --git a/rattail_mailchimp/commands.py b/rattail_mailchimp/commands.py index 629307d..bc3bdef 100644 --- a/rattail_mailchimp/commands.py +++ b/rattail_mailchimp/commands.py @@ -26,7 +26,7 @@ Rattail Commands for MailChimp integration import typer -from rattail.commands import rattail_typer, ImportSubcommand +from rattail.commands import rattail_typer from rattail.commands.typer import importer_command, typer_get_runas_user from rattail.commands.importing import ImportCommandHandler @@ -46,21 +46,3 @@ def import_mailchimp( config, import_handler_key='to_rattail.from_mailchimp.import') kwargs['user'] = typer_get_runas_user(ctx) handler.run(kwargs, progress=progress) - - -class ImportMailChimp(ImportSubcommand): - """ - Import data to Rattail, from MailChimp API - """ - name = 'import-mailchimp' - description = __doc__.strip() - default_handler_spec = 'rattail_mailchimp.importing.mailchimp:FromMailChimpToRattail' - - def get_handler_factory(self, **kwargs): - if self.config: - spec = self.config.get('rattail.importing', 'mailchimp.handler', - default=self.default_handler_spec) - else: - # just use default, for sake of cmd line help - spec = self.default_handler_spec - return self.app.load_object(spec)