From b5ad1e9c48e65e6d69e639802285398af658b47a Mon Sep 17 00:00:00 2001 From: Abhirup Pal Date: Thu, 18 Mar 2021 19:07:31 +0530 Subject: [PATCH] ci: Add black. --- .github/workflows/lint-and-format.yml | 18 ++++++++++++++++++ create_icon_theme.py | 4 +--- requirements.txt | 13 +++++++++++++ 3 files changed, 32 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/lint-and-format.yml create mode 100644 requirements.txt diff --git a/.github/workflows/lint-and-format.yml b/.github/workflows/lint-and-format.yml new file mode 100644 index 0000000..6399db0 --- /dev/null +++ b/.github/workflows/lint-and-format.yml @@ -0,0 +1,18 @@ +name: Linting & formatting + +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-latest + name: Lint - PEP8 & more (flake8) + steps: + - uses: actions/checkout@v2 + - name: Setup Python + uses: actions/setup-python@v2 + with: + python-version: '3.x' + - name: Install dependencies + run: pip install -r requirements.txt + - name: Run black + run: black --check create_icon_theme.py diff --git a/create_icon_theme.py b/create_icon_theme.py index f65712e..dbddac0 100755 --- a/create_icon_theme.py +++ b/create_icon_theme.py @@ -8,9 +8,7 @@ dest = join(dirname(__file__), "./theme/eos-icons.woff") shutil.copyfile( - join( - dirname(__file__), "./node_modules/eos-icons/dist/fonts/eos-icons.woff" - ), + join(dirname(__file__), "./node_modules/eos-icons/dist/fonts/eos-icons.woff"), dest, ) diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..1e4f804 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,13 @@ +appdirs==1.4.4 +black==20.8b1 +click==7.1.2 +fonttools==4.21.1 +mccabe==0.6.1 +mypy-extensions==0.4.3 +pathspec==0.8.1 +pycodestyle==2.7.0 +pyflakes==2.3.0 +regex==2021.3.17 +toml==0.10.2 +typed-ast==1.4.2 +typing-extensions==3.7.4.3