blob: 472cdf93f2be0f6390d36006bc3d12de3467463b [file] [log] [blame]
Raul Farkas50550d62023-03-20 15:31:43 +00001# SPDX-FileCopyrightText: Copyright 2020-2023 Arm Limited and/or its affiliates <open-source-office@arm.com>
2
3# SPDX-License-Identifier: Apache-2.0
4
5# Licensed under the Apache License, Version 2.0 (the License); you may
6# not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8
9# www.apache.org/licenses/LICENSE-2.0
10
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an AS IS BASIS, WITHOUT
13# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16
Patrik Gustavsson8f1f9aa2021-06-28 07:41:58 +020017exclude: '^ethosu/vela/(tflite|ethos_u55_regs|tosa)/'
Diego Russoea6111a2020-04-14 18:41:58 +010018repos:
Jonas Ohlsson845e2322022-03-01 12:39:55 +010019- repo: https://github.com/pre-commit/mirrors-mypy
20 rev: 'v0.931'
21 hooks:
22 - id: mypy
23 args: ["--no-strict-optional", "--show-error-codes", "--ignore-missing-imports"]
24 require_serial: true
25 additional_dependencies: [types-setuptools]
26 minimum_pre_commit_version: '2.9.2'
27
Diego Russoc82b40c2020-04-22 16:19:26 +010028- repo: https://github.com/asottile/reorder_python_imports
29 rev: v2.2.0
30 hooks:
31 - id: reorder-python-imports
Diego Russoe8a10452020-04-21 17:39:10 +010032
Dwight Lidman2febe7f2020-10-06 12:30:24 +020033- repo: https://github.com/psf/black
Jonas Ohlssond8575072022-03-30 10:30:25 +020034 rev: 22.3.0
Diego Russoc82b40c2020-04-22 16:19:26 +010035 hooks:
36 - id: black
Rickard Bolina8810552022-01-13 12:18:15 +000037 language_version: python3
Diego Russoc82b40c2020-04-22 16:19:26 +010038 args: [--line-length=120]
Diego Russoea6111a2020-04-14 18:41:58 +010039
Rickard Bolin16da6ab2022-11-15 12:56:57 +000040- repo: https://github.com/pycqa/flake8
Jonas Ohlsson25e700c2022-03-04 14:58:56 +010041 rev: 4.0.1
Diego Russoc82b40c2020-04-22 16:19:26 +010042 hooks:
43 - id: flake8
44 args: [--max-line-length=120, --extend-ignore=E203]
45
Tim Hall6a7fd3d2023-09-29 12:04:57 +010046- repo: https://github.com/pylint-dev/pylint
47 rev: v2.13.9
Michael McGeagh54018232020-12-03 15:56:13 +000048 hooks:
49 - id: pylint
50 args: [--score=no, --max-line-length=120, --disable=all, --enable=W0102]
51
Diego Russoc82b40c2020-04-22 16:19:26 +010052- repo: local
53 hooks:
54 - id: pytest
55 name: pytest
56 stages: [commit]
57 language: system
Tim Hall762d3ac2023-07-06 11:42:02 +010058 entry: pytest -s -v
Diego Russoc82b40c2020-04-22 16:19:26 +010059 types: [python]
60 pass_filenames: false
61 always_run: true
62
63 - id: pytest-cov
Tim Hall0fc46dc2020-06-15 22:19:07 +010064 name: pytest-cov
Diego Russod0eee262020-04-23 18:14:37 +010065 stages: [push]
Diego Russoc82b40c2020-04-22 16:19:26 +010066 language: system
67 entry: pytest -v --cov=ethosu --cov-fail-under=0
68 types: [python]
69 pass_filenames: false
70 always_run: true