Add regular expression example for per-file-ignores (#6573)

## Summary
Hi! This is my first PR to `ruff` and thanks for this amazing project.
While I am working on my project, I need to set different rules for my
`test/` folder and the main `src` package.

It's not immediately obvious that the
[`tool.ruff.per-file-ignores`](https://beta.ruff.rs/docs/settings/#per-file-ignores)
support regular expression. It is useful to set rules on directory
level. The PR add a simple example to make it clear this support regex.
This commit is contained in:
Nok Lam Chan 2023-08-14 23:02:40 +01:00 committed by GitHub
parent ebda5fcd99
commit 9a0d2f5afd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -77,6 +77,7 @@ unfixable = ["B"]
[tool.ruff.per-file-ignores]
"__init__.py" = ["E402"]
"path/to/file.py" = ["E402"]
"**/{tests,docs,tools}/*" = ["E402"]
```
Plugin configurations should be expressed as subsections, e.g.: