Remove encoding line and add spaces between classes and functions

This commit is contained in:
Veronica Berglyd Olsen
2021-06-25 20:53:33 +02:00
parent ad62faaeea
commit edfd7c9770
50 changed files with 208 additions and 50 deletions
+20 -1
View File
@@ -1,4 +1,23 @@
# -*- coding: utf-8 -*-
"""
novelWriter Core Init
=======================
This file is a part of novelWriter
Copyright 20182021, Veronica Berglyd Olsen
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 3 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, see <https://www.gnu.org/licenses/>.
"""
from nw.core.document import NWDoc
from nw.core.index import NWIndex, countWords
+1 -1
View File
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
"""
novelWriter Project Document
==============================
@@ -32,6 +31,7 @@ from nw.common import isHandle
logger = logging.getLogger(__name__)
class NWDoc():
def __init__(self, theProject, theHandle):
+2 -1
View File
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
"""
novelWriter Project Index
===========================
@@ -39,6 +38,7 @@ from nw.core.document import NWDoc
logger = logging.getLogger(__name__)
class NWIndex():
H_VALID = ("H0", "H1", "H2", "H3", "H4")
@@ -895,6 +895,7 @@ class NWIndex():
# END Class NWIndex
# =============================================================================================== #
# Simple Word Counter
# =============================================================================================== #
+1 -1
View File
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
"""
novelWriter Project Item Class
================================
@@ -33,6 +32,7 @@ from nw.common import checkInt, isHandle, isItemClass, isItemLayout, isItemType
logger = logging.getLogger(__name__)
class NWItem():
def __init__(self, theProject):
+1 -1
View File
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
"""
novelWriter Project Options Cache
===================================
@@ -34,6 +33,7 @@ from nw.constants import nwFiles
logger = logging.getLogger(__name__)
class OptionState():
def __init__(self, theProject):
+1 -1
View File
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
"""
novelWriter Project Wrapper
=============================
@@ -50,6 +49,7 @@ from nw.constants import trConst, nwFiles, nwLabels
logger = logging.getLogger(__name__)
class NWProject():
def __init__(self, theParent):
+4 -1
View File
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
"""
novelWriter Spell Check Classes
=================================
@@ -31,6 +30,7 @@ import difflib
logger = logging.getLogger(__name__)
# =============================================================================================== #
# SpellChecking SuperClass
# =============================================================================================== #
@@ -122,6 +122,7 @@ class NWSpellCheck():
# END Class NWSpellCheck
# =============================================================================================== #
# Enchant Based SpellChecking
# =============================================================================================== #
@@ -208,6 +209,7 @@ class NWSpellEnchant(NWSpellCheck):
# END Class NWSpellEnchant
class FakeEnchant:
"""Fallback for when Enchant is selected, but not installed.
"""
@@ -225,6 +227,7 @@ class FakeEnchant:
# END Class FakeEnchant
# =============================================================================================== #
# Fallback SpellChecking Using difflib
# =============================================================================================== #
+1 -1
View File
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
"""
novelWriter Project Item Status Class
=======================================
@@ -32,6 +31,7 @@ from nw.common import checkInt
logger = logging.getLogger(__name__)
class NWStatus():
def __init__(self):
+1 -1
View File
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
"""
novelWriter HTML Text Converter
=================================
@@ -31,6 +30,7 @@ from nw.constants import nwKeyWords, nwLabels, nwHtmlUnicode
logger = logging.getLogger(__name__)
class ToHtml(Tokenizer):
M_PREVIEW = 0 # Tweak output for the DocViewer
+1 -1
View File
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
"""
novelWriter Text Tokenizer
============================
@@ -40,6 +39,7 @@ from nw.core.document import NWDoc
logger = logging.getLogger(__name__)
class Tokenizer():
# In-Text Format
+1 -1
View File
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
"""
novelWriter Markdown Text Converter
=====================================
@@ -31,6 +30,7 @@ from nw.core.tokenizer import Tokenizer
logger = logging.getLogger(__name__)
class ToMarkdown(Tokenizer):
M_STD = 0 # Standard Markdown
+4 -1
View File
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
"""
novelWriter ODT Text Converter
================================
@@ -57,6 +56,7 @@ TAG_TAB = "{%s}tab" % XML_NS["text"]
TAG_SPAN = "{%s}span" % XML_NS["text"]
TAG_STNM = "{%s}style-name" % XML_NS["text"]
class ToOdt(Tokenizer):
X_BLD = 0x01 # Bold format
@@ -985,6 +985,7 @@ class ToOdt(Tokenizer):
# END Class ToOdt
# =============================================================================================== #
# Auto-Style Classes
# =============================================================================================== #
@@ -1212,6 +1213,7 @@ class ODTParagraphStyle():
# END Class ODTParagraphStyle
class ODTTextStyle():
"""Wrapper class for the text style setting used by the exporter.
Only the used settings are exposed here to keep the class minimal
@@ -1282,6 +1284,7 @@ class ODTTextStyle():
# END Class ODTTextStyle
# =============================================================================================== #
# Local Functions
# =============================================================================================== #
+1 -1
View File
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
"""
novelWriter Project Tree Class
================================
@@ -62,6 +61,7 @@ LAYOUT_MAP = {
},
}
class NWTree():
def __init__(self, theProject):