Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions modules/20-arithmetics/45-linting/en/EXERCISE.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
You received code from a colleague — it works correctly, but it violates the PEP8 formatting standard. Fix the spaces around the operators without changing the logic:

```python
print((5**2) - (3 * 7))
<!-- lint-code-blocks: skip — неаккуратный код это предмет урока, форматтер привёл бы его к стилю -->

```text
print( (5 **2)-(3* 7))
```

The result must stay `4`.
6 changes: 4 additions & 2 deletions modules/20-arithmetics/45-linting/en/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ Today you don't need to remember all the rules from the standard because there a

Take a look at an example:

```python
result = 1 + 3
<!-- lint-code-blocks: skip — неаккуратный код это предмет урока, форматтер привёл бы его к стилю -->

```text
result = 1+ 3
```

Linter will swear for breaking the rule: _E225 missing whitespace around operator_. By standard, the `+` operator must always be separated by spaces from the operands.
Expand Down
6 changes: 4 additions & 2 deletions modules/20-arithmetics/45-linting/es/EXERCISE.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
Recibiste código de un colega: funciona correctamente, pero infringe el estándar de formato PEP8. Corrige los espacios alrededor de los operadores sin cambiar la lógica:

```python
print((5**2) - (3 * 7))
<!-- lint-code-blocks: skip — неаккуратный код это предмет урока, форматтер привёл бы его к стилю -->

```text
print( (5 **2)-(3* 7))
```

El resultado debe seguir siendo `4`.
6 changes: 4 additions & 2 deletions modules/20-arithmetics/45-linting/es/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@ A día de hoy, el linter más rápido y popular del mundo Python se considera Ru

Veamos un ejemplo:

```python
result = 1 + 3
<!-- lint-code-blocks: skip — неаккуратный код это предмет урока, форматтер привёл бы его к стилю -->

```text
result = 1+ 3
```

Ese código se ve descuidado, y el linter señalará el error con razón. Así se ve el proceso de comprobación:
Expand Down
6 changes: 4 additions & 2 deletions modules/20-arithmetics/45-linting/ru/EXERCISE.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
Вы получили код от коллеги — он работает правильно, но нарушает стандарт оформления PEP8. Исправьте пробелы вокруг операторов, не меняя логику:

```python
print((5**2) - (3 * 7))
<!-- lint-code-blocks: skip — неаккуратный код это предмет урока, форматтер привёл бы его к стилю -->

```text
print( (5 **2)-(3* 7))
```

Результат должен остаться `4`.
6 changes: 4 additions & 2 deletions modules/20-arithmetics/45-linting/ru/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@

Рассмотрим пример:

```python
result = 1 + 3
<!-- lint-code-blocks: skip — неаккуратный код это предмет урока, форматтер привёл бы его к стилю -->

```text
result = 1+ 3
```

Такой код выглядит неаккуратно, и линтер справедливо укажет на ошибку. Вот как выглядит процесс проверки:
Expand Down
Loading