Open pschwaller opened 6 months ago
I can't reproduce the issue, what is the version of ruff you are using?
Furthermore, you could consider moving this issue to ruff repo. If this is reproducible on latest ruff, I'd say its ambitious of ruff to expect to know every other tool that might work with noqa directive.
Reproduction steps:
bar = "bar"
foo = "asdf" + bar
Flynt correctly complains. For whatever reason, I want flynt to ignore this, so I change it to:
bar = "bar"
foo = "asdf" + bar # noqa: flynt
That quiets flynt.
ruff 0.4.8 complains with:
warning: Invalid
# noqadirective on engine\pjs_sandbox.py:175: expected a comma-separated list of codes (e.g.,
# noqa: F401, F841).
I'm not expecting ruff to know about the way flynt has chosen to overload the noqa directive. What I'm asking is whether there is an alternative method for flynt to turn itself off on a particular line -- one that doesn't overlap with the conventions used by other tools.
For example, for some messages mypy uses the standard noqa. But for others, I have to use # mypy: disable-error-code="xyz"
I found a reference in the github issues to using "# noqa: flynt" to tell flynt not to process a particular line.
When I use that with the latest ruff, I get: warning: Invalid
# noqa
directiveIs there an alternative that doesn't generate warnings?