Fixing Formatting Briefly
00:00 First, I made a mistake at the end of the last lesson. On line 13, when declaring a variable, I didn’t put spaces around the equals sign and therefore my code no longer conforms to PEP 8 guidelines.
00:12
You can confirm that by going over to the terminal, running our formatter ruff. I’ll type ruff check name of the file, so quote_generator.py, and you see that returns an error message because it tells me there is a missing whitespace around the operator.
00:31
I can run the same previous command just with --fix at the end to automatically fix this. When I run that, ruff tells me it found one error and fixed it. If I go back to the code, now there are spaces around the equals sign so my code again conforms to PEP 8 guidelines.
Bartosz Zaczyński RP Team on June 20, 2026
@davemcampbell, good catch. It’s not a local issue. In current ruff (I checked on 0.15.18, right next to your 0.15.17), E225 is still a preview rule. Running ruff rule E225 spells it out:
This rule is in preview and is not stable. The
--previewflag is required for use.
So ruff deliberately won’t emit E225 from a plain ruff check, which is exactly why it only showed up once you added --preview. Several of the pycodestyle whitespace rules (the E2xx family) are still gated behind preview while their implementations are finalized.
If you’d rather not type the flag each time, you can turn preview on in your config instead:
# pyproject.toml
[tool.ruff]
preview = true
This is drift between the course and ruff’s current defaults, so I’ll flag it for the rest of the team to update the lesson (either adding --preview to the command or calling out the requirement). Thanks for the detailed report and for including the version number.
Become a Member to join the conversation.

davemcampbell on June 11, 2026
Maybe a local issue, maybe an version issue (v0.15.17). But when I ran the command
ruff check quote_generator.py, I didn’t receive the E225 error.I had to run the above command and use the
--previewflag to get that to generate.