mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-06-09 11:52:27 +03:00
Fixed code blocks
This commit is contained in:
parent
7de06fb6ef
commit
8f7bd53b5c
@ -181,26 +181,26 @@ Coding Conventions
|
|||||||
* **ALWAYS** place a single-statement control flow body, for control statements such as `if`, `else`, `for`, `foreach`,
|
* **ALWAYS** place a single-statement control flow body, for control statements such as `if`, `else`, `for`, `foreach`,
|
||||||
on a separate line, with consistent indentation.
|
on a separate line, with consistent indentation.
|
||||||
|
|
||||||
Yes:
|
Yes:
|
||||||
|
|
||||||
```python
|
```python
|
||||||
if somethingTrue:
|
if somethingTrue:
|
||||||
Things_we_then_do()
|
Things_we_then_do()
|
||||||
```
|
```
|
||||||
|
|
||||||
No:
|
No:
|
||||||
|
|
||||||
```python
|
```python
|
||||||
if somethingTrue: One_thing_we_do()
|
if somethingTrue: One_thing_we_do()
|
||||||
```
|
```
|
||||||
|
|
||||||
Yes, some existing code still flouts this rule.
|
Yes, some existing code still flouts this rule.
|
||||||
|
|
||||||
* **Always** use Line breaks after scope changes. It makes reading code far easier
|
* **Always** use Line breaks after scope changes. It makes reading code far easier
|
||||||
|
|
||||||
Yes:
|
Yes:
|
||||||
|
|
||||||
```python
|
```python
|
||||||
if True:
|
if True:
|
||||||
do_something()
|
do_something()
|
||||||
|
|
||||||
@ -208,16 +208,17 @@ Coding Conventions
|
|||||||
raise UniverseBrokenException()
|
raise UniverseBrokenException()
|
||||||
|
|
||||||
return
|
return
|
||||||
```
|
```
|
||||||
No:
|
|
||||||
|
|
||||||
```python
|
No:
|
||||||
|
|
||||||
|
```python
|
||||||
if True:
|
if True:
|
||||||
do_something()
|
do_something()
|
||||||
else:
|
else:
|
||||||
raise UniverseBrokenException()
|
raise UniverseBrokenException()
|
||||||
return
|
return
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
* Going forwards please do place [type hints](https://docs.python.org/3/library/typing.html) on the declarations of your functions, both their arguments and return
|
* Going forwards please do place [type hints](https://docs.python.org/3/library/typing.html) on the declarations of your functions, both their arguments and return
|
||||||
|
Loading…
x
Reference in New Issue
Block a user