Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pre-commit] Add and apply prettier #416

Merged
merged 2 commits into from
Nov 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.