Questions tagged [flake8]

Automatic syntax checker for Python, bundled with pycodestyle, pyflakes and mccabe.

Automatic syntax checker for Python programming language, bundled with pycodestyle, pyflakes, mccabe for easy installation and use.

410 questions
-2
votes
2 answers

PEP8 "No newline at end of file"

I'm trying to understand the error below from Flake8: no newline at end of fileFlake8(W292) This is my code below: if __name__ == "__main__": app.run( host=os.environ.get("IP", "0.0.0.0"), port=int(os.environ.get("PORT",…
Ryu
  • 1
  • 1
  • 6
-3
votes
1 answer

alternative to use eval python eval-used / W0123

d1 = { "a": "test" } cmd_dict = { "cmd1": "d1['a']", "cmd2 : "os.getcwd()" } value = eval(md_dict['cmd1]) print(value) Not i will get the value as test. I am getting pylint error W0123 becasue i am using…
SS L
  • 5
  • 2
-3
votes
1 answer

Can not pass flake8p test

I have Makefile and command inside it: .PHONY: lint lint: poetry run flake8p I get following error: There was a critical error during execution of Flake8: plugin code for `flake8-mock[flake8_mock]` does not match ^[A-Z]{1,3}[0-9]{0,3}$ make:…
-4
votes
2 answers

F841 local variable never used error while variable being used in another file

I have two files which roughly look like this. module1.py: GLOBAL_VAR = False def some_func(): if 1 == 1: GLOBAL_VAR = True folder_1/module2.py: from ..module1 import GLOBAL_VAR if 2 == 2: print(f"GLOBAL_VAR : {GLOBAL_VAR…
Maven
  • 14,587
  • 42
  • 113
  • 174
1 2 3
27
28