Skip to content

Commit 7098da3

Browse files
committed
Use different status messages.
Putting the filename first enables PyCharm hyperlinks.
1 parent 5cc09ac commit 7098da3

11 files changed

+123
-123
lines changed

dep_checker/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
)
6363

6464
#: The template to use when printing output.
65-
template = "{name} imported at {filename}:{lineno}"
65+
template = "{filename}:{lineno}: %s {name} imported"
6666

6767
reader = ConfigReader("dep_checker", default_factory=dict)
6868

@@ -142,7 +142,7 @@ def format_error(self) -> str:
142142
Format the error (or, in this case, success) message.
143143
"""
144144

145-
return f"✔ {template.format_map(self._asdict())}"
145+
return template.format_map(self._asdict()) % '✔'
146146

147147

148148
@_nt_asdict_class_deco
@@ -165,7 +165,7 @@ def format_error(self) -> str:
165165
Format the error message.
166166
"""
167167

168-
return f"{template.format_map(self._asdict())} but not listed as a requirement"
168+
return f"{template.format_map(self._asdict())} but not listed as a requirement" % '✘'
169169

170170

171171
@_nt_asdict_class_deco
Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
err: []
22
out:
3-
- ✘ pytest imported at my_project.py:5 but not listed as a requirement
4-
- ✘ chemistry_tools imported at my_project.py:6 but not listed as a requirement
5-
- ✘ pathlib2 imported at my_project.py:7 but not listed as a requirement
6-
- ✘ typing_extensions imported at my_project.py:8 but not listed as a requirement
7-
- ✘ domdf_python_tools imported at my_project.py:9 but not listed as a requirement
8-
- ✘ click imported at my_project.py:11 but not listed as a requirement
9-
- ✘ ruamel imported at my_project.py:13 but not listed as a requirement
10-
- ✘ Bio imported at my_project.py:15 but not listed as a requirement
11-
- ✘ configconfig imported at my_project.py:31 but not listed as a requirement
12-
- ✘ setuptools imported at my_project.py:35 but not listed as a requirement
3+
- 'my_project.py:5: ✘ pytest imported but not listed as a requirement'
4+
- 'my_project.py:6: ✘ chemistry_tools imported but not listed as a requirement'
5+
- 'my_project.py:7: ✘ pathlib2 imported but not listed as a requirement'
6+
- 'my_project.py:8: ✘ typing_extensions imported but not listed as a requirement'
7+
- 'my_project.py:9: ✘ domdf_python_tools imported but not listed as a requirement'
8+
- 'my_project.py:11: ✘ click imported but not listed as a requirement'
9+
- 'my_project.py:13: ✘ ruamel imported but not listed as a requirement'
10+
- 'my_project.py:15: ✘ Bio imported but not listed as a requirement'
11+
- 'my_project.py:31: ✘ configconfig imported but not listed as a requirement'
12+
- 'my_project.py:35: ✘ setuptools imported but not listed as a requirement'
1313
- ✘ biopython never imported
1414
- ✘ coincidence never imported
15-
- ✔ consolekit imported at my_project.py:10
15+
- 'my_project.py:10: ✔ consolekit imported'
1616
- ✘ numpy never imported
17-
- ✔ pandas imported at my_project.py:12
17+
- 'my_project.py:12: ✔ pandas imported'
Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
err: []
22
out:
3-
- ✘ pytest imported at my_project/__init__.py:5 but not listed as a requirement
4-
- ✘ chemistry_tools imported at my_project/__init__.py:6 but not listed as a requirement
5-
- ✘ pathlib2 imported at my_project/__init__.py:7 but not listed as a requirement
6-
- ✘ typing_extensions imported at my_project/__init__.py:8 but not listed as a requirement
7-
- ✘ domdf_python_tools imported at my_project/__init__.py:9 but not listed as a requirement
8-
- ✘ click imported at my_project/__init__.py:11 but not listed as a requirement
9-
- ✘ ruamel imported at my_project/__init__.py:13 but not listed as a requirement
10-
- ✘ Bio imported at my_project/__init__.py:15 but not listed as a requirement
11-
- ✘ configconfig imported at my_project/__init__.py:31 but not listed as a requirement
12-
- ✘ setuptools imported at my_project/__init__.py:35 but not listed as a requirement
3+
- 'my_project/__init__.py:5: ✘ pytest imported but not listed as a requirement'
4+
- 'my_project/__init__.py:6: ✘ chemistry_tools imported but not listed as a requirement'
5+
- 'my_project/__init__.py:7: ✘ pathlib2 imported but not listed as a requirement'
6+
- 'my_project/__init__.py:8: ✘ typing_extensions imported but not listed as a requirement'
7+
- 'my_project/__init__.py:9: ✘ domdf_python_tools imported but not listed as a requirement'
8+
- 'my_project/__init__.py:11: ✘ click imported but not listed as a requirement'
9+
- 'my_project/__init__.py:13: ✘ ruamel imported but not listed as a requirement'
10+
- 'my_project/__init__.py:15: ✘ Bio imported but not listed as a requirement'
11+
- 'my_project/__init__.py:31: ✘ configconfig imported but not listed as a requirement'
12+
- 'my_project/__init__.py:35: ✘ setuptools imported but not listed as a requirement'
1313
- ✘ biopython never imported
1414
- ✘ coincidence never imported
15-
- ✔ consolekit imported at my_project/__init__.py:10
15+
- 'my_project/__init__.py:10: ✔ consolekit imported'
1616
- ✘ numpy never imported
17-
- ✔ pandas imported at my_project/__init__.py:12
17+
- 'my_project/__init__.py:12: ✔ pandas imported'
Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
✘ pytest imported at my_project.py:5 but not listed as a requirement
2-
✘ chemistry_tools imported at my_project.py:6 but not listed as a requirement
3-
✘ pathlib2 imported at my_project.py:7 but not listed as a requirement
4-
✘ typing_extensions imported at my_project.py:8 but not listed as a requirement
5-
✘ domdf_python_tools imported at my_project.py:9 but not listed as a requirement
6-
✘ click imported at my_project.py:11 but not listed as a requirement
7-
✘ ruamel imported at my_project.py:13 but not listed as a requirement
8-
✘ Bio imported at my_project.py:15 but not listed as a requirement
9-
✘ configconfig imported at my_project.py:31 but not listed as a requirement
10-
✘ setuptools imported at my_project.py:35 but not listed as a requirement
1+
my_project.py:5: ✘ pytest imported but not listed as a requirement
2+
my_project.py:6: ✘ chemistry_tools imported but not listed as a requirement
3+
my_project.py:7: ✘ pathlib2 imported but not listed as a requirement
4+
my_project.py:8: ✘ typing_extensions imported but not listed as a requirement
5+
my_project.py:9: ✘ domdf_python_tools imported but not listed as a requirement
6+
my_project.py:11: ✘ click imported but not listed as a requirement
7+
my_project.py:13: ✘ ruamel imported but not listed as a requirement
8+
my_project.py:15: ✘ Bio imported but not listed as a requirement
9+
my_project.py:31: ✘ configconfig imported but not listed as a requirement
10+
my_project.py:35: ✘ setuptools imported but not listed as a requirement
1111
✘ biopython never imported
1212
✘ coincidence never imported
13-
✔ consolekit imported at my_project.py:10
13+
my_project.py:10: ✔ consolekit imported
1414
✘ numpy never imported
15-
✔ pandas imported at my_project.py:12
15+
my_project.py:12: ✔ pandas imported
Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
✘ pytest imported at my_project/__init__.py:5 but not listed as a requirement
2-
✘ chemistry_tools imported at my_project/__init__.py:6 but not listed as a requirement
3-
✘ pathlib2 imported at my_project/__init__.py:7 but not listed as a requirement
4-
✘ typing_extensions imported at my_project/__init__.py:8 but not listed as a requirement
5-
✘ domdf_python_tools imported at my_project/__init__.py:9 but not listed as a requirement
6-
✘ click imported at my_project/__init__.py:11 but not listed as a requirement
7-
✘ ruamel imported at my_project/__init__.py:13 but not listed as a requirement
8-
✘ Bio imported at my_project/__init__.py:15 but not listed as a requirement
9-
✘ configconfig imported at my_project/__init__.py:31 but not listed as a requirement
10-
✘ setuptools imported at my_project/__init__.py:35 but not listed as a requirement
1+
my_project/__init__.py:5: ✘ pytest imported but not listed as a requirement
2+
my_project/__init__.py:6: ✘ chemistry_tools imported but not listed as a requirement
3+
my_project/__init__.py:7: ✘ pathlib2 imported but not listed as a requirement
4+
my_project/__init__.py:8: ✘ typing_extensions imported but not listed as a requirement
5+
my_project/__init__.py:9: ✘ domdf_python_tools imported but not listed as a requirement
6+
my_project/__init__.py:11: ✘ click imported but not listed as a requirement
7+
my_project/__init__.py:13: ✘ ruamel imported but not listed as a requirement
8+
my_project/__init__.py:15: ✘ Bio imported but not listed as a requirement
9+
my_project/__init__.py:31: ✘ configconfig imported but not listed as a requirement
10+
my_project/__init__.py:35: ✘ setuptools imported but not listed as a requirement
1111
✘ biopython never imported
1212
✘ coincidence never imported
13-
✔ consolekit imported at my_project/__init__.py:10
13+
my_project/__init__.py:10: ✔ consolekit imported
1414
✘ numpy never imported
15-
✔ pandas imported at my_project/__init__.py:12
15+
my_project/__init__.py:12: ✔ pandas imported
Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
✘ pytest imported at my_project/__init__.py:5 but not listed as a requirement
2-
✘ chemistry_tools imported at my_project/__init__.py:6 but not listed as a requirement
3-
✘ pathlib2 imported at my_project/__init__.py:7 but not listed as a requirement
4-
✘ typing_extensions imported at my_project/__init__.py:8 but not listed as a requirement
5-
✘ domdf_python_tools imported at my_project/__init__.py:9 but not listed as a requirement
6-
✘ click imported at my_project/__init__.py:11 but not listed as a requirement
7-
✘ ruamel imported at my_project/__init__.py:13 but not listed as a requirement
8-
✘ Bio imported at my_project/__init__.py:15 but not listed as a requirement
9-
✘ configconfig imported at my_project/__init__.py:31 but not listed as a requirement
10-
✘ setuptools imported at my_project/__init__.py:35 but not listed as a requirement
1+
my_project/__init__.py:5: ✘ pytest imported but not listed as a requirement
2+
my_project/__init__.py:6: ✘ chemistry_tools imported but not listed as a requirement
3+
my_project/__init__.py:7: ✘ pathlib2 imported but not listed as a requirement
4+
my_project/__init__.py:8: ✘ typing_extensions imported but not listed as a requirement
5+
my_project/__init__.py:9: ✘ domdf_python_tools imported but not listed as a requirement
6+
my_project/__init__.py:11: ✘ click imported but not listed as a requirement
7+
my_project/__init__.py:13: ✘ ruamel imported but not listed as a requirement
8+
my_project/__init__.py:15: ✘ Bio imported but not listed as a requirement
9+
my_project/__init__.py:31: ✘ configconfig imported but not listed as a requirement
10+
my_project/__init__.py:35: ✘ setuptools imported but not listed as a requirement
1111
✘ biopython never imported
1212
✘ coincidence never imported
13-
✔ consolekit imported at my_project/__init__.py:10
13+
my_project/__init__.py:10: ✔ consolekit imported
1414
✘ numpy never imported
15-
✔ pandas imported at my_project/__init__.py:12
15+
my_project/__init__.py:12: ✔ pandas imported
Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
err: []
22
out:
3-
- ✘ pytest imported at my_project.py:5 but not listed as a requirement
4-
- ✘ chemistry_tools imported at my_project.py:6 but not listed as a requirement
5-
- ✘ pathlib2 imported at my_project.py:7 but not listed as a requirement
6-
- ✘ typing_extensions imported at my_project.py:8 but not listed as a requirement
7-
- ✘ domdf_python_tools imported at my_project.py:9 but not listed as a requirement
8-
- ✘ click imported at my_project.py:11 but not listed as a requirement
9-
- ✘ ruamel imported at my_project.py:13 but not listed as a requirement
10-
- ✘ Bio imported at my_project.py:15 but not listed as a requirement
11-
- ✘ configconfig imported at my_project.py:31 but not listed as a requirement
12-
- ✘ setuptools imported at my_project.py:35 but not listed as a requirement
3+
- 'my_project.py:5: ✘ pytest imported but not listed as a requirement'
4+
- 'my_project.py:6: ✘ chemistry_tools imported but not listed as a requirement'
5+
- 'my_project.py:7: ✘ pathlib2 imported but not listed as a requirement'
6+
- 'my_project.py:8: ✘ typing_extensions imported but not listed as a requirement'
7+
- 'my_project.py:9: ✘ domdf_python_tools imported but not listed as a requirement'
8+
- 'my_project.py:11: ✘ click imported but not listed as a requirement'
9+
- 'my_project.py:13: ✘ ruamel imported but not listed as a requirement'
10+
- 'my_project.py:15: ✘ Bio imported but not listed as a requirement'
11+
- 'my_project.py:31: ✘ configconfig imported but not listed as a requirement'
12+
- 'my_project.py:35: ✘ setuptools imported but not listed as a requirement'
1313
- ✘ biopython never imported
1414
- ✘ coincidence never imported
15-
- ✔ consolekit imported at my_project.py:10
16-
- ✔ pandas imported at my_project.py:12
15+
- 'my_project.py:10: ✔ consolekit imported'
16+
- 'my_project.py:12: ✔ pandas imported'
Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
err: []
22
out:
3-
- ✘ pytest imported at my_project.py:5 but not listed as a requirement
4-
- ✘ chemistry_tools imported at my_project.py:6 but not listed as a requirement
5-
- ✘ pathlib2 imported at my_project.py:7 but not listed as a requirement
6-
- ✘ typing_extensions imported at my_project.py:8 but not listed as a requirement
7-
- ✘ domdf_python_tools imported at my_project.py:9 but not listed as a requirement
8-
- ✘ click imported at my_project.py:11 but not listed as a requirement
9-
- ✘ ruamel imported at my_project.py:13 but not listed as a requirement
10-
- ✘ configconfig imported at my_project.py:31 but not listed as a requirement
11-
- ✘ setuptools imported at my_project.py:35 but not listed as a requirement
12-
- ✔ Bio imported at my_project.py:15
3+
- 'my_project.py:5: ✘ pytest imported but not listed as a requirement'
4+
- 'my_project.py:6: ✘ chemistry_tools imported but not listed as a requirement'
5+
- 'my_project.py:7: ✘ pathlib2 imported but not listed as a requirement'
6+
- 'my_project.py:8: ✘ typing_extensions imported but not listed as a requirement'
7+
- 'my_project.py:9: ✘ domdf_python_tools imported but not listed as a requirement'
8+
- 'my_project.py:11: ✘ click imported but not listed as a requirement'
9+
- 'my_project.py:13: ✘ ruamel imported but not listed as a requirement'
10+
- 'my_project.py:31: ✘ configconfig imported but not listed as a requirement'
11+
- 'my_project.py:35: ✘ setuptools imported but not listed as a requirement'
12+
- 'my_project.py:15: ✔ Bio imported'
1313
- ✘ coincidence never imported
14-
- ✔ consolekit imported at my_project.py:10
15-
- ✔ pandas imported at my_project.py:12
14+
- 'my_project.py:10: ✔ consolekit imported'
15+
- 'my_project.py:12: ✔ pandas imported'
Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
err: []
22
out:
3-
- ✘ pytest imported at my_project.py:5 but not listed as a requirement
4-
- ✘ chemistry_tools imported at my_project.py:6 but not listed as a requirement
5-
- ✘ pathlib2 imported at my_project.py:7 but not listed as a requirement
6-
- ✘ typing_extensions imported at my_project.py:8 but not listed as a requirement
7-
- ✘ domdf_python_tools imported at my_project.py:9 but not listed as a requirement
8-
- ✘ click imported at my_project.py:11 but not listed as a requirement
9-
- ✘ ruamel imported at my_project.py:13 but not listed as a requirement
10-
- ✘ configconfig imported at my_project.py:31 but not listed as a requirement
11-
- ✘ setuptools imported at my_project.py:35 but not listed as a requirement
12-
- ✔ Bio imported at my_project.py:15
3+
- 'my_project.py:5: ✘ pytest imported but not listed as a requirement'
4+
- 'my_project.py:6: ✘ chemistry_tools imported but not listed as a requirement'
5+
- 'my_project.py:7: ✘ pathlib2 imported but not listed as a requirement'
6+
- 'my_project.py:8: ✘ typing_extensions imported but not listed as a requirement'
7+
- 'my_project.py:9: ✘ domdf_python_tools imported but not listed as a requirement'
8+
- 'my_project.py:11: ✘ click imported but not listed as a requirement'
9+
- 'my_project.py:13: ✘ ruamel imported but not listed as a requirement'
10+
- 'my_project.py:31: ✘ configconfig imported but not listed as a requirement'
11+
- 'my_project.py:35: ✘ setuptools imported but not listed as a requirement'
12+
- 'my_project.py:15: ✔ Bio imported'
1313
- ✘ coincidence never imported
14-
- ✔ consolekit imported at my_project.py:10
14+
- 'my_project.py:10: ✔ consolekit imported'
1515
- ✘ numpy never imported
16-
- ✔ pandas imported at my_project.py:12
16+
- 'my_project.py:12: ✔ pandas imported'
Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
err: []
22
out:
3-
- ✘ pytest imported at my_project.py:5 but not listed as a requirement
4-
- ✘ chemistry_tools imported at my_project.py:6 but not listed as a requirement
5-
- ✘ pathlib2 imported at my_project.py:7 but not listed as a requirement
6-
- ✘ typing_extensions imported at my_project.py:8 but not listed as a requirement
7-
- ✘ domdf_python_tools imported at my_project.py:9 but not listed as a requirement
8-
- ✘ click imported at my_project.py:11 but not listed as a requirement
9-
- ✘ ruamel.yaml imported at my_project.py:13 but not listed as a requirement
10-
- ✘ Bio imported at my_project.py:15 but not listed as a requirement
11-
- ✘ configconfig imported at my_project.py:31 but not listed as a requirement
12-
- ✘ setuptools imported at my_project.py:35 but not listed as a requirement
3+
- 'my_project.py:5: ✘ pytest imported but not listed as a requirement'
4+
- 'my_project.py:6: ✘ chemistry_tools imported but not listed as a requirement'
5+
- 'my_project.py:7: ✘ pathlib2 imported but not listed as a requirement'
6+
- 'my_project.py:8: ✘ typing_extensions imported but not listed as a requirement'
7+
- 'my_project.py:9: ✘ domdf_python_tools imported but not listed as a requirement'
8+
- 'my_project.py:11: ✘ click imported but not listed as a requirement'
9+
- 'my_project.py:13: ✘ ruamel.yaml imported but not listed as a requirement'
10+
- 'my_project.py:15: ✘ Bio imported but not listed as a requirement'
11+
- 'my_project.py:31: ✘ configconfig imported but not listed as a requirement'
12+
- 'my_project.py:35: ✘ setuptools imported but not listed as a requirement'
1313
- ✘ biopython never imported
1414
- ✘ coincidence never imported
15-
- ✔ consolekit imported at my_project.py:10
15+
- 'my_project.py:10: ✔ consolekit imported'
1616
- ✘ numpy never imported
17-
- ✔ pandas imported at my_project.py:12
17+
- 'my_project.py:12: ✔ pandas imported'

0 commit comments

Comments
 (0)