MichaelKim0407 / flake8-use-fstring

MIT License
51 stars 7 forks source link

False positive FS003 #6

Closed MatthiasThul closed 4 years ago

MatthiasThul commented 4 years ago

The below gives a false positive FS003 error.

foo = re.compile(r'\(\w+Message\)":\s+({.*})}')
MichaelKim0407 commented 4 years ago

See readme:

Due to the potential for false positives, this check (FS003) is disabled by default.

MatthiasThul commented 4 years ago

See readme:

Due to the potential for false positives, this check (FS003) is disabled by default.

This is strange since I had test failures after updating from FS003 and didn't explicitly enable it.

MichaelKim0407 commented 4 years ago

Can you share your flake8 config?

MatthiasThul commented 4 years ago

Below is the config that led to the failures.

[flake8]
ignore = B008, E203, W503, W504
max-line-length = 130
max-complexity = 18
exclude =
    .git
    .idea
    .ipynb_checkpoints
    .pytype
    .tox
    build
    demos
    dist
    notebooks
    venv
    setup.py
    target
    tests
MichaelKim0407 commented 4 years ago

Updated readme with note; see flake8 documentation: --ignore vs --extend-ignore

MatthiasThul commented 4 years ago

Thanks - wasn't aware of this!