- DamirGuest
Настроить flake8 под lms
Fri Feb 16, 2024 12:09 pm
Установите плагины
Список известных тутНастройте flake
Создайте файл ".flake8" на самом верхнем уровне:- Code:
[flake8]
exclude = .git,__pycache__,.venv,venv,*/migrations/
import-order-style = google
application-import-names = about, catalog, core, download, feedback, homepage, lyceum, users
import-order-style
По умолчанию в проверке используется стиль cryptography, lms требует стиль google
Вот тут другие стили pypi.org/project/flake8-import-order/
application-import-names
Без этого возникает ошибка: I201 Missing newline between import groups. 'from lyceum import settings' is identified as Application and 'from django.urls import include, path' is identified as Third Party.
Так как flake не знает, какие модули не сторонние
Для двойных кавычек добавьте:
- Code:
literal-inline-quotes = double
inline-quotes = double
Permissions in this forum:
You cannot reply to topics in this forum
|
|