-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #573 from iKostanOrg/kyu8
Merge pull request #572 from iKostanOrg/master
- Loading branch information
Showing
120 changed files
with
1,083 additions
and
833 deletions.
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 kyu8 | ||
|
||
on: # yamllint disable-line rule:truthy | ||
push: | ||
branches: | ||
- 'kyu8' | ||
|
||
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_8 |
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,32 @@ | ||
kyu\_8.closest\_elevator package | ||
================================ | ||
|
||
Submodules | ||
---------- | ||
|
||
kyu\_8.closest\_elevator.closest\_elevator module | ||
------------------------------------------------- | ||
|
||
.. automodule:: kyu_8.closest_elevator.closest_elevator | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
:private-members: | ||
|
||
kyu\_8.closest\_elevator.test\_closest\_elevator module | ||
------------------------------------------------------- | ||
|
||
.. automodule:: kyu_8.closest_elevator.test_closest_elevator | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
:private-members: | ||
|
||
Module contents | ||
--------------- | ||
|
||
.. automodule:: kyu_8.closest_elevator | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
:private-members: |
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
Large diffs are not rendered by default.
Oops, something went wrong.
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 @@ | ||
"""8 kyu - Beginner 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 @@ | ||
"""altERnaTIng cAsE <=> ALTerNAtiNG CaSe.""" |
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 |
---|---|---|
@@ -1,15 +1,18 @@ | ||
""" | ||
altERnaTIng cAsE <=> ALTerNAtiNG CaSe | ||
altERnaTIng cAsE <=> ALTerNAtiNG CaSe. | ||
Created by Egor Kostan. | ||
GitHub: https://github.com/ikostan | ||
""" | ||
|
||
|
||
def to_alternating_case(string: str) -> str: | ||
""" | ||
each lowercase letter becomes uppercase and | ||
each uppercase letter becomes lowercase | ||
:param string: | ||
:return: | ||
Alternating case. | ||
Each lowercase letter becomes uppercase and | ||
each uppercase letter becomes lowercase. | ||
:param string: str | ||
:return: str | ||
""" | ||
return ''.join((char.upper() if char.islower() else char.lower()) for char in string) |
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 @@ | ||
"""Century From Year.""" |
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 @@ | ||
"""Check the exam.""" |
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
Oops, something went wrong.