src/eric7/Plugins/CheckerPlugins/SyntaxChecker/tomlCheckSyntax.py

branch
eric7
changeset 9507
1f39839655ea
parent 9482
a2bc06a54d9d
child 9653
e67609152c5e
--- a/src/eric7/Plugins/CheckerPlugins/SyntaxChecker/tomlCheckSyntax.py	Fri Nov 11 17:14:21 2022 +0100
+++ b/src/eric7/Plugins/CheckerPlugins/SyntaxChecker/tomlCheckSyntax.py	Fri Nov 11 17:49:06 2022 +0100
@@ -31,23 +31,6 @@
     return tomlSyntaxBatchCheck
 
 
-def normalizeCode(codestring):
-    """
-    Function to normalize the given code.
-
-    @param codestring code to be normalized
-    @type str
-    @return normalized code
-    @rtype str
-    """
-    codestring = codestring.replace("\r\n", "\n").replace("\r", "\n")
-
-    if codestring and codestring[-1] != "\n":
-        codestring += "\n"
-
-    return codestring
-
-
 def tomlSyntaxCheck(file, codestring):
     """
     Function to check a TOML source file for syntax errors.
@@ -185,8 +168,6 @@
         error = "tomlkit not available. Install it via the PyPI interface."
         return [{"error": (file, 0, 0, "", error)}]
 
-    codestring = normalizeCode(codestring)
-
     try:
         tomlkit.parse(codestring)
     except ParseError as exc:

eric ide

mercurial