Skip to content

Commit

Permalink
[Feature] Switch to openmmlab pre-commit-hook for copyright check (op…
Browse files Browse the repository at this point in the history
…en-mmlab#1214)

* switch to open-mmlab/pre-commit-hooks

* deprecate .dev_scripts/github/update_copyright.py
  • Loading branch information
ly015 committed Mar 7, 2022
1 parent 4b6064b commit da20420
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 110 deletions.
100 changes: 0 additions & 100 deletions .dev_scripts/github/update_copyright.py

This file was deleted.

12 changes: 5 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,8 @@ repos:
language: python
files: ^configs/.*\.md$
require_serial: true
- id: update-copyright
name: update-copyright
description: Add OpenMMLab copyright header to files
entry: .dev_scripts/github/update_copyright.py
language: python
files: ^(demo|docs|mmpose|tests|tools|\.dev_scripts)/.*\.(py|c|cpp|cu|sh)$
exclude: ^demo/mm(detection|tracking)_cfg/.*$
- repo: https://github.com/open-mmlab/pre-commit-hooks
rev: v0.2.0
hooks:
- id: check-copyright
args: ["mmpose", "tests", "demo", "tools", "--excludes", "demo/mmdetection_cfg", "demo/mmtracking_cfg"]
3 changes: 2 additions & 1 deletion mmpose/models/backbones/v2v_net.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# ------------------------------------------------------------------------------
# Copyright and License Information
# Adapted from
# https://github.com/microsoft/voxelpose-pytorch/blob/main/lib/models/v2v_net.py
# Original licence: MIT License.
# Original Licence: MIT License
# ------------------------------------------------------------------------------

import torch.nn as nn
Expand Down
4 changes: 2 additions & 2 deletions mmpose/models/heads/voxelpose_head.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# ------------------------------------------------------------------------------
# Adapted from
# Copyright and License Information
# https://github.com/microsoft/voxelpose-pytorch/blob/main/lib/models
# Original licence: MIT License.
# Original Licence: MIT License
# ------------------------------------------------------------------------------

import torch
Expand Down

0 comments on commit da20420

Please sign in to comment.