Skip to content

Commit e5cd755

Browse files
authored
[Enhancement] Revise pre-commit-hooks (open-mmlab#1315)
1 parent 8cf333c commit e5cd755

File tree

23 files changed

+28
-0
lines changed

23 files changed

+28
-0
lines changed

.pre-commit-config.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,9 @@ repos:
4949
language: python
5050
files: ^configs/.*\.md$
5151
require_serial: true
52+
- repo: https://github.com/open-mmlab/pre-commit-hooks
53+
rev: v0.2.0 # Use the rev to fix revision
54+
hooks:
55+
- id: check-algo-readme
56+
- id: check-copyright
57+
args: ["mmseg", "tools", "tests", "demo"] # the dir_to_check with expected directory to check

demo/video_demo.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# Copyright (c) OpenMMLab. All rights reserved.
12
from argparse import ArgumentParser
23

34
import cv2

mmseg/datasets/coco_stuff.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# Copyright (c) OpenMMLab. All rights reserved.
12
from .builder import DATASETS
23
from .custom import CustomDataset
34

mmseg/datasets/dark_zurich.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# Copyright (c) OpenMMLab. All rights reserved.
12
from .builder import DATASETS
23
from .cityscapes import CityscapesDataset
34

mmseg/datasets/isaid.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# Copyright (c) OpenMMLab. All rights reserved.
12
import os.path as osp
23

34
import mmcv

mmseg/datasets/night_driving.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# Copyright (c) OpenMMLab. All rights reserved.
12
from .builder import DATASETS
23
from .cityscapes import CityscapesDataset
34

mmseg/models/backbones/icnet.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# Copyright (c) OpenMMLab. All rights reserved.
12
import torch
23
import torch.nn as nn
34
from mmcv.cnn import ConvModule

mmseg/models/backbones/twins.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# Copyright (c) OpenMMLab. All rights reserved.
12
import math
23
import warnings
34

mmseg/models/decode_heads/dpt_head.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# Copyright (c) OpenMMLab. All rights reserved.
12
import math
23

34
import torch

mmseg/models/decode_heads/isa_head.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# Copyright (c) OpenMMLab. All rights reserved.
12
import math
23

34
import torch

0 commit comments

Comments
 (0)