Skip to content

Commit 697f2c2

Browse files
committed
run pre-commit run ruff-check
1 parent 1485562 commit 697f2c2

37 files changed

Lines changed: 46 additions & 76 deletions

File tree

docs/conf.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,11 +133,11 @@
133133
# --- Extlinks configuration
134134
extlinks = {
135135
"gh-issue": (
136-
f"https://github.com/bazel-contrib/rules_python/issues/%s",
136+
"https://github.com/bazel-contrib/rules_python/issues/%s",
137137
"#%s issue",
138138
),
139-
"gh-path": (f"https://github.com/bazel-contrib/rules_python/tree/main/%s", "%s"),
140-
"gh-pr": (f"https://github.com/bazel-contrib/rules_python/pull/%s", "#%s PR"),
139+
"gh-path": ("https://github.com/bazel-contrib/rules_python/tree/main/%s", "%s"),
140+
"gh-pr": ("https://github.com/bazel-contrib/rules_python/pull/%s", "#%s PR"),
141141
}
142142

143143
# --- MyST configuration

examples/bzlmod/entry_points/tests/pylint_deps_test.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
import os
1616
import pathlib
1717
import subprocess
18-
import tempfile
1918
import unittest
2019

2120
from python.runfiles import runfiles
@@ -51,7 +50,7 @@ def test_pylint_entry_point(self):
5150
"",
5251
proc.stderr.decode("utf-8").strip(),
5352
)
54-
self.assertRegex(proc.stdout.decode("utf-8").strip(), "^pylint 2\.15\.9")
53+
self.assertRegex(proc.stdout.decode("utf-8").strip(), r"^pylint 2\.15\.9")
5554

5655
def test_pylint_report_has_expected_warnings(self):
5756
rlocation_path = os.environ.get("PYLINT_REPORT")
@@ -64,7 +63,7 @@ def test_pylint_report_has_expected_warnings(self):
6463

6564
self.assertRegex(
6665
pylint_report.read_text().strip(),
67-
"W8201: Logging should be used instead of the print\(\) function\. \(print-function\)",
66+
r"W8201: Logging should be used instead of the print\(\) function\. \(print-function\)",
6867
)
6968

7069

examples/bzlmod/entry_points/tests/pylint_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def test_pylint_entry_point(self):
5050
"",
5151
proc.stderr.decode("utf-8").strip(),
5252
)
53-
self.assertRegex(proc.stdout.decode("utf-8").strip(), "^pylint 2\.15\.9")
53+
self.assertRegex(proc.stdout.decode("utf-8").strip(), r"^pylint 2\.15\.9")
5454

5555

5656
if __name__ == "__main__":

examples/bzlmod/test.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
# limitations under the License.
1414

1515
import os
16-
import pathlib
1716
import re
1817
import sys
1918
import unittest

examples/bzlmod/tests/my_lib_test.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
import os
1615
import sys
1716

1817
import libs.my_lib as my_lib

examples/multi_python_versions/tests/my_lib_test.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
import os
1615
import sys
1716

1817
import libs.my_lib as my_lib

gazelle/manifest/copy_to_source.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
import os
88
import shutil
9-
import stat
109
import sys
1110
from pathlib import Path
1211

gazelle/modules_mapping/test_merger.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import pathlib
2-
import unittest
31
import json
2+
import pathlib
43
import tempfile
4+
import unittest
55

66
from merger import merge_modules_mappings
77

python/private/py_console_script_gen.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,6 @@
3737
import argparse
3838
import configparser
3939
import pathlib
40-
import re
41-
import sys
42-
import textwrap
4340

4441
_ENTRY_POINTS_TXT = "entry_points.txt"
4542

python/private/pypi/repack_whl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ def main(sys_argv):
174174
rel_path = p.relative_to(patched_wheel_dir)
175175
out.add_file(str(rel_path), p)
176176

177-
logging.debug(f"Writing RECORD file")
177+
logging.debug("Writing RECORD file")
178178
got_record = out.add_recordfile()
179179

180180
if got_record == record_contents:

0 commit comments

Comments
 (0)