-
Notifications
You must be signed in to change notification settings - Fork 6
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
Pydocstyle + Merge pull request #550 from iKostanOrg/master #551
Merged
Changes from 13 commits
Commits
Show all changes
51 commits
Select commit
Hold shift + click to select a range
bb73951
Merge pull request #550 from iKostanOrg/master
ikostan d9ec5de
Create pydocstyle_kyu4.yml
ikostan aa72e90
__init__ docstring
ikostan 0ec0eee
Update next_smaller.py
ikostan 61946fe
Update test_next_smaller.py
ikostan 9c1d133
Update format_duration.py
ikostan 5f867a0
Update test_format_duration.py
ikostan 8065547
Update solution.py
ikostan 04e42e7
Update test_top_3_words.py
ikostan 2e6dde6
Update next_bigger.py
ikostan df80c28
Update sudoku.py
ikostan bbda025
Update test_sudoku.py
ikostan 59302cd
Update test_battle.py
ikostan e6033c0
Update sum_of_intervals.py
ikostan 148da83
Update test_sum_of_intervals.py
ikostan 0f932e0
Update sum_for_list.py
ikostan a4bc2c3
Update test_battle.py
ikostan 90d3293
Update test_valid_solution.py
ikostan feb9d58
Update valid_solution.py
ikostan 01775ee
Update solution.py
ikostan 76d6d86
Update test_solution.py
ikostan 92ef00e
Update solution.py
ikostan ba92654
Update snail_sort.py
ikostan 6f66d53
Update test_snail.py
ikostan 6c815e1
Update solution.py
ikostan cd76383
Update solution.py
ikostan 0679925
Update permutations.py
ikostan c8e5477
Update test_permutations.py
ikostan 2737838
Update solution.py
ikostan f90c9b2
Update solution.py
ikostan b367e2c
Update solution.py
ikostan dd4c341
Update sudoku.py
ikostan 519769a
Update test_mix.py
ikostan d39ff04
Update sudoku.py
ikostan 224ba11
Update test_solution.py
ikostan 5df87a0
Update test_solution.py
ikostan 12a2a46
Update test_next_bigger.py
ikostan b6f7688
Update next_bigger.py
ikostan 4580080
Update next_bigger.py
ikostan 56f7755
Update test_warrior.py
ikostan 25323b5
Update warrior.py
ikostan f38677d
Update warrior.py
ikostan 4770714
Update warrior.py
ikostan 3735998
Update warrior.py
ikostan 97c69d8
Update test_sum_for_list.py
ikostan 9a5a836
Update test_sum_for_list.py
ikostan 0d2b08c
Update format_duration.py
ikostan 25af3b2
Update valid_solution.py
ikostan e53e400
Update valid_solution.py
ikostan 5f99616
Update sum_of_intervals.py
ikostan fc29afe
Update sum_of_intervals.py
ikostan 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 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,46 @@ | ||
--- | ||
name: pydocstyle for kyu4 | ||
|
||
on: # yamllint disable-line rule:truthy | ||
push: | ||
branches: | ||
- 'kyu4' | ||
|
||
permissions: | ||
contents: read | ||
pull-requests: read | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.x"] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
# This is the version of the action for setting up Python, | ||
# not the Python version. | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
# You can test your matrix by printing the current Python version | ||
- name: Display Python version | ||
run: python -c "import sys; print(sys.version)" | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip setuptools wheel | ||
pip install -r requirements.txt | ||
pip install pydocstyle | ||
pip install types-requests | ||
- name: Check to make sure that the module is in your Python path | ||
run: | | ||
echo $PYTHONPATH | ||
- name: Check pydocstyle version | ||
run: | | ||
pydocstyle --version | ||
- name: Doc style checking with pydocstyle | ||
# Pydocstyle testing (Guide) | ||
# https://www.pydocstyle.org/en/stable/usage.html#cli-usage | ||
run: | | ||
pydocstyle --verbose --explain --count kyu_4 |
This file contains 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 @@ | ||
"""Codewars kyu_4 package.""" |
This file contains 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 @@ | ||
"""Human readable duration format package.""" |
This file contains 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 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 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 @@ | ||
"""Most frequently used words in a text package.""" |
This file contains 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 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 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 @@ | ||
"""Next bigger number with the same digits package.""" |
This file contains 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 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 @@ | ||
"""Next smaller number with the same digits package.""" |
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.
issue (complexity): Consider consolidating the format_days, format_hours, format_minutes and format_seconds functions into a single helper function.
The formatting functions can be consolidated into a single helper function to reduce duplication while maintaining all functionality. Here's how:
This consolidates the duplicate logic while handling the special cases for minutes and final components. The code becomes more maintainable as formatting changes only need to be made in one place.