pre-commit: replace linters + formatters with Ruff; fix some issues (#1300)

* pre-commit: replace linters + formatters with Ruff

* Don't use bare except

* Clean up `noqa`s

* Enable Ruff UP; apply auto-fixes

* Enable Ruff B; apply fixes

* Enable Ruff T with exceptions

* Enable Ruff C (complexity); autofix

* Upgrade Ruff to 0.2.0
This commit is contained in:
Aarni Koskela
2024-02-15 05:37:41 +02:00
committed by GitHub
parent 29f162b86c
commit 9bc478ecbb
30 changed files with 113 additions and 149 deletions

View File

@ -1,4 +1,3 @@
# coding=utf-8
# Copyright 2023 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");