question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Not compatible with Black

See original GitHub issue

According to official link, I am using the following pre-commit-config:

repos:
  - repo: https://github.com/PyCQA/isort
    rev: 5.10.1
    hooks:
      - id: isort
        args: ["--profile", "black", "--filter-files"]
  - repo: https://github.com/psf/black
    rev: 22.6.0
    hooks:
    -   id: black

However, for this file, isort’s output is

from ..builder import (DETECTORS, build_backbone, build_head, build_map_to_bev,
                       build_neck, build_segmentor, build_voxel_encoder,)

while Black’s output is:

from ..builder import (
    DETECTORS,
    build_backbone,
    build_head,
    build_map_to_bev,
    build_neck,
    build_segmentor,
    build_voxel_encoder,
)

Different output, so the pre-commit check would never pass.

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:3
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
zheyuanWangcommented, Dec 13, 2022

@zheyuanWang should be fixed in 5.11.0, can you check?

Yes it worked!

changing the version of isort solved conflicts.

repos:
  - repo: https://github.com/PyCQA/isort
    rev: 5.11.0
    hooks:
      - id: isort
        args: ["--profile", "black", "--filter-files"]
  - repo: https://github.com/psf/black
    rev: 22.6.0
    hooks:
    -   id: black
1reaction
staticdevcommented, Dec 12, 2022

@zheyuanWang should be fixed in 5.11.0, can you check?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using Black with other tools - Black 22.12.0 documentation
It is not uncommon to be using other tools alongside Black like linters and type checkers. Some of them need a bit of...
Read more >
How to make isort black compatible. Original Question: isort ...
Hi. I experience that black and isort undo eachothers changes when working on some of my files. I am using the following two...
Read more >
Being a Hipster Is Not Compatible with Being Black - VICE
Being a hipster essentially means you struggle to give your life meaning through the things you consume and the irony you employ.
Read more >
Raspberry Pi Case (Black) (Not Compatible with Pi 3 ...
Fully updated for Raspberry Pi 3; Two sets of LED ports to accomodate Pi 3 as well as Pi 2 & B+; Heat...
Read more >
Not compatible - GoPro Support
Hello, I am trying to initialize a Hero 11 black, but the system says that I need to install in my phone the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found