Ask coding questions

← Back to all posts
pycodestyle/flake8 feedback in Python 3
etowncodes (3)

New to trying pycodestyle or flake8 package and want to get my students to utilize it to style code properly. Working in Python 3.

How do you get the "feedback" to output in the terminal? In other words, how do I get this to show? E231 missing whitespace after ','

Zavexeon (1016)

Could you link your code or provide the snippet you are referring to, please?

It'll make it easier for us to help you.

etowncodes (3)

@Zavexeon Thanks for checking in on this! I import flake8 from packages in a repl. Let's suppose the code is this:

import flake8

X = "Zach"


I would believe that two issues--the capitalization of X and the lack of whitespace after the comma in the print statement--should return a style "warning". I don't see anything when I do.*

*note--importing pycodestyle didn't seem to work at all.

Zavexeon (1016)

@etowncodes Oh, I understand what you mean. The reason this may not be working is with some limitations with The compiler is what sees errors and reports them, and we regular users can't actually modify the compiler or install anything on their servers.

Packages like discordpy and stuff like that are hosted externally from replit, which is why they work. What you seem to be trying is to install something internally, which replit does not support, to my knowledge.

etowncodes (3)

@Zavexeon Thanks so much. Hard to know why sometimes, especially when it makes it look like you are importing it. I appreciate your time!