Skip to content

Commit c4b2a8b

Browse files
authored
Replace pylint-quotes with ruff (#1635)
ruff can replicate the same functionality as pylint-quotes but with faster performance and fewer extra tools, so this replaces pylint-quotes with ruff. <a data-ca-tag href="https://codeapprove.com/pr/tiny-pilot/tinypilot/1635"><img src="https://codeapprove.com/external/github-tag-allbg.png" alt="Review on CodeApprove" /></a>
1 parent 85bebeb commit c4b2a8b

File tree

4 files changed

+11
-8
lines changed

4 files changed

+11
-8
lines changed

.pylintrc

+1-6
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,6 @@ jobs=0
1111
# active Python interpreter and may run arbitrary code.
1212
unsafe-load-any-extension=no
1313

14-
# Enforce consistent string quoting rules with the pylint-quotes plugin.
15-
string-quote=single
16-
triple-quote=double
17-
docstring-quote=double
18-
1914
[MESSAGES CONTROL]
2015

2116
# Disable the message, report, category or checker with the given id(s). You
@@ -115,7 +110,7 @@ no-docstring-rgx=^test_
115110
docstring-min-length=60
116111

117112
[STRING]
118-
check-quote-consistency=yes
113+
check-quote-consistency=no
119114

120115
[ELIF]
121116

.ruff.toml

+10
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ src = ["app"]
33
select = [
44
"F", # Enable pyflakes rules.
55
"I", # Enable isort rules.
6+
"Q", # Enable flake8-quotes rules.
67
]
78
ignore = []
89

@@ -15,6 +16,15 @@ exclude = [
1516
# Assume Python 3.9
1617
target-version = "py39"
1718

19+
[flake8-quotes]
20+
# Use consistent quotes regardless of whether it allows us to minimize escape
21+
# sequences.
22+
avoid-escape = false
23+
24+
docstring-quotes = "double"
25+
inline-quotes = "single"
26+
multiline-quotes = "double"
27+
1828
[isort]
1929
force-single-line = true
2030
force-to-top = ["log"]

dev-scripts/build-python

-1
Original file line numberDiff line numberDiff line change
@@ -49,5 +49,4 @@ ruff check \
4949
# Check for other style violations.
5050
PYTHONPATH="${SOURCE_DIR}" \
5151
pylint \
52-
--load-plugins pylint_quotes \
5352
"${SOURCE_DIR}" "${ADDITIONAL_PY_SCRIPTS[@]}"

dev_requirements.txt

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
coverage==7.2.7
22
pylint==2.14.2
3-
pylint-quotes==0.2.3
43
ruff==0.0.290
54
sqlfluff==1.3.2
65
yapf==0.40.1

0 commit comments

Comments
 (0)