Team Ai
Apppublic

Arulkumar03/Wheat_HEAD_Detection_Counting_ComputerVision_Model

sourceHugging Facemitupdated 3y agoView on Hugging Face
0likes
linter.sh43 linesDownload Raw Back to dev
1#!/bin/bash -e2# Copyright (c) Facebook, Inc. and its affiliates.3 4# cd to detectron2 project root5cd "$(dirname "${BASH_SOURCE[0]}")/.."6 7{8  black --version | grep -E "22\." > /dev/null9} || {10  echo "Linter requires 'black==22.*' !"11  exit 112}13 14ISORT_VERSION=$(isort --version-number)15if [[ "$ISORT_VERSION" != 4.3* ]]; then16  echo "Linter requires isort==4.3.21 !"17  exit 118fi19 20set -v21 22echo "Running isort ..."23isort -y -sp . --atomic24 25echo "Running black ..."26black -l 100 .27 28echo "Running flake8 ..."29if [ -x "$(command -v flake8)" ]; then30  flake8 .31else32  python3 -m flake8 .33fi34 35# echo "Running mypy ..."36# Pytorch does not have enough type annotations37# mypy detectron2/solver detectron2/structures detectron2/config38 39echo "Running clang-format ..."40find . -regex ".*\.\(cpp\|c\|cc\|cu\|cxx\|h\|hh\|hpp\|hxx\|tcc\|mm\|m\)" -print0 | xargs -0 clang-format -i41 42command -v arc > /dev/null && arc lint43