-
Notifications
You must be signed in to change notification settings - Fork 3k
Mutable immutable final #2435
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Vitrikus
wants to merge
32
commits into
mate-academy:master
Choose a base branch
from
Vitrikus:mutable-immutable-final
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Mutable immutable final #2435
Changes from all commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
13cf154
Initial commit
MasterpieceElbow 08d54c1
Init
MasterpieceElbow 4440bbb
Edited
MasterpieceElbow 74beef4
edited
MasterpieceElbow 871c268
Merge pull request #1 from mate-academy/python-add-car-wash-station-g…
MasterpieceElbow 1dd8c9b
add exclude venv and tests in .flake8
Abnormaltype a03f6a1
Merge pull request #25 from mate-academy/py_car_wash_station_upd_flake
Abnormaltype 806831d
fix readme.md
Abnormaltype 5472593
Merge pull request #29 from mate-academy/fix_readme
Abnormaltype dda2a4c
add timeout on tests
Abnormaltype e80085c
Merge pull request #74 from mate-academy/add_timeout
Abnormaltype 2392e6e
Update test.yml
Abnormaltype 06d531d
checklist and test for coment added
DmytroSvirsa 5a44a08
description to rate_service and serve_cars methods added
7feed3f
Merge pull request #152 from mate-academy/detailed_descriptions_added…
Y-Havryliv b53c403
Update .flake8
MasterpieceElbow a07cd98
test added
DmytroSvirsa 5eca31a
Merge pull request #151 from mate-academy/add-checklist
DmytroSvirsa 00e88af
Update test_main.py
DmytroSvirsa 2940476
Update .flake8
danylott d1b6594
Update requirements.txt
danylott c418a39
Update README.md
Y-Havryliv ee215a2
Update test.yml
ihor-jpeg 16d8349
Update test.yml
ihor-jpeg 3723e54
Додаю Python-проєкти до pull request
Vitrikus 5185c7d
Вирішені конфлікти під час merge
Vitrikus 7a7cbdd
Оновлено код: виправлення імпорту та тестів
Vitrikus 520beed
Виключено системні файли з відстеження
Vitrikus c2329ec
Додано винятки у .gitignore
Vitrikus aa6766b
Виправлено IndentationError та вирівнювання
Vitrikus c679780
Виправлено E302 та E305 (форматування рядків)
Vitrikus bbf7b9d
Виправлено F811, E302, E305 у CarWashStation
Vitrikus File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| name: Test | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: | ||
| - "master" | ||
|
|
||
| jobs: | ||
| test: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout repo | ||
| uses: actions/checkout@v2 | ||
|
|
||
| - name: Set Up Python 3.10 | ||
| uses: actions/setup-python@v2 | ||
| with: | ||
| python-version: "3.10" | ||
|
|
||
| - name: Install pytest and flake8 | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| pip install -r requirements.txt | ||
|
|
||
| - name: Run flake8 | ||
| run: flake8 app/ | ||
| - name: Run tests | ||
| timeout-minutes: 5 | ||
| run: pytest tests/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,3 +5,13 @@ | |
| .DS_Store | ||
| venv/ | ||
| .pytest_cache/ | ||
| <<<<<<< HEAD | ||
| **__pycache__/ | ||
| ======= | ||
| >>>>>>> upstream/master | ||
|
Comment on lines
+8
to
+11
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is a merge conflict here. Please resolve the conflict by choosing the correct lines to keep and removing the conflict markers (<<<<<<<, =======, >>>>>>>). |
||
| AppData/ | ||
| Cookies/ | ||
| Templates/ | ||
| AppData/ | ||
| Local Settings/ | ||
| NTUSER.DAT* | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,80 @@ | ||
| # Check Your Code Against the Following Points | ||
|
|
||
| ## Code Style | ||
|
|
||
| 1. If you have some long math, you can split it onto additional variables, | ||
| or break after binary operations (not before - it cause the W504 errors) | ||
|
|
||
| Good example: | ||
|
|
||
| ```python | ||
| fuel_consumption = max_fuel_consumption * height_fuel_consumption_coeficient | ||
| estimated_speed = plan_max_speed - wind_awerage_speed * wind_angle_coefisient | ||
| estimated_time = distance_to_the_destinatoin / estimated_speed | ||
| how_much_fuel_needed = fuel_consumption * estimated_time * overlap_coeficient | ||
| ``` | ||
|
|
||
| Good example: | ||
|
|
||
| ```python | ||
| how_much_fuel_needed = (max_fuel_consumption | ||
| * height_fuel_consumption_coeficient | ||
| * distance_to_the_destinatoin | ||
| / (plan_max_speed | ||
| - wind_awerage_speed | ||
| * wind_angle_coefisient) | ||
| * overlap_coeficient) | ||
| ``` | ||
|
|
||
| Bad example: | ||
|
|
||
| ```python | ||
| how_much_fuel_needed = max_fuel_consumption \ | ||
| * height_fuel_consumption_coeficient \ | ||
| * distance_to_the_destinatoin / ( | ||
| plan_max_speed | ||
| - wind_awerage_speed | ||
| * wind_angle_coefisient | ||
| ) * overlap_coeficient | ||
| ``` | ||
|
|
||
| 2. Use descriptive and correct variable names. | ||
|
|
||
| Good example: | ||
|
|
||
| ```python | ||
| def get_full_name(first_name: str, last_name: str) -> str: | ||
| return f"{first_name} {last_name}" | ||
| ``` | ||
|
|
||
| Bad example: | ||
| ```python | ||
| def get_full_name(x: str, y: str) -> str: | ||
| return f"{x} {y}" | ||
| ``` | ||
|
|
||
| ## Clean Code | ||
|
|
||
| 1. You can avoid else when have return statement. | ||
|
|
||
| Good example: | ||
|
|
||
| ```python | ||
| def is_adult(age: int) -> str: | ||
| if age >= 18: | ||
| return "adult" | ||
| return "not an adult" | ||
| ``` | ||
|
|
||
| Bad example: | ||
|
|
||
| ```python | ||
| def is_adult(age: int) -> str: | ||
| if age >= 18: | ||
| return "adult" | ||
| else: | ||
| return "not an adult" | ||
| ``` | ||
|
|
||
| 2. 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. |
Submodule py-count-occurrences
added at
5c3913
Submodule py-linter-formatter
added at
232325
Submodule py-mutable-immutable
added at
b9a8d0
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is an empty step here. Please remove these lines as they do not serve any purpose and may cause YAML parsing errors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
пусті рядки забрані їх немає