Skip to content

Commit a7c349b

Browse files
authored
Merge pull request #266 from rpartzsch/pre-commit
Code Style: pre commit
2 parents 93f3ba8 + b07ac76 commit a7c349b

245 files changed

Lines changed: 5843 additions & 5191 deletions

File tree

Some content is hidden

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

.github/workflows/regression-tests.yml

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,18 @@ on:
1010

1111
jobs:
1212

13-
lint-flake8:
13+
pre-commit:
1414
runs-on: ubuntu-latest
15-
name: flake8
16-
strategy:
17-
fail-fast: false
1815
steps:
19-
- uses: actions/checkout@v6
20-
- name: Set up Python
21-
uses: actions/setup-python@v6
16+
- uses: actions/checkout@v4
17+
- uses: actions/setup-python@v5
2218
with:
23-
python-version: 3.11
24-
- name: flake8
25-
run: |
26-
pip install flake8
27-
flake8 --ignore=E501,W503,W504
19+
python-version: "3.12"
20+
- uses: pre-commit/action@v3.0.1
2821

2922
tests:
3023

31-
name: Python ${{matrix.python-version}} | ${{matrix.sim}}
24+
name: Python ${{matrix.python-version}} | ${{matrix.sim}}
3225
runs-on: ubuntu-24.04
3326
env:
3427
SIM: ${{matrix.sim}}

.pre-commit-config.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
repos:
2+
- repo: https://github.com/pycqa/isort
3+
rev: 6.0.1
4+
hooks:
5+
- id: isort
6+
name: isort (python)
7+
- repo: https://github.com/astral-sh/ruff-pre-commit
8+
rev: v0.14.0
9+
hooks:
10+
- id: ruff-check
11+
args: [ --fix ]
12+
- id: ruff-format
13+
- repo: https://github.com/pre-commit/pre-commit-hooks
14+
rev: v5.0.0
15+
hooks:
16+
- id: end-of-file-fixer
17+
- id: trailing-whitespace

LICENSE.txt

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,29 @@ Copyright (c) 2011-2018 SiLab, Institute of Physics, University of Bonn
22

33
All rights reserved.
44

5-
Redistribution and use in source and binary forms, with or without
6-
modification, are permitted provided that the following conditions are
5+
Redistribution and use in source and binary forms, with or without
6+
modification, are permitted provided that the following conditions are
77
met:
88

9-
* Redistributions of source code must retain the above copyright notice,
9+
* Redistributions of source code must retain the above copyright notice,
1010
this list of conditions and the following disclaimer.
1111

12-
* Redistributions in binary form must reproduce the above copyright
13-
notice, this list of conditions and the following disclaimer in the
12+
* Redistributions in binary form must reproduce the above copyright
13+
notice, this list of conditions and the following disclaimer in the
1414
documentation and/or other materials provided with the distribution.
1515

16-
* Neither the name of the copyright holder nor the names of its
17-
contributors may be used to endorse or promote products derived from
16+
* Neither the name of the copyright holder nor the names of its
17+
contributors may be used to endorse or promote products derived from
1818
this software without specific prior written permission.
1919

20-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
21-
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
22-
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
23-
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24-
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25-
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
26-
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
27-
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
28-
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
29-
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
20+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
21+
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
22+
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
23+
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24+
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
26+
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
27+
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
28+
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
29+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
3030
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

0 commit comments

Comments
 (0)