From 24f1a7f516c576dfdf901fa7442713f19444c4a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?GOLDERWEB=20=E2=80=93=20Jonathan=20Golder?= Date: Wed, 2 Mar 2016 17:14:30 +0100 Subject: [PATCH 1/2] Remove __init__.py as we won't use it as a package --- __init__.py | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 __init__.py diff --git a/__init__.py b/__init__.py deleted file mode 100644 index 1aef520..0000000 --- a/__init__.py +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# -# __init__.py -# -# Copyright 2015 GOLDERWEB – Jonathan Golder -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, -# MA 02110-1301, USA. -# -# -""" -Scripts for our redundances bot -""" From 10f64199abde1dc200b2de27d78ce8fbba8856a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?GOLDERWEB=20=E2=80=93=20Jonathan=20Golder?= Date: Wed, 2 Mar 2016 17:19:11 +0100 Subject: [PATCH 2/2] Remove relativ imports as we don't are in a package anymore --- redfam.py | 2 +- redpage.py | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/redfam.py b/redfam.py index 771d9f5..519fe81 100644 --- a/redfam.py +++ b/redfam.py @@ -33,7 +33,7 @@ from datetime import datetime import pywikibot import jogobot -from .mysqlred import MysqlRedFam +from mysqlred import MysqlRedFam class RedFam: diff --git a/redpage.py b/redpage.py index 6a016bd..96a853d 100644 --- a/redpage.py +++ b/redpage.py @@ -27,8 +27,8 @@ Provides a class for handling redundance discussion pages and archives import pywikibot # noqa -from .mysqlred import MysqlRedPage -from .redfam import RedFamParser +from mysqlred import MysqlRedPage +from redfam import RedFamParser class RedPage: @@ -94,7 +94,7 @@ class RedPage: else: return False - def parse( self ): + def parse( self ): # noqa """ Handles the parsing process """ @@ -158,9 +158,8 @@ class RedPage: ending = RedFamParser.is_ending2( text_lines[ j ] ) # Create the RedFam object - red_fam = RedFamParser( fam_heading, self.page._pageid, - self.is_archive(), beginning, - ending ) + RedFamParser( fam_heading, self.page._pageid, + self.is_archive(), beginning, ending ) # Increment line counter i += 1