From b34561fbc9ee7cff310bab149f4d3c9eeda0c112 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: May 08 2020 23:28:47 +0000 Subject: event.py: pylint cleanups Signed-off-by: Adam Williamson --- diff --git a/src/wikitcms/event.py b/src/wikitcms/event.py index b93dda4..338fad7 100644 --- a/src/wikitcms/event.py +++ b/src/wikitcms/event.py @@ -17,6 +17,9 @@ # # Author: Adam Williamson +# I disagree, pylint! Shut up! +# pylint: disable=too-many-arguments, too-many-instance-attributes + """Classes that describe test events.""" import abc @@ -34,8 +37,7 @@ from .exceptions import FedfindNotFoundError logger = logging.getLogger(__name__) - -class ValidationEvent(object): +class ValidationEvent(): """A parent class for different types of release validation event. site must be an instance of wikitcms.Wiki, already with appropriate access rights for any actions to be performed (i.e. @@ -69,21 +71,18 @@ class ValidationEvent(object): """The content for the CurrentFedoraCompose template for this test event. """ - pass @abc.abstractproperty def _pagetype(self): """The ValidationPage class to be used for this event's pages (for use by valid_pages). """ - pass @abc.abstractproperty def category_page(self): """The category page for this event. Is a property because page instantiation requires a remote trip. """ - pass @property def result_pages(self): @@ -173,9 +172,8 @@ class ValidationEvent(object): rel = self.ff_release if rel.all_images: return rel - else: - err = f"Could not find fedfind release with images for event {self.version}" - raise FedfindNotFoundError(err) + err = f"Could not find fedfind release with images for event {self.version}" + raise FedfindNotFoundError(err) def update_current(self): """Make the CurrentFedoraCompose template on the wiki point to @@ -347,9 +345,8 @@ class ComposeEvent(ValidationEvent): rel = fedfind.release.get_release(cid=self._cid) if rel.all_images: return rel - else: - err = f"Could not find fedfind release with images for event {self.version}" - raise FedfindNotFoundError(err) + err = f"Could not find fedfind release with images for event {self.version}" + raise FedfindNotFoundError(err) class NightlyEvent(ValidationEvent):