[Enhancement] Revise pre-commit-hooks (#1315)

pull/1027/merge
Miao Zheng 2022-02-23 23:44:27 +08:00 committed by GitHub
parent 8cf333c901
commit e5cd755481
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
23 changed files with 28 additions and 0 deletions

View File

@ -49,3 +49,9 @@ repos:
language: python
files: ^configs/.*\.md$
require_serial: true
- repo: https://github.com/open-mmlab/pre-commit-hooks
rev: v0.2.0 # Use the rev to fix revision
hooks:
- id: check-algo-readme
- id: check-copyright
args: ["mmseg", "tools", "tests", "demo"] # the dir_to_check with expected directory to check

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
from argparse import ArgumentParser
import cv2

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
from .builder import DATASETS
from .custom import CustomDataset

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
from .builder import DATASETS
from .cityscapes import CityscapesDataset

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import os.path as osp
import mmcv

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
from .builder import DATASETS
from .cityscapes import CityscapesDataset

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import torch
import torch.nn as nn
from mmcv.cnn import ConvModule

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import math
import warnings

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import math
import torch

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import math
import torch

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import torch.nn.functional as F
from mmcv.cnn import ConvModule
from mmcv.runner import BaseModule

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
from .embed import PatchEmbed
from .inverted_residual import InvertedResidual, InvertedResidualV3
from .make_divisible import make_divisible

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import shutil
from unittest.mock import MagicMock

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import pytest
import torch

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import pytest
import torch

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import pytest
import torch

View File

@ -0,0 +1 @@
# Copyright (c) OpenMMLab. All rights reserved.

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import argparse
import os
import warnings

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import argparse
import os.path as osp
import shutil

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import argparse
import os.path as osp
import shutil

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import argparse
import glob
import os

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import argparse
import os.path as osp

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
from argparse import ArgumentParser
from io import BytesIO