Skip to content

Commit

Permalink
Merge pull request #71 from AstuteSource/fix--filelines-attribute-rem…
Browse files Browse the repository at this point in the history
…oval

fix: removed filelines from sources class in db.py
  • Loading branch information
Poiuy7312 authored Nov 6, 2023
2 parents 6230815 + 84d2c2b commit 2529977
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion chasten/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ def enable_full_text_search(chasten_database_name: str) -> None:
database["sources"].enable_fts(
[
"filename",
"filelines",
"check_id",
"check_name",
"check_description",
Expand Down
4 changes: 2 additions & 2 deletions chasten/filesystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ def write_dict_results(
# using indentation to ensure that JSON file is readable
results_path_with_file = results_path / complete_results_file_name
# use the built-in method from pathlib Path to write the JSON contents
results_path_with_file.write_text(results_json)
results_path_with_file.write_text(results_json, "utf-8")
# return the name of the file that contains the JSON dictionary contents
return complete_results_file_name

Expand Down Expand Up @@ -293,7 +293,7 @@ def get_json_results(json_paths: List[Path]) -> List[Dict[Any, Any]]:
# iterate through each of the provided paths to a JSON file
for json_path in json_paths:
# turn the contents of the current JSON file into a dictionary
json_dict = json.loads(json_path.read_text())
json_dict = json.loads(json_path.read_text("utf-8"))
# add the current dictionary to the list of dictionaries
json_dicts_list.append(json_dict)
# return the list of JSON dictionaries
Expand Down

0 comments on commit 2529977

Please sign in to comment.