facebookresearch / facebookresearch/detectron2

"dev/linter.sh": add python compatible command for "isort" and "black"

Open
#1,828 4 comments 0 reactions 0 assignees View on GitHub
contributions welcome
Dominant language
Python
Stars
34.7k
Forks
7.9k
PR merge metrics
No merged PRs in 30d

Description

https://github.com/facebookresearch/detectron2/blob/b03bbd7df056340c69fb4164c90088cf00835e2d/dev/linter.sh#L21-L23

https://github.com/facebookresearch/detectron2/blob/b03bbd7df056340c69fb4164c90088cf00835e2d/dev/linter.sh#L24-L25

We can add an if-else statement in the above code-blocks to run `isort` and `black` with python as `python -m isort -y -sp . --atomic ` and `python -m black -l 100 .` respectively. This is the same as done with `flake8` (shown below).

https://github.com/facebookresearch/detectron2/blob/b03bbd7df056340c69fb4164c90088cf00835e2d/dev/linter.sh#L27-L32

If this change is valid, I would open a PR for that. Thanks!

Contributor guide

Open the contributing guide

Research direction

Open dev/linter.sh and inspect the isort and black command blocks at the linked lines, comparing them with the flake8 block below. Verify the Python module forms for both tools and confirm that the linter script runs them successfully; done means Python-compatible commands are available for isort and black.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, shell
Domain
tooling
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.