Skip to content

Commit 3180b94

Browse files
committed
fix ruff
1 parent f3f9cca commit 3180b94

6 files changed

+14
-12
lines changed

examples/ansi_escape_code__cursor_position_dev.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
#!/usr/bin/env python3
2-
# -*- coding: utf-8 -*-
32

43
# SPDX-FileCopyrightText: Copyright (c) 2022 Stefan Krüger for s-light
54
#
65
# SPDX-License-Identifier: Unlicense
76

87
"""Test Cursor Movement."""
98

10-
import time
119
import sys
10+
import time
11+
1212
import board
1313
import usb_cdc
14+
1415
import ansi_escape_code as terminal
1516

1617
##########################################
@@ -76,7 +77,7 @@ def check_input():
7677
print("answer:", repr(buffer))
7778

7879
row, col = terminal.ANSIControl.device_status_report_parse(buffer)
79-
print("row: {}; col: {}".format(row, col))
80+
print(f"row: {row}; col: {col}")
8081

8182
print("wait 2s")
8283
time.sleep(2)

examples/ansi_escape_code_background_test.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
import random
66
import time
7+
78
import ansi_escape_code as terminal
89

910
color = [

examples/ansi_escape_code_cursor_position.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
#!/usr/bin/env python3
2-
# -*- coding: utf-8 -*-
32

43
# SPDX-FileCopyrightText: Copyright (c) 2022 Stefan Krüger for s-light
54
#
65
# SPDX-License-Identifier: Unlicense
76

87
"""Test Cursor Movement."""
98

10-
import time
119
import sys
10+
import time
11+
1212
import board
1313
import usb_cdc
14+
1415
import ansi_escape_code as terminal
1516

1617
##########################################
@@ -21,7 +22,7 @@ def run_example():
2122
serial = usb_cdc.console
2223
print("get_terminal_size:")
2324
row, col = terminal.get_terminal_size(serial=serial)
24-
print("row: {}; col: {}".format(row, col))
25+
print(f"row: {row}; col: {col}")
2526
print("wait 2s")
2627
time.sleep(2)
2728

examples/ansi_escape_code_progress.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
#!/usr/bin/env python3
2-
# -*- coding: utf-8 -*-
32

43
# SPDX-FileCopyrightText: Copyright (c) 2022 Stefan Krüger for s-light
54
#
65
# SPDX-License-Identifier: Unlicense
76

87
import sys
98
import time
9+
1010
import usb_cdc
11-
from ansi_escape_code.progressbar import ProgressBar
1211

12+
from ansi_escape_code.progressbar import ProgressBar
1313

1414
##########################################
1515
# help

examples/ansi_escape_code_simpletest.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
#!/usr/bin/env python3
2-
# -*- coding: utf-8 -*-
32

43
# SPDX-FileCopyrightText: Copyright (c) 2022 Stefan Krüger for s-light
54
#
65
# SPDX-License-Identifier: Unlicense
76

87
import sys
98
import time
10-
import ansi_escape_code as terminal
119

10+
import ansi_escape_code as terminal
1211

1312
##########################################
1413
# main

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@
1010
https://github.com/pypa/sampleproject
1111
"""
1212

13-
from setuptools import setup, find_packages
14-
1513
# To use a consistent encoding
1614
from codecs import open
1715
from os import path
1816

17+
from setuptools import find_packages, setup
18+
1919
here = path.abspath(path.dirname(__file__))
2020

2121
# Get the long description from the README file

0 commit comments

Comments
 (0)