Prevent lint warnings in the editor

Hi!

Here is the warning: https://kdrive.infomaniak.com/app/share/1560338/3be39791-37d4-4bfa-b2fd-585c4b0ceb21

Useless (PEP) warnings are annoying because they indicate that there is an errors somewhere but THAT IS NOT AN ERROR !!!
The code will work as expected.

And please, let ME (!) decide the coding style and not someone who has sometimes very low understanding and experience in coding. (Experience starts in coding after the first 20 languages used and approx. 200 000 lines of code written. That is (!) experience. Everything else is just the prerequisites to have some real experience.)

It is good that Python creators create PEP guidelines. But those are guidelines and not POLICIES!

The policy is this: create code fast that will work correctly.
It overrides all and every guidelines no matter who told it and where because a policy works.
It is TRUE ! It creates the expected results ALL THE TIME!

False warnings are nothing else but FALSE !

This post is derived from previous post

George

You can override this by creating a .ruff.toml file in the root directory of your project

You’ll need to do this in an editor locally and push it back to anvil with git

Here’s an example .ruff.toml i often use

src = ["client_code", "server_code"]

[lint]
select = ["E", "F", "I001"]

[lint.isort]
known-third-party = ["anvil"]

[lint.pycodestyle]
max-line-length = 100

you’d want to change the select to select fewer lint warnings.

See a related feature requests you can like

I’ll add a note that we should document this

3 Likes