Unverified Commit 6e9ce183 authored by Zaida Zhou's avatar Zaida Zhou Committed by GitHub
Browse files

Add copyright pre-commit-hook (#1742)

* first commit

* Add copyright pre-commit-hook
parent 0a8e67f7
......@@ -40,6 +40,12 @@ repos:
hooks:
- id: docformatter
args: ["--in-place", "--wrap-descriptions", "79"]
- repo: https://github.com/open-mmlab/pre-commit-hooks
rev: v0.2.0 # Use the ref you want to point at
hooks:
- id: check-copyright
args: ["mmcv", "tests", "--excludes", "mmcv/ops"]
# - repo: local
# hooks:
# - id: clang-format
......
# Copyright (c) OpenMMLab. All rights reserved.
import inspect
import platform
......
# Copyright (c) OpenMMLab. All rights reserved.
import torch
import mmcv
......
# Copyright (c) OpenMMLab. All rights reserved.
from .builder import RUNNER_BUILDERS, RUNNERS
......
# Copyright (c) OpenMMLab. All rights reserved.
import numpy as np
import onnx
......
# Copyright (c) OpenMMLab. All rights reserved.
# The 1.6 release of PyTorch switched torch.save to use a new zipfile-based
# file format. It will cause RuntimeError when a checkpoint was saved in
# torch >= 1.6.0 but loaded in torch < 1.7.0.
......
# Copyright (c) OpenMMLab. All rights reserved.
import warnings
import torch
......
# Copyright (c) OpenMMLab. All rights reserved.
item1 = [1, 2]
item2 = {'a': 0}
item3 = True
......
# Copyright (c) OpenMMLab. All rights reserved.
item1 = [1, 2]
item2 = {'a': 0}
item3 = True
......
# Copyright (c) OpenMMLab. All rights reserved.
item1 = [1, 2]
item2 = {'a': 0}
item3 = True
......
# Copyright (c) OpenMMLab. All rights reserved.
from mmcv import Config # isort:skip
cfg = Config.fromfile('./tests/data/config/a.py')
......
# Copyright (c) OpenMMLab. All rights reserved.
_base_ = './base.py'
item1 = [2, 3]
item2 = {'a': 1}
......
# Copyright (c) OpenMMLab. All rights reserved.
_base_ = './base.py'
item1 = {'a': 0, '_delete_': True}
item2 = {'b': 0}
# Copyright (c) OpenMMLab. All rights reserved.
_base_ = './expected.py'
_deprecation_ = dict(
......
# Copyright (c) OpenMMLab. All rights reserved.
_base_ = './deprecated.py'
\ No newline at end of file
# Copyright (c) OpenMMLab. All rights reserved.
_base_ = './base.py'
item3 = {'a': 1}
# Copyright (c) OpenMMLab. All rights reserved.
item1 = 'expected'
# Copyright (c) OpenMMLab. All rights reserved.
_base_ = './d.py'
item4 = 'test_recursive_bases'
# Copyright (c) OpenMMLab. All rights reserved.
filename = 'reserved.py'
# Copyright (c) OpenMMLab. All rights reserved.
item1 = '{{fileBasename}}'
item2 = '{{ fileDirname}}'
item3 = 'abc_{{ fileBasenameNoExtension }}'
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment