mirror of
https://github.com/HumanAIGC-Engineering/gradio-webrtc.git
synced 2026-02-05 18:09:23 +08:00
Introduce automatic linting with Github workflows (#251)
* Add linters * use other setup-python version * Use string instead * Add more linting * Fix tests * minor changes --------- Co-authored-by: Marcus Valtonen Örnhag <marcus.valtonen.ornhag@ericsson.com>
This commit is contained in:
committed by
GitHub
parent
c93176d83a
commit
948a479601
@@ -83,5 +83,38 @@ artifacts = ["/backend/fastrtc/templates", "*.pyi"]
|
||||
packages = ["/backend/fastrtc"]
|
||||
|
||||
[tool.ruff]
|
||||
src = ["demo", "backend/fastrtc"]
|
||||
target-version = "py310"
|
||||
extend-exclude = ["demo/phonic_chat", "demo/nextjs_voice_chat"]
|
||||
|
||||
[tool.ruff.format]
|
||||
exclude = ["*.pyi"]
|
||||
quote-style = "double"
|
||||
indent-style = "space"
|
||||
skip-magic-trailing-comma = false
|
||||
line-ending = "auto"
|
||||
|
||||
[tool.ruff.lint]
|
||||
select = [
|
||||
"E",
|
||||
"F",
|
||||
"W",
|
||||
"Q",
|
||||
"I",
|
||||
]
|
||||
|
||||
# These can be turned on when the framework is more mature (Too many errors right now)
|
||||
exclude = [
|
||||
"D",
|
||||
"UP"
|
||||
]
|
||||
|
||||
# Avoid enforcing line-length violations (`E501`)
|
||||
ignore = ["E501"]
|
||||
|
||||
[tool.ruff.lint.pydocstyle]
|
||||
convention = "google"
|
||||
|
||||
[tool.ruff.lint.per-file-ignores]
|
||||
"__init__.py" = ["E402"]
|
||||
"demo/talk_to_smolagents/app.py" = ["W291"]
|
||||
|
||||
Reference in New Issue
Block a user