Further PEP8 compliance changes

This commit is contained in:
Veronica K. B. Olsen
2019-11-03 18:02:47 +01:00
parent 7c95af951a
commit b303eb6539
37 changed files with 408 additions and 380 deletions
+3 -4
View File
@@ -13,12 +13,13 @@
import logging
import nw
from os import path
from os import path
from PyQt5.QtWidgets import QMessageBox
from nw.convert.file.text import TextFile
from nw.convert.tokenizer import Tokenizer
from nw.enum import nwAlert, nwItemLayout
from nw.enum import nwAlert, nwItemLayout
logger = logging.getLogger(__name__)
@@ -26,9 +27,7 @@ class ConcatFile(TextFile):
def __init__(self, theProject, theParent):
TextFile.__init__(self, theProject, theParent)
self.theConv = Tokenizer(self.theProject, self.theParent)
return
def addText(self, tHandle):
+2 -4
View File
@@ -13,9 +13,9 @@
import logging
import nw
from nw.convert.file.text import TextFile
from nw.convert.file.text import TextFile
from nw.convert.text.tohtml import ToHtml
from nw.enum import nwAlert
from nw.enum import nwAlert
logger = logging.getLogger(__name__)
@@ -23,9 +23,7 @@ class HtmlFile(TextFile):
def __init__(self, theProject, theParent):
TextFile.__init__(self, theProject, theParent)
self.theConv = ToHtml(self.theProject, self.theParent)
return
##
+2 -7
View File
@@ -13,9 +13,9 @@
import logging
import nw
from nw.convert.file.text import TextFile
from nw.convert.file.text import TextFile
from nw.convert.text.tolatex import ToLaTeX
from nw.enum import nwAlert
from nw.enum import nwAlert
logger = logging.getLogger(__name__)
@@ -32,7 +32,6 @@ class LaTeXFile(TextFile):
##
def _doOpenFile(self, filePath):
try:
self.outFile = open(filePath,mode="wt+",encoding="utf8")
self.outFile.write("\\documentclass[12pt]{report}\n")
@@ -43,17 +42,13 @@ class LaTeXFile(TextFile):
except Exception as e:
self.makeAlert(["Failed to open file.",str(e)], nwAlert.ERROR)
return False
return True
def _doCloseFile(self):
if self.outFile is not None:
self.outFile.write("\\end{document}\n")
self.outFile.close()
self.texCodecFail = self.theConv.texCodecFail
return True
# END Class LaTeXFile
+2 -4
View File
@@ -13,9 +13,9 @@
import logging
import nw
from nw.convert.file.text import TextFile
from nw.convert.file.text import TextFile
from nw.convert.text.tomarkdown import ToMarkdown
from nw.enum import nwAlert
from nw.enum import nwAlert
logger = logging.getLogger(__name__)
@@ -23,9 +23,7 @@ class MarkdownFile(TextFile):
def __init__(self, theProject, theParent):
TextFile.__init__(self, theProject, theParent)
self.theConv = ToMarkdown(self.theProject, self.theParent)
return
##
+10 -9
View File
@@ -13,11 +13,12 @@
import logging
import nw
from os import path
from os import path
from PyQt5.QtWidgets import QMessageBox
from nw.convert.text.totext import ToText
from nw.enum import nwAlert, nwItemType, nwItemLayout, nwItemClass
from nw.enum import nwAlert, nwItemType, nwItemLayout, nwItemClass
logger = logging.getLogger(__name__)
@@ -29,14 +30,14 @@ class TextFile():
self.theProject = theProject
self.theParent = theParent
self.outFile = None
self.fileName = ""
self.theText = ""
self.expNovel = True
self.expNotes = False
self.outFile = None
self.fileName = ""
self.theText = ""
self.expNovel = True
self.expNotes = False
self.theConv = ToText(self.theProject, self.theParent)
self.makeAlert = self.theParent.makeAlert
self.theConv = ToText(self.theProject, self.theParent)
self.makeAlert = self.theParent.makeAlert
self.setComments(False)
self.setKeywords(False)