CI: Improve ruff DX (#2667)

This commit is contained in:
Trim21
2023-07-21 19:07:30 +02:00
committed by GitHub
parent 4933459e6b
commit 48d2009c81
2 changed files with 16 additions and 15 deletions
+15 -14
View File
@@ -7,19 +7,6 @@ repos:
- id: mixed-line-ending
args: [ --fix=lf ]
- repo: https://github.com/psf/black
rev: 22.10.0
hooks:
- id: black
- repo: https://github.com/codespell-project/codespell
rev: v2.2.1
hooks:
- id: codespell
exclude: tests/
args:
- --ignore-words-list="bloaded,nto,pullrequest,pullrequests,thi,tim,wan,Wan,chang,Chang"
- --quiet-level=2
- repo: https://github.com/asottile/pyupgrade
rev: v3.1.0
hooks:
@@ -31,4 +18,18 @@ repos:
rev: 'v0.0.278'
hooks:
- id: ruff
args: ["--fix"]
args: [ "--fix", "--fixable=ALL", "--exit-non-zero-on-fix" ]
- repo: https://github.com/codespell-project/codespell
rev: v2.2.1
hooks:
- id: codespell
exclude: tests/
args:
- --ignore-words-list="bloaded,nto,pullrequest,pullrequests,thi,tim,wan,Wan,chang,Chang"
- --quiet-level=2
- repo: https://github.com/psf/black
rev: 23.3.0
hooks:
- id: black
+1 -1
View File
@@ -330,7 +330,7 @@ class BasicTestCase(unittest.TestCase):
yield
def __openFile(self, mode):
for (_, _, functionName, _) in traceback.extract_stack():
for _, _, functionName, _ in traceback.extract_stack():
if functionName.startswith("test") or functionName == "setUp" or functionName == "tearDown":
if functionName != "test": # because in class Hook(Framework.TestCase), method testTest calls Hook.test
fileName = os.path.join(