Skip to content

Commit

Permalink
Add a new pre-commit-hook to automatically add a copyright (#166)
Browse files Browse the repository at this point in the history
* Add a new pre-commit-hook to automatically add copyright

* Add a new pre-commit-hook to automatically add copyright

* append 'demo' and 'tools' directories to .pre-commit-config.yaml
  • Loading branch information
zhouzaida authored Feb 23, 2022
1 parent 2c25eff commit f0c110e
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,9 @@ repos:
hooks:
- id: docformatter
args: ["--in-place", "--wrap-descriptions", "79"]

- repo: https://github.com/open-mmlab/pre-commit-hooks
rev: v0.2.0
hooks:
- id: check-copyright
args: ["csrc", "mmdeploy", "tests", "demo", "tools"]
1 change: 1 addition & 0 deletions demo/demo_rewrite.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import asyncio
import os
import shutil
Expand Down
1 change: 1 addition & 0 deletions mmdeploy/codebase/mmdet/core/ops/detection_output.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import torch


Expand Down
1 change: 1 addition & 0 deletions mmdeploy/codebase/mmdet/core/ops/prior_box.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import torch


Expand Down
1 change: 1 addition & 0 deletions mmdeploy/codebase/mmdet/models/backbones.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import torch

from mmdeploy.core import FUNCTION_REWRITER
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import torch
from mmdet.core.bbox.coder import (DeltaXYWHBBoxCoder, DistancePointBBoxCoder,
TBLRBBoxCoder)
Expand Down
1 change: 1 addition & 0 deletions mmdeploy/codebase/mmdet/models/necks.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import torch

from mmdeploy.core import FUNCTION_REWRITER
Expand Down
1 change: 1 addition & 0 deletions tests/test_apis/test_onnx2ncnn.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import os.path as osp
import tempfile

Expand Down
1 change: 1 addition & 0 deletions tools/onnx2ncnn.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import argparse
import logging

Expand Down

0 comments on commit f0c110e

Please sign in to comment.