Skip to content

Commit d93cb58

Browse files
committed
fixup! [WIP] pre-commit and ruff
1 parent 3ea3ad2 commit d93cb58

File tree

78 files changed

+1638
-1638
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+1638
-1638
lines changed

.github/ISSUE_TEMPLATE/feature_request.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ A description of the idea or need, possibly supplemented with a specific solutio
1919
The added value for business operations or services
2020

2121
### Additional context
22-
Any other context or screenshots about the feature request
22+
Any other context or screenshots about the feature request

.github/workflows/pre-commit.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,21 @@ jobs:
99
- uses: actions/checkout@v4
1010
with:
1111
fetch-depth: 0
12-
12+
1313
- name: Set up Python
1414
uses: actions/setup-python@v5
1515
with:
1616
python-version: '3.x'
17-
17+
1818
- name: Install pre-commit
1919
run: pip install pre-commit
20-
20+
2121
- name: Get changed files
2222
id: changed-files
2323
run: |
2424
echo "files=$(git diff --name-only origin/main...HEAD | tr '\n' ' ')" >> $GITHUB_OUTPUT
25-
25+
2626
- name: Run pre-commit
2727
continue-on-error: true
2828
run: |
29-
pre-commit run --files ${{ steps.changed-files.outputs.files }}
29+
pre-commit run --files ${{ steps.changed-files.outputs.files }}

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,3 @@ src/open_inwoner/static/webfonts/fa-solid-900.woff2
4949
src/open_inwoner/static/webfonts/fa-v4compatibility.ttf
5050
src/open_inwoner/static/webfonts/fa-v4compatibility.woff2
5151
src/open_inwoner/static/fonts/material-icons/
52-

.pre-commit-config.yaml

+18-9
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,19 @@
11
repos:
2-
- repo: https://github.com/astral-sh/ruff-pre-commit
3-
# Ruff version.
4-
rev: v0.8.4
5-
hooks:
6-
# Run the linter.
7-
- id: ruff
8-
args: [ --fix ]
9-
# Run the formatter.
10-
- id: ruff-format
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v5.0.0
4+
hooks:
5+
- id: trailing-whitespace
6+
- id: end-of-file-fixer
7+
- id: mixed-line-ending
8+
- id: check-merge-conflict
9+
- id: check-toml
10+
- id: debug-statements
11+
- repo: https://github.com/astral-sh/ruff-pre-commit
12+
# Ruff version.
13+
rev: v0.8.4
14+
hooks:
15+
# Run the linter.
16+
- id: ruff
17+
args: [--fix]
18+
# Run the formatter.
19+
- id: ruff-format

.python-version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.11
1+
3.11

AUTHORS

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Maykin Media team was happy to participate in such a socially significant projec
44

55
Here is an inevitably incomplete list of MUCH-APPRECIATED CONTRIBUTORS --
66
people who laid the groundwork, have submitted patches, reported bugs, added
7-
translations, helped answer questions, and generally made the components that
7+
translations, helped answer questions, and generally made the components that
88
much better:
99

1010
Alex de Landgraaf <[email protected]>
@@ -21,4 +21,4 @@ A big THANK YOU goes to:
2121
ideas: the municipalities of Deventer, Enschede, Groningen, Leeuwarden,
2222
Zaanstad and Zwolle.
2323

24-
All people behind Common Ground for their enthusiasm and vision.
24+
All people behind Common Ground for their enthusiasm and vision.

CHANGELOG.rst

-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,3 @@ Change history
44

55

66
See the Github releases: https://github.com/maykinmedia/open-inwoner/releases
7-

CODE_OF_CONDUCT.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,4 @@ members of the project's leadership.
7070
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
7171
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
7272

73-
[homepage]: https://www.contributor-covenant.org
73+
[homepage]: https://www.contributor-covenant.org

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,4 +72,4 @@ to a release branch.
7272
[issues]: https://github.com/maykinmedia/open-inwoner/issues
7373
[new_issue]: https://github.com/maykinmedia/open-inwoner/issues/new/choose
7474
[Standard_for_Public_Code]: https://standard.publiccode.net
75-
[repository]: https://github.com/maykinmedia/open-inwoner
75+
[repository]: https://github.com/maykinmedia/open-inwoner

LICENSE.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -215,15 +215,15 @@ Deze openbare licentie van de Europese Unie („EUPL”) is van toepassing op he
215215
of op een andere wijze zijn bereidheid te kennen heeft gegeven krachtens de EUPL in licentie te geven.
216216
217217
1.Definities
218-
In deze licentie wordt verstaan onder:
219-
— „de licentie”:de onderhavige licentie;
220-
— „het oorspronkelijke werk”:het werk dat of de software die door de licentiegever krachtens deze licentie wordt verspreid of medegedeeld, en dat/die beschikbaar is als broncode en, in voorkomend geval, ook als uitvoerbare code;
221-
— „bewerkingen”:de werken of software die de licentiehouder kan creëren op grond van het oorspronkelijke werk of wijzigingen ervan. In deze licentie wordt niet gedefinieerd welke mate van wijziging of afhankelijkheid van het oorspronkelijke werk vereist is om een werk als een bewerking te kunnen aanmerken; dat wordt bepaald conform het auteursrecht dat van toepassing is in de in artikel 15 bedoelde staat;
222-
— „het werk”:het oorspronkelijke werk of de bewerkingen ervan;
223-
— „de broncode”:de voor mensen leesbare vorm van het werk, die het gemakkelijkste door mensen kan worden bestudeerd en gewijzigd;
224-
— „de uitvoerbare code”:elke code die over het algemeen is gecompileerd en is bedoeld om door een computer als een programma te worden uitgevoerd;
225-
— „de licentiegever”:de natuurlijke of rechtspersoon die het werk krachtens de licentie verspreidt of mededeelt;
226-
— „bewerker(s)”:elke natuurlijke of rechtspersoon die het werk krachtens de licentie wijzigt of op een andere wijze bijdraagt tot de totstandkoming van een bewerking;
218+
In deze licentie wordt verstaan onder:
219+
— „de licentie”:de onderhavige licentie;
220+
— „het oorspronkelijke werk”:het werk dat of de software die door de licentiegever krachtens deze licentie wordt verspreid of medegedeeld, en dat/die beschikbaar is als broncode en, in voorkomend geval, ook als uitvoerbare code;
221+
— „bewerkingen”:de werken of software die de licentiehouder kan creëren op grond van het oorspronkelijke werk of wijzigingen ervan. In deze licentie wordt niet gedefinieerd welke mate van wijziging of afhankelijkheid van het oorspronkelijke werk vereist is om een werk als een bewerking te kunnen aanmerken; dat wordt bepaald conform het auteursrecht dat van toepassing is in de in artikel 15 bedoelde staat;
222+
— „het werk”:het oorspronkelijke werk of de bewerkingen ervan;
223+
— „de broncode”:de voor mensen leesbare vorm van het werk, die het gemakkelijkste door mensen kan worden bestudeerd en gewijzigd;
224+
— „de uitvoerbare code”:elke code die over het algemeen is gecompileerd en is bedoeld om door een computer als een programma te worden uitgevoerd;
225+
— „de licentiegever”:de natuurlijke of rechtspersoon die het werk krachtens de licentie verspreidt of mededeelt;
226+
— „bewerker(s)”:elke natuurlijke of rechtspersoon die het werk krachtens de licentie wijzigt of op een andere wijze bijdraagt tot de totstandkoming van een bewerking;
227227
— „de licentiehouder” of „u”:elke natuurlijke of rechtspersoon die het werk onder de voorwaarden van de licentie gebruikt; — „verspreiding” of „mededeling”:het verkopen, geven, uitlenen, verhuren, verspreiden, mededelen, doorgeven, of op een andere wijze online of offline beschikbaar stellen van kopieën van het werk of het verlenen van toegang tot de essentiële functies ervan ten behoeve van andere natuurlijke of rechtspersonen.
228228
229229
2.Draagwijdte van de uit hoofde van de licentie verleende rechten
@@ -263,7 +263,7 @@ De oorspronkelijke licentiegever garandeert dat hij houder is van het hierbij ve
263263
Het werk is een werk in ontwikkeling, dat voortdurend door vele bewerkers wordt verbeterd. Het is een onvoltooid werk, dat bijgevolg nog tekortkomingen of programmeerfouten („bugs”) kan vertonen, die onlosmakelijk verbonden zijn met dit soort ontwikkeling. Om die reden wordt het werk op grond van de licentie verstrekt „zoals het is” en zonder enige garantie met betrekking tot het werk te geven, met inbegrip van, maar niet beperkt tot garanties met betrekking tot de verhandelbaarheid, de geschiktheid voor een specifiek doel, de afwezigheid van tekortkomingen of fouten, de nauwkeurigheid, de eerbiediging van andere intellectuele-eigendomsrechten dan het in artikel 6 van deze licentie bedoelde auteursrecht. Deze uitsluiting van garantie is een essentieel onderdeel van de licentie en een voorwaarde voor de verlening van rechten op het werk.
264264
265265
8.Uitsluiting van aansprakelijkheid
266-
Behoudens in het geval van een opzettelijke fout of directe schade aan natuurlijke personen, is de licentiegever in geen enkel geval aansprakelijk voor ongeacht welke directe of indirecte, materiële of immateriële schade die voortvloeit uit de licentie of het gebruik van het werk, met inbegrip van, maar niet beperkt tot schade als gevolg van het verlies van goodwill, verloren werkuren, een computerdefect of computerfout, het verlies van gegevens, of enige andere commerciële schade, zelfs indien de licentiegever werd gewezen op de mogelijkheid van dergelijke schade. De licentiegever is echter aansprakelijk op grond van de wetgeving inzake productaansprakelijkheid, voor zover deze wetgeving op het werk van toepassing is.
266+
Behoudens in het geval van een opzettelijke fout of directe schade aan natuurlijke personen, is de licentiegever in geen enkel geval aansprakelijk voor ongeacht welke directe of indirecte, materiële of immateriële schade die voortvloeit uit de licentie of het gebruik van het werk, met inbegrip van, maar niet beperkt tot schade als gevolg van het verlies van goodwill, verloren werkuren, een computerdefect of computerfout, het verlies van gegevens, of enige andere commerciële schade, zelfs indien de licentiegever werd gewezen op de mogelijkheid van dergelijke schade. De licentiegever is echter aansprakelijk op grond van de wetgeving inzake productaansprakelijkheid, voor zover deze wetgeving op het werk van toepassing is.
267267
268268
9.Aanvullende overeenkomsten
269269
Bij de verspreiding van het werk kunt u ervoor kiezen een aanvullende overeenkomst te sluiten, waarin de verplichtingen of diensten overeenkomstig deze licentie worden omschreven. Indien deze verplichtingen worden aanvaard, kunt u echter alleen in eigen naam en onder eigen verantwoordelijkheid handelen, en dus niet in naam van de oorspronkelijke licentiegever of een bewerker, en kunt u voorts alleen handelen indien u ermee instemt alle bewerkers schadeloos te stellen, te verdedigen of te vrijwaren met betrekking tot de aansprakelijkheid van of vorderingen tegen deze bewerkers op grond van het feit dat u een garantie of aanvullende aansprakelijkheid hebt aanvaard.

SECURITY.rst

+20-20
Original file line numberDiff line numberDiff line change
@@ -3,61 +3,61 @@
33
Security policy
44
===============
55

6-
The development team is strongly committed to responsible reporting and
7-
disclosure of security-related issues. As such, we’ve adopted and follow a set
8-
of policies which conform to that ideal and are geared toward allowing us to
6+
The development team is strongly committed to responsible reporting and
7+
disclosure of security-related issues. As such, we’ve adopted and follow a set
8+
of policies which conform to that ideal and are geared toward allowing us to
99
deliver timely security updates to the official distribution of Open Inwoner.
1010

1111
Reporting security issues
1212
-------------------------
1313

14-
**Short version: please report security issues by emailing
14+
**Short version: please report security issues by emailing
1515
1616

17-
If you discover security issues in Open Inwoner or related projects under the
18-
same organization, we request you to disclose these in a *responsible* way by
17+
If you discover security issues in Open Inwoner or related projects under the
18+
same organization, we request you to disclose these in a *responsible* way by
1919
mailing to [email protected].
2020

21-
It is extremely useful if you have a reproducible test case and/or clear steps
21+
It is extremely useful if you have a reproducible test case and/or clear steps
2222
on how to reproduce the vulnerability.
2323

24-
Please do not report security issues on the public Github issue tracker, as
25-
this makes it visible which exploits exist before a fix is available,
24+
Please do not report security issues on the public Github issue tracker, as
25+
this makes it visible which exploits exist before a fix is available,
2626
potentially comprising a lot of unprotected instances.
2727

28-
Once you’ve submitted an issue via email, you should receive an acknowledgment
29-
from a member of the security team as soon as possible, and depending on the
28+
Once you’ve submitted an issue via email, you should receive an acknowledgment
29+
from a member of the security team as soon as possible, and depending on the
3030
action to be taken, you may receive further followup emails.
3131

3232
Timeline of the process
3333
-----------------------
3434

35-
Open Inwoner community support is provided by `Maykin Media`_. The community
35+
Open Inwoner community support is provided by `Maykin Media`_. The community
3636
support team is responsible for the handling of security issues.
3737

38-
1. The recipients of the report first validate if there is indeed a (possible)
38+
1. The recipients of the report first validate if there is indeed a (possible)
3939
issue.
4040

4141
2. After validation, we confirm that we received the report and if it is indeed
4242
a valid issue.
4343

44-
3. We have a private Github repository accessible only to the community support
45-
team. In this repository, an issue is created for the vulnerability where
44+
3. We have a private Github repository accessible only to the community support
45+
team. In this repository, an issue is created for the vulnerability where
4646
the impact and possible solutions are discussed.
4747

48-
4. The next step is to create a (draft) Github security advisory, which is only
49-
visible to the repository administrators and community support team.
48+
4. The next step is to create a (draft) Github security advisory, which is only
49+
visible to the repository administrators and community support team.
5050
Severity and impact will be established here.
5151

5252
5. If appropriate, we request a `CVE identifier`_ from Github.
5353

5454
6. A patch is implemented, reviewed and tested in a private fork.
5555

56-
7. When the fix is tested and release coordination is done, the fix is merged
57-
into the primary repository. The security advisory and release are
56+
7. When the fix is tested and release coordination is done, the fix is merged
57+
into the primary repository. The security advisory and release are
5858
published. All managed instances should be updated.
5959

60-
8. The release and security vulnerability are communicated to the community.
60+
8. The release and security vulnerability are communicated to the community.
6161
This includes an announcement on `commonground.nl`_.
6262

6363

bin/generate_cms_fixture.sh

-2
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,3 @@
1111
# Note: you will likely need to restart uwsgi/supervisor/docker afterwards for apphooks to be registered properly
1212

1313
src/manage.py dumpdata --indent=4 --natural-primary cms.treenode cms.placeholder cms.page cms.title cms.cmsplugin extensions.commonextension > src/open_inwoner/conf/fixtures/cms-page.json
14-
15-

docker-nginx-default.conf

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ server {
1111
client_max_body_size 100M;
1212
proxy_pass http://web:8000;
1313
}
14-
}
14+
}

docker/openklant/fixtures/db.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -215,4 +215,4 @@
215215
"object_type": "zaak"
216216
}
217217
}
218-
]
218+
]

0 commit comments

Comments
 (0)