Python code intelligence highlights every line when using tabs instead of spaces

Problem description: Although this is not necessarily a bug, I couldn’t find a better category to put this under. I am someone who prefers to use tabs over spaces in my private Repls that I make for myself. However, the new Replit Code AI believes that useing tabs is inferior to spaces, and thus highlights EVERY SINGLE LINE because I am not using spaces. I tried asking the AI to stop, or to provide a way to disable this feature but nothing worked.
I loved using Replit because of how its Code Intelligence helped me find functions in public libraries that would suit my purpose, or autocomplete variables for me. But now, to avoid seeing an ungodly amount of lines, I have to completely turn it off. It’s extremely annoying and I really want a way to disable this feature of “Intelligence”.

Expected behavior: No lines.

Actual behavior: Lines.

Steps to reproduce: Set up a Python repl on a Chromebook with tab spacing enabled.

Bug appears at this link:

Browser: Chrome
OS: Chromebook OS (Don’t know the exact OS)
Device (Android, iOS, NA leave blank): Chromebook
Plan (Free, Hacker, Pro Plan): Free

Hello, this is actually a feature of the repl code intelligence, not any AI.
While you can completely disable code intelligence in settings, a better way is to specifically ignore that type of warning.

Open the pyproject.toml file. Find the variable ignore under the section [tool.ruff]. It a list. Add 'W191' to the list, don’t forget the quotes. This is the ‘rule’ that shows that warning.
For more rules and configuration, see Rules - Ruff.
Configuring code intelligence is a useful thing to know.


Oh this has been soooo helpful. THANK YOU

1 Like

you could also add to pyproject.toml

indent-style = "tab"

I couldn’t get that to work.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.