Skip to content

Commit

Permalink
Merge pull request #525 from iKostanOrg/master
Browse files Browse the repository at this point in the history
Merge from master to kyu6
  • Loading branch information
ikostan authored Nov 7, 2024
2 parents c77af3b + a42e2fb commit 84d68a5
Show file tree
Hide file tree
Showing 42 changed files with 753 additions and 338 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/flake8.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
name: Flake8

on:
push:
branches:
- 'utils'
- 'none'
workflow_call:

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 flake8
- name: Check to make sure that the module is in your Python path
run: |
echo $PYTHONPATH
- name: Lint with flake8
# yamllint disable rule:line-length
# stop the build if there are Python syntax errors or undefined names
# exit-zero treats all errors as warnings.
# The GitHub editor is 127 chars wide
run: |
flake8 . --count --select=E9,F63,F7,F82 --doctests --show-source --statistics
flake8 . --count --max-complexity=10 --max-line-length=127 --benchmark --show-source --statistics
# yamllint enable rule:line-length
47 changes: 47 additions & 0 deletions .github/workflows/flake8_kyu2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
name: Flake8 for kyu2

on:
push:
branches:
- 'kyu2'

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 flake8
- name: Check to make sure that the module is in your Python path
run: |
echo $PYTHONPATH
- name: Lint with flake8
# yamllint disable rule:line-length
# stop the build if there are Python syntax errors or undefined names
# exit-zero treats all errors as warnings.
# The GitHub editor is 127 chars wide
run: |
flake8 --count --select=E9,F63,F7,F82 --doctests --show-source --statistics ./kyu_2
flake8 --count --max-complexity=10 --max-line-length=127 --benchmark --show-source --statistics ./kyu_2
# yamllint enable rule:line-length
47 changes: 47 additions & 0 deletions .github/workflows/flake8_kyu3.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
name: Flake8 for kyu3

on:
push:
branches:
- 'kyu3'

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 flake8
- name: Check to make sure that the module is in your Python path
run: |
echo $PYTHONPATH
- name: Lint with flake8
# yamllint disable rule:line-length
# stop the build if there are Python syntax errors or undefined names
# exit-zero treats all errors as warnings.
# The GitHub editor is 127 chars wide
run: |
flake8 --count --select=E9,F63,F7,F82 --doctests --show-source --statistics ./kyu_3
flake8 --count --max-complexity=10 --max-line-length=127 --benchmark --show-source --statistics ./kyu_3
# yamllint enable rule:line-length
47 changes: 47 additions & 0 deletions .github/workflows/flake8_kyu4.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
name: Flake8 for kyu4

on:
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 flake8
- name: Check to make sure that the module is in your Python path
run: |
echo $PYTHONPATH
- name: Lint with flake8
# yamllint disable rule:line-length
# stop the build if there are Python syntax errors or undefined names
# exit-zero treats all errors as warnings.
# The GitHub editor is 127 chars wide
run: |
flake8 --count --select=E9,F63,F7,F82 --doctests --show-source --statistics ./kyu_4
flake8 --count --max-complexity=10 --max-line-length=127 --benchmark --show-source --statistics ./kyu_4
# yamllint enable rule:line-length
47 changes: 47 additions & 0 deletions .github/workflows/flake8_kyu5.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
name: Flake8 for kyu5

on:
push:
branches:
- 'kyu5'

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 flake8
- name: Check to make sure that the module is in your Python path
run: |
echo $PYTHONPATH
- name: Lint with flake8
# yamllint disable rule:line-length
# stop the build if there are Python syntax errors or undefined names
# exit-zero treats all errors as warnings.
# The GitHub editor is 127 chars wide
run: |
flake8 --count --select=E9,F63,F7,F82 --doctests --show-source --statistics ./kyu_5
flake8 --count --max-complexity=10 --max-line-length=127 --benchmark --show-source --statistics ./kyu_5
# yamllint enable rule:line-length
5 changes: 4 additions & 1 deletion .github/workflows/lint_test_build_pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,7 @@ jobs:
uses: iKostanOrg/codewars/.github/workflows/pylint.yml@master
mypy:
name: MyPy Lint
uses: iKostanOrg/codewars/.github/workflows/mypy.yml@master
uses: iKostanOrg/codewars/.github/workflows/mypy.yml@master
flake8:
name: Flake8 Lint
uses: iKostanOrg/codewars/.github/workflows/flake8.yml@master
1 change: 0 additions & 1 deletion .github/workflows/mypy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ permissions:
contents: read
pull-requests: read


jobs:
build:
runs-on: ubuntu-latest
Expand Down
38 changes: 38 additions & 0 deletions .github/workflows/mypy_kyu7.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: MyPy for kyu7

on:
push:
branches:
- 'kyu7'

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 mypy
pip install types-requests
- name: Check to make sure that the module is in your Python path
run: |
echo $PYTHONPATH
- name: Python Data Type Checking with MyPy
# Python Type Checking (Guide)
# https://realpython.com/python-type-checking/
run: |
mypy kyu_7 --ignore-missing-imports --check-untyped-defs
38 changes: 38 additions & 0 deletions .github/workflows/mypy_kyu8.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: MyPy for kyu8

on:
push:
branches:
- 'kyu8'

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 mypy
pip install types-requests
- name: Check to make sure that the module is in your Python path
run: |
echo $PYTHONPATH
- name: Python Data Type Checking with MyPy
# Python Type Checking (Guide)
# https://realpython.com/python-type-checking/
run: |
mypy kyu_8 --ignore-missing-imports --check-untyped-defs
Loading

0 comments on commit 84d68a5

Please sign in to comment.