autopep8 icon indicating copy to clipboard operation
autopep8 copied to clipboard

ignores #noqa comment that pydocstyle doesn't

Open dcbaker opened this issue 4 years ago • 0 comments

Python Code

def func(a: object, b: object) -> bool:
    return type(a) is type(b)  # noqa

Command Line and Configuration

pyproject.toml

[tool.autopep8]
max_line_length = 120
in-place = true
recursive = true
aggressive = 1

Command Line

$ pydocstyle test.py
# everything is fine, type comparison properly ignored
$ autopep8 test.py
# changes `type(a) is type(b)` to `isinstance(a, type(b))`

Your Environment

  • Python version: 3.6.13
  • autopep8 version: autopep8 1.5.4 (pycodestyle: 2.6.0)
  • Platform: windows, linux, macOSX, and other OS...: linux

dcbaker avatar Jun 03 '21 18:06 dcbaker