From 47dd9bf1cc5fc7dfffbe8e9c65a3f1e29b85d2a4 Mon Sep 17 00:00:00 2001 From: tmeissner Date: Tue, 7 Oct 2014 22:14:49 +0200 Subject: [PATCH] make it pep8 compliant --- python_3_oop/chapter05/zipreplace_comp.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/python_3_oop/chapter05/zipreplace_comp.py b/python_3_oop/chapter05/zipreplace_comp.py index 79d7730..3396f64 100644 --- a/python_3_oop/chapter05/zipreplace_comp.py +++ b/python_3_oop/chapter05/zipreplace_comp.py @@ -3,7 +3,6 @@ import sys import os - class ZipReplace: def __init__(self, search_string, replace_string): @@ -11,12 +10,12 @@ class ZipReplace: self.replace_string = replace_string def process(self, zipprocessor): - "perform a search and replace on all files in the temporary directory" + """perform a search and replace on all files in the temporary directory""" for filename in os.listdir(zipprocessor.temp_directory): with open(zipprocessor._full_filename(filename)) as file: contents = file.read() contents = contents.replace(self.search_string, - self.replace_string) + self.replace_string) with open(zipprocessor._full_filename(filename), "w") as file: file.write(contents)