Skip to content

Commit 4a96ae7

Browse files
Update .pre-commit-config.yaml (#1274)
* Update .pre-commit-config.yaml * Fix precommit Signed-off-by: Sachidanand Alle <[email protected]> --------- Signed-off-by: Sachidanand Alle <[email protected]>
1 parent cd0d012 commit 4a96ae7

File tree

65 files changed

+680
-707
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+680
-707
lines changed

.pre-commit-config.yaml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,34 +17,43 @@ repos:
1717
- repo: https://github.com/pre-commit/pre-commit-hooks
1818
rev: v4.4.0
1919
hooks:
20+
- id: check-merge-conflict
2021
- id: trailing-whitespace
22+
- id: check-yaml
23+
- id: check-executables-have-shebangs
24+
- id: check-toml
25+
- id: check-case-conflict
2126
- id: check-added-large-files
2227
args: ['--maxkb=1024']
23-
- id: check-case-conflict
24-
- id: check-merge-conflict
28+
- id: detect-private-key
29+
- id: forbid-new-submodules
30+
- id: pretty-format-json
31+
args: ['--autofix', '--no-sort-keys', '--indent=4']
32+
- id: end-of-file-fixer
33+
- id: mixed-line-ending
2534

2635
- repo: https://github.com/pycqa/isort
27-
rev: 5.11.4
36+
rev: 5.12.0
2837
hooks:
2938
- id: isort
3039
name: isort (python)
3140
args: ["--line-length=120", "--profile=black"]
3241

3342
- repo: https://github.com/pycqa/isort
34-
rev: 5.11.4
43+
rev: 5.12.0
3544
hooks:
3645
- id: isort
3746
name: isort (python) (check)
3847
args: ["--line-length=120", "--profile=black", "--check"]
3948

4049
- repo: https://github.com/psf/black
41-
rev: 22.12.0
50+
rev: 23.1.0
4251
hooks:
4352
- id: black
4453
args: ["--line-length=120"]
4554

4655
- repo: https://github.com/psf/black
47-
rev: 22.12.0
56+
rev: 23.1.0
4857
hooks:
4958
- id: black
5059
name: black (check)

CITATION.cff

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ license: "Apache-2.0"
2626
repository-code: "https://github.com/Project-MONAI/MONAILabel"
2727
cff-version: "1.1.0"
2828
message: "If you use this software, please cite it using these metadata."
29-
...
29+
...

docs/_static/custom.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ limitations under the License.
1414
@import url('https://fonts.googleapis.com/css?family=Lekton:700|Roboto&display=swap');
1515
body{font-family:'Roboto',sans-serif;}.wy-menu-vertical p.caption{color:#7cccc7;}
1616
*{font-variant-ligatures: none;}.autoclasstoc td {padding:0.2rem;line-height:normal;}
17-
dl.field-list>dt{word-break: normal}
17+
dl.field-list>dt{word-break: normal}

docs/images/modules.svg

Lines changed: 1 addition & 1 deletion
Loading

docs/images/monai-server-application-callflow.svg

Lines changed: 1 addition & 1 deletion
Loading

docs/source/conf.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,6 @@ def generate_apidocs(*args):
158158

159159

160160
class GenerateTagLinks(SphinxTransform):
161-
162161
linkref_prefix = "LINKREF_"
163162
git_tag = "MONAILABEL_GIT_TAG"
164163
linkref_lut = {"LINKREF_GITHUB_MONAILABEL": f"https://github.com/Project-MONAI/MONAILabel/tree/{{{git_tag}}}"}
@@ -174,9 +173,7 @@ def basetext(obj):
174173
return isinstance(obj, Text) and obj.startswith(GenerateTagLinks.linkref_prefix)
175174

176175
def apply(self):
177-
178176
for node in self.document.traverse(GenerateTagLinks.baseref):
179-
180177
# find the entry for the link reference we want to substitute
181178
link_key = None
182179
for k in self.linkref_lut.keys():

docs/source/installation.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -353,5 +353,3 @@ If you have `DSA <https://digitalslidearchive.github.io/digital_slide_archive/>`
353353
monailabel start_server --app apps/pathology --studies http://0.0.0.0:8080/api/v1
354354

355355
Refer `DSA Plugin <https://github.com/Project-MONAI/MONAILabel/tree/main/plugins/dsa>`_ for running a sample pathology use-case in MONAILabel using DSA.
356-
357-

monailabel/client/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -495,12 +495,12 @@ def save_result(files, tmpdir):
495495
def encode_multipart_formdata(fields, files):
496496
limit = "----------lImIt_of_THE_fIle_eW_$"
497497
lines = []
498-
for (key, value) in fields.items():
498+
for key, value in fields.items():
499499
lines.append("--" + limit)
500500
lines.append('Content-Disposition: form-data; name="%s"' % key)
501501
lines.append("")
502502
lines.append(value)
503-
for (key, filename) in files.items():
503+
for key, filename in files.items():
504504
if isinstance(filename, tuple):
505505
filename, data = filename
506506
else:

monailabel/deepedit/interaction.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ def __init__(
4646
click_probability_key: str = "probability",
4747
max_interactions: int = 1,
4848
) -> None:
49-
5049
self.deepgrow_probability = deepgrow_probability
5150
self.transforms = Compose(transforms) if not isinstance(transforms, Compose) else transforms
5251
self.train = train
Lines changed: 47 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,48 @@
11
{
2-
"admin": {
3-
"username": "admin",
4-
"full_name": "Admin",
5-
"email": "[email protected]",
6-
"hashed_password": "$2b$12$CexVjWGTX//w8kt.f3CbGuznFtnlHCVte1EUScwzDCRKMRmltGBDa",
7-
"disabled": false,
8-
"scopes": [
9-
"admin",
10-
"reviewer",
11-
"annotator",
12-
"user"
13-
]
14-
},
15-
"reviewer": {
16-
"username": "reviewer",
17-
"full_name": "Reviewer",
18-
"email": "[email protected]",
19-
"hashed_password": "$2b$12$KJzEvm8iQFOwiLLecBjxg./g/9XLt1VMIDBrEFqJnqEOonxaWZ1y2",
20-
"disabled": false,
21-
"scopes": [
22-
"reviewer",
23-
"annotator",
24-
"user"
25-
]
26-
},
27-
"annotator": {
28-
"username": "annotator",
29-
"full_name": "Annotator",
30-
"email": "[email protected]",
31-
"hashed_password": "$2b$12$6RPP.jL.8GZmP7DtJhWRLO.Exvh6LGUleXq.KLyBv9/leoV8KY8Pm",
32-
"disabled": false,
33-
"scopes": [
34-
"annotator",
35-
"user"
36-
]
37-
},
38-
"user": {
39-
"username": "user",
40-
"full_name": "User",
41-
"email": "[email protected]",
42-
"hashed_password": "$2b$12$Py6rSaJyhJIYfgnEOmCzLuQ9Kz7FtMdzjRCimtPUmPspbIPbRH6Dq",
43-
"disabled": false,
44-
"scopes": [
45-
"user"
46-
]
47-
}
48-
}
2+
"admin": {
3+
"username": "admin",
4+
"full_name": "Admin",
5+
"email": "[email protected]",
6+
"hashed_password": "$2b$12$CexVjWGTX//w8kt.f3CbGuznFtnlHCVte1EUScwzDCRKMRmltGBDa",
7+
"disabled": false,
8+
"scopes": [
9+
"admin",
10+
"reviewer",
11+
"annotator",
12+
"user"
13+
]
14+
},
15+
"reviewer": {
16+
"username": "reviewer",
17+
"full_name": "Reviewer",
18+
"email": "[email protected]",
19+
"hashed_password": "$2b$12$KJzEvm8iQFOwiLLecBjxg./g/9XLt1VMIDBrEFqJnqEOonxaWZ1y2",
20+
"disabled": false,
21+
"scopes": [
22+
"reviewer",
23+
"annotator",
24+
"user"
25+
]
26+
},
27+
"annotator": {
28+
"username": "annotator",
29+
"full_name": "Annotator",
30+
"email": "[email protected]",
31+
"hashed_password": "$2b$12$6RPP.jL.8GZmP7DtJhWRLO.Exvh6LGUleXq.KLyBv9/leoV8KY8Pm",
32+
"disabled": false,
33+
"scopes": [
34+
"annotator",
35+
"user"
36+
]
37+
},
38+
"user": {
39+
"username": "user",
40+
"full_name": "User",
41+
"email": "[email protected]",
42+
"hashed_password": "$2b$12$Py6rSaJyhJIYfgnEOmCzLuQ9Kz7FtMdzjRCimtPUmPspbIPbRH6Dq",
43+
"disabled": false,
44+
"scopes": [
45+
"user"
46+
]
47+
}
48+
}

0 commit comments

Comments
 (0)