Skip to content

Commit 7729e80

Browse files
committed
all: Go back to using default ruff quote style.
Commit dc2fcfc seems to have accidentally changed the ruff quote style to "preserve", instead of keeping it at the default which is "double". Put it back to the default and update relevant .py files with this rule. Signed-off-by: Damien George <[email protected]>
1 parent 6a4306a commit 7729e80

File tree

16 files changed

+45
-46
lines changed

16 files changed

+45
-46
lines changed

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,3 @@ mccabe.max-complexity = 40
6868
# repl_: not real python files
6969
# viper_args: uses f(*)
7070
exclude = ["tests/basics/*.py", "tests/*/repl_*.py", "tests/micropython/viper_args.py"]
71-
quote-style = "preserve"

tests/cpydiff/core_fstring_parser.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@
55
workaround: Always use balanced braces and brackets in expressions inside f-strings
66
"""
77

8-
print(f'{"hello { world"}')
9-
print(f'{"hello ] world"}')
8+
print(f"{'hello { world'}")
9+
print(f"{'hello ] world'}")

tests/extmod/deflate_compress_memory_error.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
# Try to compress. This will try to allocate a large window and fail.
3030
try:
31-
g.write('test')
31+
g.write("test")
3232
except MemoryError:
3333
print("MemoryError")
3434

tests/extmod/json_loads.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def my_print(o):
8686

8787
# incomplete array declaration
8888
try:
89-
my_print(json.loads('[0,'))
89+
my_print(json.loads("[0,"))
9090
except ValueError:
9191
print("ValueError")
9292

tests/extmod/json_loads_int_64.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
print(json.loads("-9111222333444555666"))
1414
print(json.loads("9111222333444555666"))
1515
print(json.loads("-9111222333444555666"))
16-
print(json.loads("[\"9111222333444555666777\",9111222333444555666]"))
16+
print(json.loads('["9111222333444555666777",9111222333444555666]'))

tests/extmod/tls_dtls.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def ioctl(self, req, arg):
3535
dtls_server_ctx = SSLContext(PROTOCOL_DTLS_SERVER)
3636
dtls_server_ctx.verify_mode = CERT_NONE
3737
dtls_server = dtls_server_ctx.wrap_socket(
38-
server_socket, do_handshake_on_connect=False, client_id=b'dummy_client_id'
38+
server_socket, do_handshake_on_connect=False, client_id=b"dummy_client_id"
3939
)
4040
print("Wrapped DTLS Server")
4141

tests/float/math_fun_special.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,6 @@
5252
except ValueError as e:
5353
ans = str(e)
5454
# a tiny error in REPR_C value for 1.5204998778 causes a wrong rounded value
55-
if is_REPR_C and function_name == 'erfc' and ans == "1.521":
55+
if is_REPR_C and function_name == "erfc" and ans == "1.521":
5656
ans = "1.52"
5757
print("{}({:.4g}) = {}".format(function_name, value, ans))

tests/import/import_star.py

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,39 +7,39 @@
77
except TypeError:
88
# 2-argument version of next() not supported
99
# we are probably not at MICROPY_CONFIG_ROM_LEVEL_BASIC_FEATURES
10-
print('SKIP')
10+
print("SKIP")
1111
raise SystemExit
1212

1313
# 1. test default visibility
1414
from pkgstar_default import *
1515

16-
print('visibleFun' in globals())
17-
print('VisibleClass' in globals())
18-
print('_hiddenFun' in globals())
19-
print('_HiddenClass' in globals())
16+
print("visibleFun" in globals())
17+
print("VisibleClass" in globals())
18+
print("_hiddenFun" in globals())
19+
print("_HiddenClass" in globals())
2020
print(visibleFun())
2121

2222
# 2. test explicit visibility as defined by __all__ (as an array)
2323
from pkgstar_all_array import *
2424

25-
print('publicFun' in globals())
26-
print('PublicClass' in globals())
27-
print('unlistedFun' in globals())
28-
print('UnlistedClass' in globals())
29-
print('_privateFun' in globals())
30-
print('_PrivateClass' in globals())
25+
print("publicFun" in globals())
26+
print("PublicClass" in globals())
27+
print("unlistedFun" in globals())
28+
print("UnlistedClass" in globals())
29+
print("_privateFun" in globals())
30+
print("_PrivateClass" in globals())
3131
print(publicFun())
3232
# test dynamic import as used in asyncio
33-
print('dynamicFun' in globals())
33+
print("dynamicFun" in globals())
3434
print(dynamicFun())
3535

3636
# 3. test explicit visibility as defined by __all__ (as an tuple)
3737
from pkgstar_all_tuple import *
3838

39-
print('publicFun2' in globals())
40-
print('PublicClass2' in globals())
41-
print('unlistedFun2' in globals())
42-
print('UnlistedClass2' in globals())
39+
print("publicFun2" in globals())
40+
print("PublicClass2" in globals())
41+
print("unlistedFun2" in globals())
42+
print("UnlistedClass2" in globals())
4343
print(publicFun2())
4444

4545
# 4. test reporting of missing entries in __all__

tests/import/pkgstar_all_array/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__all__ = ['publicFun', 'PublicClass', 'dynamicFun']
1+
__all__ = ["publicFun", "PublicClass", "dynamicFun"]
22

33

44
# Definitions below should always be imported by a star import

tests/import/pkgstar_all_miss/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__all__ = ('existingFun', 'missingFun')
1+
__all__ = ("existingFun", "missingFun")
22

33

44
def existingFun():

0 commit comments

Comments
 (0)