Skip to content

Commit

Permalink
Use black, enforce with GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
avdempsey committed Feb 8, 2024
1 parent c4620c3 commit a680af8
Show file tree
Hide file tree
Showing 23 changed files with 4,061 additions and 2,813 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/python-formatting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Python Formatting Check

on:
push:
branches:
- main
- master
pull_request:
branches:
- main
- master

jobs:
formatting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install black
- name: Run formatting check
run: |
make ck-format
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
*.diff
.*.sw*
/brozzler.egg-info/
venv
.idea
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.PHONY: format
format:
venv/bin/black -t py35 -t py36 -t py37 -t py38 -t py39 -t py310 -t py311 -t py312 .

.PHONY: ck-format
ck-format:
venv/bin/black --check .
Loading

0 comments on commit a680af8

Please sign in to comment.