Skip to content

Commit

Permalink
[pre-commit] Add and apply prettier (#416)
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre-Sassoulas committed Nov 4, 2023
1 parent 130dd8e commit d21ccd3
Show file tree
Hide file tree
Showing 5 changed files with 70 additions and 64 deletions.
7 changes: 3 additions & 4 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
**WARNING:** Please do not report issues about missing Django, see
**WARNING:** Please do not report issues about missing Django, see
[README](https://github.com/PyCQA/pylint-django#installation)!

**TODO:** make sure to post the output of `pip freeze`

**NOTES:** make sure you have the latest version of 3rd party packages
like `rest_framework`, `factory`, `model_utils`, etc. before reporting
issues!
**NOTES:** make sure you have the latest version of 3rd party packages like
`rest_framework`, `factory`, `model_utils`, etc. before reporting issues!
61 changes: 32 additions & 29 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,17 @@ jobs:

- name: Execute tests
run: |
pip install -U pip poetry tox
poetry install
export TOXENV=${{ matrix.toxenv }}
export PYTHON=${{ matrix.python-version }}
tox
pip install -U pip poetry tox
poetry install
export TOXENV=${{ matrix.toxenv }}
export PYTHON=${{ matrix.python-version }}
tox
test:
name: test latest / Django@${{ matrix.django-version }} / Python@${{ matrix.python-version }}
name:
test latest / Django@${{ matrix.django-version }} / Python@${{
matrix.python-version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand All @@ -50,26 +51,28 @@ jobs:

- name: Execute tests
run: |
pip install -U pip poetry tox
poetry install
pip install -U pip poetry tox
poetry install
export DJANGO=${{ matrix.django-version }}
export PYTHON=${{ matrix.python-version }}
export TOXENV=$(echo py${{ matrix.python-version }}-django${{ matrix.django-version }} | tr -d .)
tox
export DJANGO=${{ matrix.django-version }}
export PYTHON=${{ matrix.python-version }}
export TOXENV=$(echo py${{ matrix.python-version }}-django${{ matrix.django-version }} | tr -d .)
tox
- name: Coveralls
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
pip install coveralls
coveralls --service=github
pip install coveralls
coveralls --service=github
test_deprecated: # testing older versions of python+django
name: test old stuff / Django@${{ matrix.django-version }} / Python@${{ matrix.python-version }}
test_deprecated: # testing older versions of python+django
name:
test old stuff / Django@${{ matrix.django-version }} / Python@${{
matrix.python-version }}
runs-on: ubuntu-latest
strategy: # TODO: use a YAML anchor - not supported in GitHub actions "yet"
strategy: # TODO: use a YAML anchor - not supported in GitHub actions "yet"
fail-fast: false
matrix:
python-version: [3.7, 3.8, 3.9]
Expand All @@ -84,21 +87,21 @@ jobs:

- name: Execute tests
run: |
pip install -U pip poetry tox
poetry install
pip install -U pip poetry tox
poetry install
export DJANGO=${{ matrix.django-version }}
export PYTHON=${{ matrix.python-version }}
export TOXENV=$(echo py${{ matrix.python-version }}-django${{ matrix.django-version }} | tr -d .)
tox
export DJANGO=${{ matrix.django-version }}
export PYTHON=${{ matrix.python-version }}
export TOXENV=$(echo py${{ matrix.python-version }}-django${{ matrix.django-version }} | tr -d .)
tox
- name: Coveralls
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
pip install coveralls
coveralls --service=github
pip install coveralls
coveralls --service=github
build_and_package_sanity:
runs-on: ubuntu-latest
Expand All @@ -115,6 +118,6 @@ jobs:

- name: Build
run: |
pip install -U pip poetry tox
poetry install
./scripts/build.sh
pip install -U pip poetry tox
poetry install
./scripts/build.sh
10 changes: 7 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,11 @@ repos:
- id: mixed-line-ending
args: [--fix=lf]
- id: debug-statements
# code formatting
- repo: https://github.com/PyCQA/flake8
rev: 6.1.0
hooks:
- id: flake8
args: [ --max-line-length=120 ]
args: [--max-line-length=120]
- repo: https://github.com/psf/black
rev: 23.10.1
hooks:
Expand All @@ -25,7 +24,12 @@ repos:
rev: 5.12.0
hooks:
- id: isort
args: ['--profile', 'black']
args: ["--profile", "black"]
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.3
hooks:
- id: prettier
args: [--prose-wrap=always, --print-width=88]
- repo: local
hooks:
- id: pylint
Expand Down
44 changes: 22 additions & 22 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
* [carlio](https://github.com/carlio)
* [mbarrien](https://github.com/mbarrien)
* [frost-nzcr4](https://github.com/frost-nzcr4)
* [ustun](https://github.com/ustun)
* [jproffitt](https://github.com/jproffitt)
* [lhupfeldt](https://github.com/lhupfeldt)
* [smirolo](https://github.com/smirolo)
* [mbertolacci](https://github.com/mbertolacci)
* [atodorov](https://github.com/atodorov)
* [bittner](https://github.com/bittner)
* [federicobond](https://github.com/federicobond)
* [matusvalo](https://github.com/matusvalo)
* [fadedDexofan](https://github.com/fadeddexofan)
* [imomaliev](https://github.com/imomaliev)
* [psrb](https://github.com/psrb)
* [WayneLambert](https://github.com/WayneLambert)
* [alejandro-angulo](https://github.com/alejandro-angulo)
* [brymut](https://github.com/brymut)
* [michael-k](https://github.com/michael-k)
* [naquiroz](https://github.com/naquiroz)
* [john-sandall](https://github.com/john-sandall)
* [dineshtrivedi](https://github.com/dineshtrivedi)
- [carlio](https://github.com/carlio)
- [mbarrien](https://github.com/mbarrien)
- [frost-nzcr4](https://github.com/frost-nzcr4)
- [ustun](https://github.com/ustun)
- [jproffitt](https://github.com/jproffitt)
- [lhupfeldt](https://github.com/lhupfeldt)
- [smirolo](https://github.com/smirolo)
- [mbertolacci](https://github.com/mbertolacci)
- [atodorov](https://github.com/atodorov)
- [bittner](https://github.com/bittner)
- [federicobond](https://github.com/federicobond)
- [matusvalo](https://github.com/matusvalo)
- [fadedDexofan](https://github.com/fadeddexofan)
- [imomaliev](https://github.com/imomaliev)
- [psrb](https://github.com/psrb)
- [WayneLambert](https://github.com/WayneLambert)
- [alejandro-angulo](https://github.com/alejandro-angulo)
- [brymut](https://github.com/brymut)
- [michael-k](https://github.com/michael-k)
- [naquiroz](https://github.com/naquiroz)
- [john-sandall](https://github.com/john-sandall)
- [dineshtrivedi](https://github.com/dineshtrivedi)
12 changes: 6 additions & 6 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

## Supported Versions

| Version | Supported |
| ------- | ------------------ |
| Version | Supported |
| ------------------------------------------------- | ------------------ |
| [latest](https://pypi.org/project/pylint-django/) | :heavy_check_mark: |

## Reporting a Vulnerability

In case you have found a security problem with pylint-django *DO NOT* report
it into GitHub Issues. Instead go to
[https://tidelift.com/security](https://tidelift.com/security)
and follow the instructions there.
In case you have found a security problem with pylint-django _DO NOT_ report it into
GitHub Issues. Instead go to
[https://tidelift.com/security](https://tidelift.com/security) and follow the
instructions there.

0 comments on commit d21ccd3

Please sign in to comment.