diff --git a/.flake8 b/.flake8 new file mode 100644 index 000000000..d4d97efb1 --- /dev/null +++ b/.flake8 @@ -0,0 +1,9 @@ +[flake8] +max-line-length = 100 +# E123: closing bracket does not match indentation of opening bracket's line +# E126: continuation line over-indented for hanging indent +# E226: missing whitespace around arithmetic operator +# E402: Module level import not at top of file +# W503: line break before binary operator +# W504: line break after binary operator +ignore = E123,E126,E226,E402,W503,W504 \ No newline at end of file diff --git a/.github/workflows/on_pr.yml b/.github/workflows/on_pr.yml index 9cf16f9d7..859b6fd05 100644 --- a/.github/workflows/on_pr.yml +++ b/.github/workflows/on_pr.yml @@ -5,6 +5,19 @@ on: pull_request: jobs: + flake8-lint: + runs-on: ubuntu-latest + name: Code Style + steps: + - name: Check out source repository + uses: actions/checkout@v3 + - name: Set up Python environment + uses: actions/setup-python@v4 + with: + python-version: "3.11" + - name: flake8 codestyle + uses: py-actions/flake8@v2 + build: runs-on: ${{ matrix.os }} strategy: