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>
This commit is contained in:
Michael Lynch
2023-09-25 07:52:50 -04:00
committed by GitHub
parent 85bebeb2a2
commit c4b2a8beec
4 changed files with 11 additions and 8 deletions

View File

@@ -11,11 +11,6 @@ jobs=0
# active Python interpreter and may run arbitrary code.
unsafe-load-any-extension=no
# Enforce consistent string quoting rules with the pylint-quotes plugin.
string-quote=single
triple-quote=double
docstring-quote=double
[MESSAGES CONTROL]
# Disable the message, report, category or checker with the given id(s). You
@@ -115,7 +110,7 @@ no-docstring-rgx=^test_
docstring-min-length=60
[STRING]
check-quote-consistency=yes
check-quote-consistency=no
[ELIF]

View File

@@ -3,6 +3,7 @@ src = ["app"]
select = [
"F", # Enable pyflakes rules.
"I", # Enable isort rules.
"Q", # Enable flake8-quotes rules.
]
ignore = []
@@ -15,6 +16,15 @@ exclude = [
# Assume Python 3.9
target-version = "py39"
[flake8-quotes]
# Use consistent quotes regardless of whether it allows us to minimize escape
# sequences.
avoid-escape = false
docstring-quotes = "double"
inline-quotes = "single"
multiline-quotes = "double"
[isort]
force-single-line = true
force-to-top = ["log"]

View File

@@ -49,5 +49,4 @@ ruff check \
# Check for other style violations.
PYTHONPATH="${SOURCE_DIR}" \
pylint \
--load-plugins pylint_quotes \
"${SOURCE_DIR}" "${ADDITIONAL_PY_SCRIPTS[@]}"

View File

@@ -1,6 +1,5 @@
coverage==7.2.7
pylint==2.14.2
pylint-quotes==0.2.3
ruff==0.0.290
sqlfluff==1.3.2
yapf==0.40.1