Skip to content

Commit

Permalink
[lint] Add B028 to flake8 ignore list (ray-project#48465)
Browse files Browse the repository at this point in the history
I've recently started seeing lint errors like this locally:
```
python/ray/serve/handle.py:788:13: B028 No explicit stacklevel argument found. The warn method from the warnings module uses a stacklevel of 1 by default. This
 will only show a stack trace for the line on which the warn method is called. It is therefore recommended to use a stacklevel of 2 or greater to provide more
information to the user.
```

We use `warnings` for deprecation messages and don't want to include
stack traces in them, so ignoring this lint error.

Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com>
  • Loading branch information
edoakes authored Oct 31, 2024
1 parent d66b9e2 commit 04eb01b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ exclude =
max-line-length = 88
inline-quotes = "
ignore =
B028
C408
C417
E121
Expand Down

0 comments on commit 04eb01b

Please sign in to comment.