From 7bc14ca361c464d288c10df41c51a47d2c9e6345 Mon Sep 17 00:00:00 2001 From: Guillaume Seren Date: Mon, 2 Apr 2018 18:59:24 +0200 Subject: [PATCH] Cleanup class linter error --- afew/MailMover.py | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/afew/MailMover.py b/afew/MailMover.py index 0d55281..afcdfc4 100644 --- a/afew/MailMover.py +++ b/afew/MailMover.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # SPDX-License-Identifier: ISC # Copyright (c) dtk +"""This module contain the MailMover class""" import os import logging @@ -28,19 +29,23 @@ def __init__(self, max_age=0, rename=False, dry_run=False): start = date.today() - days now = datetime.now() self.query += ' AND {start}..{now}'.format( - start=start.strftime('%s'), - now=now.strftime('%s')) + start=start.strftime('%s'), + now=now.strftime('%s')) self.dry_run = dry_run self.rename = rename + """ return the new name """ def get_new_name(self, fname, destination): if self.rename: return os.path.join( - destination, - # construct a new filename, composed of a made-up ID - # and the flags part of the original filename. - str(uuid.uuid1()) + ':' + os.path.basename(fname).split(':')[-1] - ) + destination, + # construct a new filename, + # composed of a made-up ID + # and the flags part of the original filename. + str( + uuid.uuid1()) + + ':' + + os.path.basename(fname).split(':')[-1]) else: return destination