Skip to content

Commit 4aa5e47

Browse files
Add notes on when to add ignores to warnings (#8987)
* Add notes on when to add ignores to warnings * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 71372c1 commit 4aa5e47

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

pyproject.toml

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -288,18 +288,22 @@ addopts = ["--strict-config", "--strict-markers"]
288288
# - Converts any warning from xarray into an error
289289
# - Allows some warnings ("default") which the test suite currently raises,
290290
# since it wasn't practical to fix them all before merging this config. The
291-
# arnings are still listed in CI (since it uses `default`, not `ignore`).
291+
# warnings are reported in CI (since it uses `default`, not `ignore`).
292292
#
293-
# We can remove these rules allowing warnings; a valued contribution is removing
294-
# a line, seeing what breaks, and then fixing the library code or tests so that
295-
# it doesn't raise warnings.
293+
# Over time, we can remove these rules allowing warnings. A valued contribution
294+
# is removing a line, seeing what breaks, and then fixing the library code or
295+
# tests so that it doesn't raise warnings.
296296
#
297-
# While we only raise an error on warnings from within xarray, if dependency
298-
# raises a warning with a stacklevel such that it's interpreted to be raised
299-
# from xarray, please feel free to add a rule switching it to `default` here.
300-
#
301-
# If these settings get in the way of making progress, it's also acceptable to
302-
# temporarily add additional ignores.
297+
# There are some instance where we'll want to add to these rules:
298+
# - While we only raise errors on warnings from within xarray, a dependency can
299+
# raise a warning with a stacklevel such that it's interpreted to be raised
300+
# from xarray and this will mistakenly convert it to an error. If that
301+
# happens, please feel free to add a rule switching it to `default` here, and
302+
# disabling the error.
303+
# - If these settings get in the way of making progress, it's also acceptable to
304+
# temporarily add additional `default` rules.
305+
# - But we should only add `ignore` rules if we're confident that we'll never
306+
# need to address a warning.
303307

304308
filterwarnings = [
305309
"error:::xarray.*",

0 commit comments

Comments
 (0)