pants: lint fails after fix & fmt didn't changed anything

Describe the bug the title says it

Pants version current main d05c4370b9cae86763f7b9826c5a16ac772ebb99

OS Linux pop-os 6.0.2-76060002-generic #202210150739~1666289067~22.04~fe0ce53 SMP PREEMPT_DYNAMIC Thu O x86_64 x86_64 x86_64 GNU/Linux

Additional info this is the file that didn’t pass the lint but it passes the fix & fmt without any changes

import tuhls.dashboard.settings as dashboard_settings
import utils.config as cfg
from django.conf import settings

c = cfg.ConfigDict()
apps = cfg.ConfigList(
    "django.contrib.admin",
    "django.contrib.auth",
    "django.contrib.contenttypes",
    "django.contrib.sessions",
    "tuhls.dashboard",
    "tuhls.dashboard.tests.dashboard_test",
    "tuhls.icons",
)
c = cfg.base_settings(c, "dashboardtest", apps, True)
c = cfg.template_settings(c)
c = cfg.db_sqlite_test_settings(c)
c = dashboard_settings.base(c)
c.ROOT_URLCONF = "tuhls.dashboard.urls"
c.AUTH_USER_MODEL = "dashboard_test.TestUser"
c.LOGIN_URL = "/login/"
c.LOGOUT_REDIRECT_URL = "/"
settings.configure(**c)

as you can see, isort removed the double blank line after the imports (i think that’s wrong) but if i add the double blank line and run only lint it fails anyway it could be a isort bug. i have ~1k python source files and it happens only in this file

is there an easy way to change the python tool versions?

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 30 (24 by maintainers)

Commits related to this issue

Most upvoted comments

Thanks, this is golden. I can reproduce, so will dive deeper.

Are you using both black and isort, or only isort?