Skip to content

Commit

Permalink
delete newline='' from open() calls as it disables universal newline …
Browse files Browse the repository at this point in the history
…mode

Signed-off-by: DeutscheGabanna <[email protected]>
  • Loading branch information
DeutscheGabanna committed Jan 22, 2024
1 parent aaec995 commit 36b9a88
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/librarian.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class NoDestinationSelectedError(utils.CustomException):

def create_and_open(filename: str, mode: str) -> IO:
os.makedirs(os.path.dirname(filename), exist_ok=True)
return open(filename, mode, encoding="UTF-8", newline='')
return open(filename, mode, encoding="UTF-8")


# I've found a term that describes what this class does - it is a Director - even sounds similar to Librarian
Expand Down Expand Up @@ -203,7 +203,7 @@ def __process_file(self, filepath: str) -> bool:
# Let's determine if the file can be opened
# ---
try:
file = open(filepath, newline='', encoding='UTF-8')
file = open(filepath, encoding='UTF-8')
# File has not been found
except FileNotFoundError as err:
msg = ErrorMsg.print(ErrorMsg.FILE_MISSING, filepath)
Expand Down

0 comments on commit 36b9a88

Please sign in to comment.