-
-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🎨 Comply with isort, mypy, flake8 and black (#81)
* ❇️ 🎨 Setup lint verifcations GHA black, isort, flake8 and mypy * 🎨 mypy, black, isort and flake8 conformance fix * 🔧 dev_requirements.txt adjustments Some dev deps should only be installed when py >= 3.6 * 🔥 🔧 for now remove pypy from tests GHA (until resolve dev-requirements.txt conflicts) * 🎨 switch to relative import
- Loading branch information
Showing
15 changed files
with
2,395 additions
and
741 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: 🎨 Linters | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
lint: | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: [3.8] | ||
os: [ubuntu-latest] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
pip install -U pip setuptools | ||
pip install -r dev-requirements.txt | ||
pip uninstall -y charset-normalizer | ||
- name: Install the package | ||
run: | | ||
python setup.py install | ||
- name: Type checking (Mypy) | ||
run: | | ||
mypy charset_normalizer | ||
- name: Import sorting check (isort) | ||
run: | | ||
isort --check charset_normalizer | ||
- name: Code format (Black) | ||
run: | | ||
black --check --diff --target-version=py35 charset_normalizer | ||
- name: Style guide enforcement (Flake8) | ||
run: | | ||
flake8 charset_normalizer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.