Skip to content

Commit

Permalink
Merge pull request #94 from xavierfigueroav/fix/remove-json-loads
Browse files Browse the repository at this point in the history
fix(CommentPreprocessor): Stop passing result of extractor in json.loads

Reviewed-by: [email protected]
Tested-by: [email protected]
  • Loading branch information
GMishx authored Mar 21, 2022
2 parents f7152e1 + fd4e297 commit 6cdd410
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions atarashi/libs/commentPreprocessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@
"""

import argparse
import json
import os
import sys
import re
import string
import tempfile
Expand Down Expand Up @@ -127,9 +125,8 @@ def extract(inputFile):
# if the file extension is supported
if fileType in supportedFileExtensions:
data_file = commentExtract(inputFile)
data = json.loads(data_file)
data1 = licenseComment(data)
outFile.write(data1)
data = licenseComment(data_file)
outFile.write(data)
else:
# if file extension is not supported
with open(inputFile) as inFile:
Expand Down

0 comments on commit 6cdd410

Please sign in to comment.