From 29530b54c22aa1ddefd3f391e84b792799c043da Mon Sep 17 00:00:00 2001 From: Egor Kostan Date: Tue, 29 Oct 2024 19:27:02 -0700 Subject: [PATCH 1/5] Create flake8_kyu2.yml --- .github/workflows/flake8_kyu2.yml | 47 +++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/flake8_kyu2.yml diff --git a/.github/workflows/flake8_kyu2.yml b/.github/workflows/flake8_kyu2.yml new file mode 100644 index 00000000000..12c08a0f01b --- /dev/null +++ b/.github/workflows/flake8_kyu2.yml @@ -0,0 +1,47 @@ +--- +name: Flake8 for kyu2 + +on: # yamllint disable-line rule:truthy + pull_request_target: + types: + - opened + - edited + - synchronize + - reopened + workflow_call: + +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 /kyu_2 --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 \ No newline at end of file From db5afec6933cd70b1c0637b60468fd7a6d07335f Mon Sep 17 00:00:00 2001 From: Egor Kostan Date: Tue, 29 Oct 2024 19:28:03 -0700 Subject: [PATCH 2/5] Update flake8.yml --- .github/workflows/flake8.yml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/flake8.yml b/.github/workflows/flake8.yml index f420ab6cc0a..c368ae873d4 100644 --- a/.github/workflows/flake8.yml +++ b/.github/workflows/flake8.yml @@ -1,13 +1,11 @@ --- name: Flake8 -on: # yamllint disable-line rule:truthy - pull_request_target: - types: - - opened - - edited - - synchronize - - reopened +on: + push: + branches: + - 'utils' + - 'none' workflow_call: jobs: From 2d35560ce99f341ee57ac1c402f11ffad69f1721 Mon Sep 17 00:00:00 2001 From: Egor Kostan Date: Tue, 29 Oct 2024 19:28:49 -0700 Subject: [PATCH 3/5] Update flake8_kyu2.yml --- .github/workflows/flake8_kyu2.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/flake8_kyu2.yml b/.github/workflows/flake8_kyu2.yml index 12c08a0f01b..0ba0c59bfab 100644 --- a/.github/workflows/flake8_kyu2.yml +++ b/.github/workflows/flake8_kyu2.yml @@ -1,14 +1,14 @@ --- name: Flake8 for kyu2 -on: # yamllint disable-line rule:truthy - pull_request_target: - types: - - opened - - edited - - synchronize - - reopened - workflow_call: +on: + push: + branches: + - 'kyu2' + +permissions: + contents: read + pull-requests: read jobs: build: From 5e7b3d657e4972c0994113ff462d68f10678f2f7 Mon Sep 17 00:00:00 2001 From: Egor Kostan Date: Tue, 29 Oct 2024 19:29:33 -0700 Subject: [PATCH 4/5] Update flake8.yml --- .github/workflows/flake8.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/flake8.yml b/.github/workflows/flake8.yml index c368ae873d4..f95a3be838c 100644 --- a/.github/workflows/flake8.yml +++ b/.github/workflows/flake8.yml @@ -8,6 +8,10 @@ on: - 'none' workflow_call: +permissions: + contents: read + pull-requests: read + jobs: build: runs-on: ubuntu-latest From 0b23dfd23d7db26810b8fe69bfd5d3090bb8ee2d Mon Sep 17 00:00:00 2001 From: Egor Kostan Date: Tue, 29 Oct 2024 19:29:36 -0700 Subject: [PATCH 5/5] Update mypy.yml --- .github/workflows/mypy.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/mypy.yml b/.github/workflows/mypy.yml index 7dfd0f3bec9..770af5d41f1 100644 --- a/.github/workflows/mypy.yml +++ b/.github/workflows/mypy.yml @@ -11,7 +11,6 @@ permissions: contents: read pull-requests: read - jobs: build: runs-on: ubuntu-latest