From 6ca01fe303698f3849167147bdd628c548f07888 Mon Sep 17 00:00:00 2001 From: Max Base Date: Sun, 3 Nov 2024 18:26:19 +0330 Subject: [PATCH] Update cli.py: encoding='utf-8' --- yamllint/cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yamllint/cli.py b/yamllint/cli.py index 9a39bd8c..fd7b7a3a 100644 --- a/yamllint/cli.py +++ b/yamllint/cli.py @@ -219,7 +219,7 @@ def run(argv=None): for file in find_files_recursively(args.files, conf): filepath = file[2:] if file.startswith('./') else file try: - with open(file, newline='') as f: + with open(file, newline='', encoding='utf-8') as f: problems = linter.run(f, conf, filepath) except OSError as e: print(e, file=sys.stderr)