mirror of
https://github.com/status-im/PyGithub.git
synced 2026-08-31 10:51:14 +00:00
CI: Improve ruff DX (#2667)
This commit is contained in:
+15
-14
@@ -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
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user