Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
MMCV
Commits
6e9ce183
Unverified
Commit
6e9ce183
authored
Feb 24, 2022
by
Zaida Zhou
Committed by
GitHub
Feb 24, 2022
Browse files
Add copyright pre-commit-hook (#1742)
* first commit * Add copyright pre-commit-hook
parent
0a8e67f7
Changes
119
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
25 additions
and
0 deletions
+25
-0
.pre-commit-config.yaml
.pre-commit-config.yaml
+6
-0
mmcv/cnn/bricks/plugin.py
mmcv/cnn/bricks/plugin.py
+1
-0
mmcv/cnn/utils/sync_bn.py
mmcv/cnn/utils/sync_bn.py
+1
-0
mmcv/runner/default_constructor.py
mmcv/runner/default_constructor.py
+1
-0
mmcv/tensorrt/preprocess.py
mmcv/tensorrt/preprocess.py
+1
-0
mmcv/utils/hub.py
mmcv/utils/hub.py
+1
-0
mmcv/utils/trace.py
mmcv/utils/trace.py
+1
-0
tests/data/config/a.b.py
tests/data/config/a.b.py
+1
-0
tests/data/config/a.py
tests/data/config/a.py
+1
-0
tests/data/config/base.py
tests/data/config/base.py
+1
-0
tests/data/config/code.py
tests/data/config/code.py
+1
-0
tests/data/config/d.py
tests/data/config/d.py
+1
-0
tests/data/config/delete.py
tests/data/config/delete.py
+1
-0
tests/data/config/deprecated.py
tests/data/config/deprecated.py
+1
-0
tests/data/config/deprecated_as_base.py
tests/data/config/deprecated_as_base.py
+1
-0
tests/data/config/e.py
tests/data/config/e.py
+1
-0
tests/data/config/expected.py
tests/data/config/expected.py
+1
-0
tests/data/config/f.py
tests/data/config/f.py
+1
-0
tests/data/config/g.py
tests/data/config/g.py
+1
-0
tests/data/config/h.py
tests/data/config/h.py
+1
-0
No files found.
.pre-commit-config.yaml
View file @
6e9ce183
...
@@ -40,6 +40,12 @@ repos:
...
@@ -40,6 +40,12 @@ 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
# Use the ref you want to point at
hooks
:
-
id
:
check-copyright
args
:
[
"
mmcv"
,
"
tests"
,
"
--excludes"
,
"
mmcv/ops"
]
# - repo: local
# - repo: local
# hooks:
# hooks:
# - id: clang-format
# - id: clang-format
...
...
mmcv/cnn/bricks/plugin.py
View file @
6e9ce183
# Copyright (c) OpenMMLab. All rights reserved.
import
inspect
import
inspect
import
platform
import
platform
...
...
mmcv/cnn/utils/sync_bn.py
View file @
6e9ce183
# Copyright (c) OpenMMLab. All rights reserved.
import
torch
import
torch
import
mmcv
import
mmcv
...
...
mmcv/runner/default_constructor.py
View file @
6e9ce183
# Copyright (c) OpenMMLab. All rights reserved.
from
.builder
import
RUNNER_BUILDERS
,
RUNNERS
from
.builder
import
RUNNER_BUILDERS
,
RUNNERS
...
...
mmcv/tensorrt/preprocess.py
View file @
6e9ce183
# Copyright (c) OpenMMLab. All rights reserved.
import
numpy
as
np
import
numpy
as
np
import
onnx
import
onnx
...
...
mmcv/utils/hub.py
View file @
6e9ce183
# Copyright (c) OpenMMLab. All rights reserved.
# The 1.6 release of PyTorch switched torch.save to use a new zipfile-based
# 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
# file format. It will cause RuntimeError when a checkpoint was saved in
# torch >= 1.6.0 but loaded in torch < 1.7.0.
# torch >= 1.6.0 but loaded in torch < 1.7.0.
...
...
mmcv/utils/trace.py
View file @
6e9ce183
# Copyright (c) OpenMMLab. All rights reserved.
import
warnings
import
warnings
import
torch
import
torch
...
...
tests/data/config/a.b.py
View file @
6e9ce183
# Copyright (c) OpenMMLab. All rights reserved.
item1
=
[
1
,
2
]
item1
=
[
1
,
2
]
item2
=
{
'a'
:
0
}
item2
=
{
'a'
:
0
}
item3
=
True
item3
=
True
...
...
tests/data/config/a.py
View file @
6e9ce183
# Copyright (c) OpenMMLab. All rights reserved.
item1
=
[
1
,
2
]
item1
=
[
1
,
2
]
item2
=
{
'a'
:
0
}
item2
=
{
'a'
:
0
}
item3
=
True
item3
=
True
...
...
tests/data/config/base.py
View file @
6e9ce183
# Copyright (c) OpenMMLab. All rights reserved.
item1
=
[
1
,
2
]
item1
=
[
1
,
2
]
item2
=
{
'a'
:
0
}
item2
=
{
'a'
:
0
}
item3
=
True
item3
=
True
...
...
tests/data/config/code.py
View file @
6e9ce183
# Copyright (c) OpenMMLab. All rights reserved.
from
mmcv
import
Config
# isort:skip
from
mmcv
import
Config
# isort:skip
cfg
=
Config
.
fromfile
(
'./tests/data/config/a.py'
)
cfg
=
Config
.
fromfile
(
'./tests/data/config/a.py'
)
...
...
tests/data/config/d.py
View file @
6e9ce183
# Copyright (c) OpenMMLab. All rights reserved.
_base_
=
'./base.py'
_base_
=
'./base.py'
item1
=
[
2
,
3
]
item1
=
[
2
,
3
]
item2
=
{
'a'
:
1
}
item2
=
{
'a'
:
1
}
...
...
tests/data/config/delete.py
View file @
6e9ce183
# Copyright (c) OpenMMLab. All rights reserved.
_base_
=
'./base.py'
_base_
=
'./base.py'
item1
=
{
'a'
:
0
,
'_delete_'
:
True
}
item1
=
{
'a'
:
0
,
'_delete_'
:
True
}
item2
=
{
'b'
:
0
}
item2
=
{
'b'
:
0
}
tests/data/config/deprecated.py
View file @
6e9ce183
# Copyright (c) OpenMMLab. All rights reserved.
_base_
=
'./expected.py'
_base_
=
'./expected.py'
_deprecation_
=
dict
(
_deprecation_
=
dict
(
...
...
tests/data/config/deprecated_as_base.py
View file @
6e9ce183
# Copyright (c) OpenMMLab. All rights reserved.
_base_
=
'./deprecated.py'
_base_
=
'./deprecated.py'
\ No newline at end of file
tests/data/config/e.py
View file @
6e9ce183
# Copyright (c) OpenMMLab. All rights reserved.
_base_
=
'./base.py'
_base_
=
'./base.py'
item3
=
{
'a'
:
1
}
item3
=
{
'a'
:
1
}
tests/data/config/expected.py
View file @
6e9ce183
# Copyright (c) OpenMMLab. All rights reserved.
item1
=
'expected'
item1
=
'expected'
tests/data/config/f.py
View file @
6e9ce183
# Copyright (c) OpenMMLab. All rights reserved.
_base_
=
'./d.py'
_base_
=
'./d.py'
item4
=
'test_recursive_bases'
item4
=
'test_recursive_bases'
tests/data/config/g.py
View file @
6e9ce183
# Copyright (c) OpenMMLab. All rights reserved.
filename
=
'reserved.py'
filename
=
'reserved.py'
tests/data/config/h.py
View file @
6e9ce183
# Copyright (c) OpenMMLab. All rights reserved.
item1
=
'{{fileBasename}}'
item1
=
'{{fileBasename}}'
item2
=
'{{ fileDirname}}'
item2
=
'{{ fileDirname}}'
item3
=
'abc_{{ fileBasenameNoExtension }}'
item3
=
'abc_{{ fileBasenameNoExtension }}'
Prev
1
2
3
4
5
6
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment