From dce367fcfeda749240634ab69808b9b4e4bb0f57 Mon Sep 17 00:00:00 2001 From: Yaroslav Havryliv Date: Tue, 2 Aug 2022 10:24:32 +0300 Subject: [PATCH 1/2] README.md rewrited in English --- README.md | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index decc04b9..b709a7cc 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,7 @@ - Read [the guideline](https://github.com/mate-academy/py-task-guideline/blob/main/README.md) before start -Линтер flake8 выдает такой отчет об ошибках при проверке каталога с файлами исходного -кода: +The flake8 linter gives the following error report when checking a directory with source code files: ```python errors = { "./test_source_code_2.py": [], @@ -100,18 +99,18 @@ errors = { ], } ``` -Здесь `errors` это словарь, в котором ключи - путь к файлу, а значение этого ключа - -список ошибок, где каждая ошибка - словарь +Here `errors` is a dictionary, where the keys are the path to the file, +and the value of this key is a list of errors, where each error is a dictionary. -Но мы храним результаты выполнения немного в другом формате. -Напиши 3 функции, чтобы преобразовать отчет в нужном нам формате. -1. `format_linter_error` - форматирует отдельно взятую ошибку -2. `format_single_linter_file` - форматирует все ошибки для конкретного файла -3. `format_linter_report` - форматирует все ошибки для всех файлов в отчете +But we store the execution results in a slightly different format. +Write 3 functions to convert the report in the format we need. +1. `format_linter_error` - formats a single error. +2. `format_single_linter_file` - formats all errors for a particular file. +3. `format_linter_report` - formats all errors for all files in the report. -Все функции должны вмещать в себе только конструкцию `return` +All functions must contain only the `return` construct. -Требуемый формат хранения: +Required storage format: ```python errors = [ {"errors": [], "path": "./test_source_code_2.py", "status": "passed"}, From 85bdece4efd1d8a2cd85e28b8c4f5915b18a9cc2 Mon Sep 17 00:00:00 2001 From: Yaroslav Havryliv Date: Tue, 2 Aug 2022 11:53:34 +0300 Subject: [PATCH 2/2] README.md changed --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index b709a7cc..45c524d5 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ - Read [the guideline](https://github.com/mate-academy/py-task-guideline/blob/main/README.md) before start -The flake8 linter gives the following error report when checking a directory with source code files: +The `flake8` linter gives the following error report when checking a directory with source code files: ```python errors = { "./test_source_code_2.py": [], @@ -100,15 +100,15 @@ errors = { } ``` Here `errors` is a dictionary, where the keys are the path to the file, -and the value of this key is a list of errors, where each error is a dictionary. +and the value of this key is a list of errors, where each is a dictionary. But we store the execution results in a slightly different format. -Write 3 functions to convert the report in the format we need. -1. `format_linter_error` - formats a single error. -2. `format_single_linter_file` - formats all errors for a particular file. -3. `format_linter_report` - formats all errors for all files in the report. +Write 3 functions to convert the report into the format we need: +1. `format_linter_error` - formats a single error; +2. `format_single_linter_file` - formats all errors for a particular file; +3. `format_linter_report` - formats all errors for all report files. -All functions must contain only the `return` construct. +All functions must contain only the `return` keyword. Required storage format: ```python