Trying to change the Ruff default line length

3.5k views Asked by At

I was recently introduced to Ruff a python linter. I have an existing directory with lots of files. I thought to try it out and made a pyproject.toml file in the directory. I want to set the line-length high (150) to show less errors but the default (88) keeps appearing. I also tried the ignore option but that does not seem to work either. Do I need to type a command to initiate the use of the pyproject.toml?

code from pyproject.toml

[tool.ruff]
extend-select = ["C4", "NPY", "PD", "SIM", "TCH"]
ignore = ["E501"]
show-fixes = true
# target-version = "py310"

# change the default line length number or characters.
line-length = 150

Another option is to have the linter ignore line lengths.

0

There are 0 answers