aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Schadt <kingdread@gmx.de>2022-10-10 21:09:18 +0200
committerDaniel Schadt <kingdread@gmx.de>2022-10-10 21:09:18 +0200
commit3e900b56cf7f642d0851dfe50914c80f449d18df (patch)
tree7754fcc403566290a1cffebb7f608c7b2f3eaa8f
parent46fe6f404cfa090f7afab00de7037f1231388250 (diff)
downloadfietsboek-3e900b56cf7f642d0851dfe50914c80f449d18df.tar.gz
fietsboek-3e900b56cf7f642d0851dfe50914c80f449d18df.tar.bz2
fietsboek-3e900b56cf7f642d0851dfe50914c80f449d18df.zip
lint fixes
-rw-r--r--fietsboek/updater/__init__.py2
-rw-r--r--fietsboek/updater/cli.py5
-rw-r--r--fietsboek/updater/script.py11
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