From 27e440aebc99e017331570fda86fd3c3bc3e9bdc Mon Sep 17 00:00:00 2001 From: Nataliia Zakharchuk <62181026+Nattalli@users.noreply.github.com> Date: Mon, 12 Sep 2022 09:18:02 +0300 Subject: [PATCH] Create checklist.md --- checklist.md | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 checklist.md diff --git a/checklist.md b/checklist.md new file mode 100644 index 00000000..1dfee56e --- /dev/null +++ b/checklist.md @@ -0,0 +1,53 @@ +# Сheck Your Code Against the Following Points + +## Don't Repeat Yourself + +Make sure you don't have duplicated lines or whole blocks of code. Use your `format_linter_error` function to avoid this. + +Also, use the `format_single_linter_file` function to format a single file. + +## Code Style + +Use descriptive and correct variable names. + +Good example: + +```python +my_dict = {"one": "a", "two": "b"} +[(number + " " + letter) for (number, letter) in my_dict.items()] +``` + +Bad example: + +```python +my_dict = {"one": "a", "two": "b"} +[(k + " " + v) for (k, v) in my_dict.items()] +``` + +While creating a dictionary — write key-value pairs in a single row. The curly braces must be located in one of two options: open and start with the text or have a line break between the text. + +Good example: + +```python +my_dict = { +"greeting": "Good morning, have a nice day!", + "answer": "Good morning, thanks!" +} + +``` + +Also a good example: + +```python +my_dict = {"greeting": "Good morning, have a nice day!", + "answer": "Good morning, thanks!"} +``` + +Bad example: + +```python +my_dict = {"greeting": "Good morning, have a nice day!", + "answer": "Good morning, thanks!" +} +``` +