OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

Enable ruff rules only on specific files

  • Thread starter Thread starter Frank Meulenaar
  • Start date Start date
F

Frank Meulenaar

Guest
I work on a large project and I'd slowly like to enfore pydocstyle using ruff. However, many files will fail on e.g. D103 "undocumented public function". I'd like to start with enforcing it on a few specific files, so I'd like to write something like

Code:
select = ["D"]

[tool.ruff.ignore-except-per-file] # this config does not exist
# ignore D103 but on all files, except the ones that pass
"properly_formatted_module1.py" = ["D103"]
"properly_formatted_module2.py" = ["D103"]

I don't think this is possible; the only way I see is to explicitly write down ALL of the file names in a [tool.ruff.extend-per-file-ignores]. There are a few hunderd of them so that's not really nice to do.
<p>I work on a large project and I'd slowly like to enfore pydocstyle using ruff. However, many files will fail on e.g. D103 "undocumented public function". I'd like to start with enforcing it on a few specific files, so I'd like to write something like</p>
<pre><code>select = ["D"]

[tool.ruff.ignore-except-per-file] # this config does not exist
# ignore D103 but on all files, except the ones that pass
"properly_formatted_module1.py" = ["D103"]
"properly_formatted_module2.py" = ["D103"]
</code></pre>
<p>I don't think this is possible; the only way I see is to explicitly write down ALL of the file names in a <code>[tool.ruff.extend-per-file-ignores]</code>. There are a few hunderd of them so that's not really nice to do.</p>
 

Latest posts

Online statistics

Members online
0
Guests online
2
Total visitors
2
Ads by Eonads
Top