Replace black formatter by ruff

This commit is contained in:
Fabrice Reix 2024-11-09 09:05:26 +01:00
parent 9c91fe8dba
commit eb24030e57
No known key found for this signature in database
GPG Key ID: BF5213154B2E7155
16 changed files with 31 additions and 31 deletions

View File

@ -73,9 +73,9 @@ jobs:
if: always()
run: bin/check/clippy.sh
- name: Black
- name: Ruff
if: always()
run: bin/check/black.sh
run: bin/check/ruff.sh
- name: Check XML/HTML files
if: always()

View File

@ -1,5 +0,0 @@
#!/bin/bash
set -Eeuo pipefail
black --check .

View File

@ -6,6 +6,7 @@ This script checks that there is no dependencies with unauthorized license (GPL
Examples:
$ python3 bin/check/license.py
"""
from typing import List, Tuple
import json

6
bin/check/ruff.sh Executable file
View File

@ -0,0 +1,6 @@
#!/bin/bash
set -Eeuo pipefail
ruff --version
ruff format --check

View File

@ -9,6 +9,7 @@ Examples:
$ python3 bin/docs/build_man_md.py docs/manual/hurl.md > docs/manual.md
"""
import re
import sys
from pathlib import Path

View File

@ -14,6 +14,7 @@ Examples:
$ python3 bin/docs/build_readme.py crates > packages/hurl/README.md
"""
import os
import re
import sys

View File

@ -8,6 +8,7 @@ not easy to maintain it.
Examples:
$ python3 bin/docs/build_standalone_md.py > docs/standalone/hurl-5.0.1.md
"""
import os
import re
import sys
@ -210,7 +211,6 @@ def inline_ref_link(md: MarkdownDoc):
def main() -> int:
standalone_md = MarkdownDoc()
add_sections(

View File

@ -10,6 +10,7 @@ Examples:
$ python3 bin/release/gen_manpage.py docs/manual/hurlfmt.md > docs/manual/hurlfmt.1
"""
import sys
import re
from datetime import date

View File

@ -5,6 +5,7 @@ Example:
$ python3 bin/release/get_release_note.py 1.7.0
"""
import argparse
import datetime
import json

View File

@ -1,22 +1,22 @@
beautifulsoup4==4.12.3
black==24.4.2
blinker==1.8.2
blinker==1.9.0
certifi==2024.8.30
charset-normalizer==3.4.0
click==8.1.7
Flask==3.0.3
flask==3.0.3
idna==3.10
importlib-metadata==8.5.0
itsdangerous==2.2.0
Jinja2==3.1.4
jinja2==3.1.4
lxml==5.2.2
MarkupSafe==3.0.2
mypy==1.10.0
mypy-extensions==1.0.0
packaging==24.1
pathspec==0.12.1
platformdirs==4.3.6
requests==2.32.3
ruff==0.7.3
soupsieve==2.6
typing_extensions==4.12.2
tomli==2.0.2
typing-extensions==4.12.2
urllib3==2.2.3
Werkzeug==3.0.6
werkzeug==3.1.3
zipp==3.20.2

View File

@ -1,6 +1,6 @@
black==24.4.2
beautifulsoup4==4.12.3
Flask==3.0.3
lxml==5.2.2
mypy==1.10.0
requests==2.32.3
requests==2.32.3
ruff==0.7.3

View File

@ -2,6 +2,7 @@
"""
Generate Completion files
"""
from typing import *
from option import Option

View File

@ -3,6 +3,7 @@
Examples:
$ python3 contrib/npm/check_archive.py 1.6.1
"""
import sys
import json
from pathlib import Path

View File

@ -12,7 +12,5 @@ def hello_gb2312_failed():
</head>
<body>你好世界</body>
</html>
""".encode(
"gb2312"
)
""".encode("gb2312")
return Response(data, headers=headers)

View File

@ -12,7 +12,5 @@ def gb2312():
</head>
<body>你好世界</body>
</html>
""".encode(
"gb2312"
)
""".encode("gb2312")
return Response(data, headers=headers)

View File

@ -12,9 +12,7 @@ def hello_gb2312():
</head>
<body>你好世界</body>
</html>
""".encode(
"gb2312"
)
""".encode("gb2312")
return Response(data, headers=headers)
@ -28,7 +26,5 @@ def hello_gb2312_implicit():
</head>
<body>你好世界</body>
</html>
""".encode(
"gb2312"
)
""".encode("gb2312")
return Response(data, headers=headers)