diff options
-rw-r--r-- | fietsboek/updater/__init__.py | 2 | ||||
-rw-r--r-- | fietsboek/updater/cli.py | 5 | ||||
-rw-r--r-- | fietsboek/updater/script.py | 11 |
3 files changed, 11 insertions, 7 deletions
diff --git a/fietsboek/updater/__init__.py b/fietsboek/updater/__init__.py index e81a515..7878f8e 100644 --- a/fietsboek/updater/__init__.py +++ b/fietsboek/updater/__init__.py @@ -126,7 +126,7 @@ class Updater: def _reverse_versions(self): all_versions = set(script.id for script in self.scripts.values()) - return (all_versions - self._transitive_versions()) + return all_versions - self._transitive_versions() def stamp(self, versions): """Stampts the given version into the version file. diff --git a/fietsboek/updater/cli.py b/fietsboek/updater/cli.py index f00dfde..9a64a24 100644 --- a/fietsboek/updater/cli.py +++ b/fietsboek/updater/cli.py @@ -8,8 +8,6 @@ migrating the configuration. """ import click -from pyramid.paster import setup_logging - from . import Updater @@ -50,7 +48,6 @@ def user_confirm(verb): ) def cli(): """CLI main entry point.""" - pass @cli.command("update") @@ -185,7 +182,7 @@ def status(config): @cli.command("help", hidden=True) @click.pass_context @click.argument("subcommand", required=False) -def help(ctx, subcommand): +def help_(ctx, subcommand): """Shows the help for a given subcommand. This is equivalent to using the --help option. diff --git a/fietsboek/updater/script.py b/fietsboek/updater/script.py index 15e1d59..305c949 100644 --- a/fietsboek/updater/script.py +++ b/fietsboek/updater/script.py @@ -1,5 +1,14 @@ +"""Base class definition for update scripts.""" # Placed in a separate file to avoid cyclic dependencies + + class UpdateScript: + """Base class for update scripts. + + This class provides stub methods for the update script hooks as well as + methods for user interaction. + """ + def tell(self, text): """Output a message to the user. @@ -19,7 +28,6 @@ class UpdateScript: :param config: The app configuration. :type config: dict """ - pass def post_alembic(self, config): """Script that is run after the alembic migrations have been run. @@ -29,4 +37,3 @@ class UpdateScript: :param config: The app configuration. :type config: dict """ - pass |