fix: remove legacy command definitions
This commit is contained in:
parent
ac6efbb589
commit
42cddaf6c0
|
@ -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"
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue