diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index c0f6d235..74223844 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -20,9 +20,19 @@ jobs: with: python-version: "3.9.13" - - name: flake8 Lint - uses: py-actions/flake8@v2 + #---------------------------------------------- + # load pip cache if cache exists + #---------------------------------------------- + - uses: actions/cache@v2 with: - ignore: "W503,E501,F811,F541,W605,E203,F405,E722,W191,F403,F821,E101,N806,N802,N801,N811,N818" - exclude: "nibiru/proto/*" - max-line-length: "88" + path: ~/.cache/pip + key: ${{ runner.os }}-pip + restore-keys: ${{ runner.os }}-pip + #---------------------------------------------- + # install and run linters + #---------------------------------------------- + - run: python -m pip install black flake8 isort + - run: | + flake8 . + black . --check + isort . diff --git a/pyproject.toml b/pyproject.toml index 74074824..d9a98138 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -42,6 +42,11 @@ extend-exclude = ''' )$ ''' +[tool.isort] +profile = "black" +py_version = 39 +skip_glob = ["nibiru/proto/*"] + [build-system] requires = ["poetry-core>=1.0.0"] build-backend = "poetry.core.masonry.api" diff --git a/setup.cfg b/setup.cfg index 73706526..b4438eaa 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [flake8] max-line-length = 88 -exclude = .git,nibiru/proto/* +exclude = .git,nibiru/proto/*,build/ ignore = W503,E501,F811,F541,W605,E203,F405,E722,W191,F403,F821,E101,N806,N802,N801,N811,N818 [options]