File tree Expand file tree Collapse file tree 5 files changed +7
-59
lines changed Expand file tree Collapse file tree 5 files changed +7
-59
lines changed Original file line number Diff line number Diff line change @@ -38,11 +38,13 @@ and this project attempts to adhere to [Semantic Versioning](https://semver.org/
38
38
- Now using ` nox ` for testing.
39
39
- Build script has been moved from inside the package to the root of the repository.
40
40
- Added link to MIT license in all SVG files and split the license and Refactoring UI Inc. copyright information into separate lines.
41
+ - Icon registration has been simplified to just getting a list of the icon files under the ` heroicons ` template directory.
41
42
42
43
### Removed
43
44
44
45
- Dropped support for Python 3.7.
45
46
- Removed all build scripts and related methods from package.
47
+ - Removed ` icons.py ` and associated tests.
46
48
47
49
## [ 0.1.3]
48
50
Original file line number Diff line number Diff line change @@ -79,7 +79,6 @@ exclude_lines = [
79
79
" if TYPE_CHECKING:" ,
80
80
' def __str__\(self\)\s?\-?\>?\s?\w*\:'
81
81
]
82
- fail_under = 60
83
82
84
83
[tool .coverage .run ]
85
84
branch = true
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
from __future__ import annotations
2
2
3
- try :
4
- from wagtail import hooks
5
- except ImportError :
6
- from wagtail .core import hooks
3
+ from pathlib import Path
7
4
8
- from . icons import Heroicon
5
+ from wagtail import hooks
9
6
10
7
11
8
@hooks .register ("register_icons" )
12
9
def register_icons (icons ):
13
- for icon in Heroicon . get_icons ():
14
- icons . append ( str ( icon . path ))
15
- return icons
10
+ template_dir = Path ( __file__ ). parent / "templates" / "heroicons"
11
+ heroicons = [ file . stem for file in template_dir . glob ( "*.svg" )]
12
+ return icons + heroicons
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments