Company logo
  • Empleos
  • Bootcamp
  • Acerca de nosotros
  • Para profesionales
    • Inicio
    • Empleos
    • Cursos y retos
    • Preguntas
    • Profesores
    • Bootcamp
  • Para empresas
    • Inicio
    • Nuestro proceso
    • Planes
    • Pruebas
    • Nómina
    • Blog
    • Comercial
    • Calculadora

0

258
Vistas
Linting error on BitBucket: TypeError: 'LinterStats' object is not subscriptable

I am using BitBucket pipelines to perform linting checks with pylint. It was working fine a few hours ago. I have been facing the following error even though the final score is well past the minimum criteria (8.0):

Your code has been rated at 9.43/10

Traceback (most recent call last):
  File "/usr/local/bin/pylint-fail-under", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.6/dist-packages/pylint_fail_under/__main__.py", line 42, in main
    score = results.linter.stats["global_note"]
TypeError: 'LinterStats' object is not subscriptable
9 months ago · Santiago Trujillo
2 Respuestas
Responde la pregunta

0

Do not use pylint-fail-under, pylint has a fail-under option since pylint 2.5.0, and it's maintener will not update this package for newer pylint.

Change pylint-fail-under --fail_under 8.0 to pylint --fail-under=8.0 and remove the dependency to pylint-fail-under.

See also https://github.com/PyCQA/pylint/issues/5405, and: https://github.com/TNThieding/pylint-fail-under/issues/8#issuecomment-626369567

9 months ago · Santiago Trujillo Denunciar

0

Another option is to downgrade, if that's acceptable:

pip install pylint==2.11.1
9 months ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos