Skip to content

Commit

Permalink
Merge pull request #1322 from viktoria-rybenchuk/update-readme
Browse files Browse the repository at this point in the history
  • Loading branch information
sergii-nosachenko authored Oct 25, 2024
2 parents b991c34 + 3198e22 commit faa256e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Nature is well suited to reflect the principles of Object Oriented Programming.
All instances of the `Animal` class must have health, name and hidden attribute.
Health is 100 and hidden is false by default.

All alive animals should be in the class attribute `Animal.alive`.
All alive animals should be in the `__class__` attribute `Animal.alive`.
If the health of the animal reaches 0, the beast dies and it should
be removed from `Animal.alive`.
```python
Expand Down
22 changes: 20 additions & 2 deletions checklist.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,26 @@ Bad example:
def get_full_name(x: str, y: str) -> str:
return f"{x} {y}"
```
5. Place each argument on a new line, including `self`, with proper indentation and formatting

Good example:

```python
def __init__(
self,
name: str,
age: int
) -> None:
```
Bad example:

```python
def __init__(self,
name: str,age: int) -> None:
```

6. It's important to use type annotations for clarity, such as `list[Animal]` instead of just `list` to specify a list of Animal instances

## Clean Code

Add comments, prints, and functions to check your solution when you write your code.
Don't forget to delete them when you are ready to commit and push your code.
1. There’s no need to add comments if the code is clear and self-explanatory.

0 comments on commit faa256e

Please sign in to comment.