Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spaces are ignored (E225 and E226) in f-string #775

Open
apbard opened this issue Jan 8, 2025 · 0 comments
Open

Spaces are ignored (E225 and E226) in f-string #775

apbard opened this issue Jan 8, 2025 · 0 comments

Comments

@apbard
Copy link

apbard commented Jan 8, 2025

It seems autopep8 is ignoring spaces around operator (E226 and E225) if in format string. The diff for the following snippet is empty.


Python Code

examples = []
for i, e in enumerate(examples):
    print(f"#### Question {i+1} ####")
    print(f"#### Question {i>1} ####")

Command Line and Configuration

[pycodestyle]
max-line-length = 120
statistics = True
show-pep8 = True
show-source = True
ignore = W391, W605, W503

[pep8]
max-line-length = 120
show-pep8 = true
statistics = true
ignore = W391, W503

[flake8]
max-line-length = 120
ignore = E203, E402, W503, W391
exclude = venv
extend-select = B901, C401, C408, C409

Command Line

$ autopep8 experiments/test.py -d -v --select=E,W --ignore-local-config 

Your Environment

  • Python version:
  • autopep8 version: autopep8 2.3.1 (pycodestyle: 2.12.1)
  • Platform: wsl (ubuntu)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant