Skip to content

pycodestyle # noqa is selectively ignored #2175

Open
@clinssen

Description

@clinssen

pep8 was replaced by pycodestyle in #1132. Unfortunately, pycodestyle does not allow a # noqa inline comment to suppress certain errors; see https://github.com/PyCQA/pycodestyle/blob/master/docs/intro.rst. This is by design and unlikely to change any time soon.

This means that (some) existing lines containing # noqa need to be refactored, because the formatting errors on those lines are no longer being ignored. For a concrete example, see the matrix formatting in

[ 20.0, 120.0, 220.0, 320.0, 420.0], # noqa

There are several options here:

  • Switch from pycodestyle to flake8, which does not have this restriction
  • Replace the line-scope noqas with a file-scope noqa
  • Store the matrices in a textfile and use numpy.loadtxt()
  • (probably more...)

Metadata

Metadata

Assignees

Labels

I: No breaking changePreviously written code will work as before, no one should note anything changing (aside the fix)S: NormalHandle this with default priorityT: DiscussionStill searching for the right way to proceed / suggestions welcomestaleAutomatic marker for inactivity, please have another look here

Type

No type

Projects

Status

In progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions