[Enhance] Add a new pre-commit-hook to automatically add a copyright. (#710)
parent
8374c05b0a
commit
1b5712a551
|
@ -40,6 +40,11 @@ repos:
|
||||||
hooks:
|
hooks:
|
||||||
- id: docformatter
|
- id: docformatter
|
||||||
args: ["--in-place", "--wrap-descriptions", "79"]
|
args: ["--in-place", "--wrap-descriptions", "79"]
|
||||||
|
- repo: https://github.com/open-mmlab/pre-commit-hooks
|
||||||
|
rev: v0.2.0
|
||||||
|
hooks:
|
||||||
|
- id: check-copyright
|
||||||
|
args: ["mmcls", "tests", "demo", "tools"]
|
||||||
# - repo: local
|
# - repo: local
|
||||||
# hooks:
|
# hooks:
|
||||||
# - id: clang-format
|
# - id: clang-format
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
# Copyright (c) OpenMMLab. All rights reserved.
|
||||||
import argparse
|
import argparse
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
# Copyright (c) OpenMMLab. All rights reserved.
|
||||||
import argparse
|
import argparse
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
# Copyright (c) OpenMMLab. All rights reserved.
|
||||||
import argparse
|
import argparse
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
# Copyright (c) OpenMMLab. All rights reserved.
|
||||||
import argparse
|
import argparse
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
# Copyright (c) OpenMMLab. All rights reserved.
|
||||||
from argparse import ArgumentParser
|
from argparse import ArgumentParser
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
# Copyright (c) OpenMMLab. All rights reserved.
|
||||||
import argparse
|
import argparse
|
||||||
import os.path as osp
|
import os.path as osp
|
||||||
import re
|
import re
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
# Copyright (c) OpenMMLab. All rights reserved.
|
||||||
import argparse
|
import argparse
|
||||||
import itertools
|
import itertools
|
||||||
import os
|
import os
|
||||||
|
|
Loading…
Reference in New Issue