Configure Flake8 #74

Closed
opened 4 months ago by lino · 4 comments
lino commented 4 months ago
Owner
https://github.com/DmytroLitvinov/awesome-flake8-extensions
lino added the
maintenance
label 4 months ago
lino added this to the Maintenance project 4 months ago
overflw added this to the Puplication Phase-1 milestone 3 months ago
Poster
Owner
These plugins might be interesting https://github.com/Takishima/flake8-secure-coding-standard https://github.com/dlint-py/dlint https://github.com/PyCQA/flake8-bugbear https://github.com/pycqa/flake8-docstrings https://github.com/JBKahn/flake8-print https://github.com/Melevir/flake8-functions-names https://github.com/PyCQA/pep8-naming https://github.com/nhoad/flake8-unused-arguments https://github.com/orsinium-labs/flake8-warnings https://github.com/python-formate/flake8-encodings https://github.com/orsinium-labs/flake8-todos https://github.com/rocioar/flake8-django
Poster
Owner
> These plugins might be interesting > > https://github.com/Takishima/flake8-secure-coding-standard > https://github.com/dlint-py/dlint > https://github.com/PyCQA/flake8-bugbear > https://github.com/pycqa/flake8-docstrings > https://github.com/JBKahn/flake8-print > https://github.com/Melevir/flake8-functions-names > https://github.com/PyCQA/pep8-naming > https://github.com/nhoad/flake8-unused-arguments > https://github.com/orsinium-labs/flake8-warnings > https://github.com/python-formate/flake8-encodings > https://github.com/orsinium-labs/flake8-todos > https://github.com/rocioar/flake8-django Reduced it to flake8-django and flake8-docstring. Othe plugins might be added in the future.
Poster
Owner

Also added black to do automatic fomrating for python files. And djlint for html files. The wiki page Development setup was updated with new instructions on how to integrate them into vscode.

HTML formatting (workflow) is not perfect. But couldnt find a better solution.

Also added `black` to do automatic fomrating for python files. And `djlint` for html files. The wiki page `Development setup` was updated with new instructions on how to integrate them into vscode. HTML formatting (workflow) is not perfect. But couldnt find a better solution.
lino added reference #74-configure-flake8 2 months ago
Poster
Owner

Html reformating is breaking the syntax of alpine/htmx. 😞

We should ignore the following attributes when formating html:

x-data
x-init
x-show
x-bind
x-on
x-text
x-html
x-model
x-modelable
x-for
x-transition
x-effect
x-ignore
x-ref
x-cloak
x-teleport
x-if
x-id
@click
hx-boost
hx-get
hx-post
hx-push-url
hx-select
hx-select-oob
hx-swap
hx-swap-oob
hx-target
hx-trigger
hx-vals
hx-confirm
hx-delete
hx-disable
hx-disinherit
hx-encoding
hx-ext
hx-headers
hx-history-elt
hx-include
hx-indicator
hx-params
hx-patch
hx-preserve
hx-prompt
hx-put
hx-replace-url
hx-request
hx-sse
hx-sync
hx-vars
hx-ws
htmx-added
htmx-indicator
htmx-request
htmx-settling
htmx-swapping

In djlint it is not possible to ignore attributes. I will take a look at djhtml and curlylint

Html reformating is breaking the syntax of alpine/htmx. 😞 We should ignore the following attributes when formating html: ``` x-data x-init x-show x-bind x-on x-text x-html x-model x-modelable x-for x-transition x-effect x-ignore x-ref x-cloak x-teleport x-if x-id @click hx-boost hx-get hx-post hx-push-url hx-select hx-select-oob hx-swap hx-swap-oob hx-target hx-trigger hx-vals hx-confirm hx-delete hx-disable hx-disinherit hx-encoding hx-ext hx-headers hx-history-elt hx-include hx-indicator hx-params hx-patch hx-preserve hx-prompt hx-put hx-replace-url hx-request hx-sse hx-sync hx-vars hx-ws htmx-added htmx-indicator htmx-request htmx-settling htmx-swapping ``` In djlint it is not possible to ignore attributes. I will take a look at [djhtml](https://github.com/rtts/djhtml) and [curlylint](https://github.com/thibaudcolas/curlylint)
lino closed this issue 2 months ago
lino removed this from the Maintenance project 2 months ago
Sign in to join this conversation.
No project
No Assignees
1 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: radarini/radarini#74
Loading…
There is no content yet.