Skip to content

Commit 2aaf89c

Browse files
committed
release: 2022.3
1 parent 232b674 commit 2aaf89c

File tree

14 files changed

+373
-315
lines changed

14 files changed

+373
-315
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
33
All major and minor version changes will be documented in this file. Details of
44
patch-level version changes can be found in [commit messages](../../commits/master).
55

6+
## 2022.3.0 - 2022/12/30
7+
8+
- Combined `PackageCompat` and `PackageInfo` to a `@dataclass` of `PackageInfo`
9+
- `get_deps.py` and `packageinfo.py` use sets in-place of lists. NOTE: `list(depsWithLicenses)` is passed to `formatter.py` (which expects lists of `PackageInfo`)
10+
11+
612
## 2022.2.0 - 2022/10/22
713

814
- Add support for `setup.cfg` https://github.com/FHPythonUtils/LicenseCheck/issues/21

README.md

Lines changed: 151 additions & 84 deletions
Large diffs are not rendered by default.

documentation/reference/licensecheck/formatter.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ Formatter
1616

1717
## ansi
1818

19-
[Show source in formatter.py:50](../../../licensecheck/formatter.py#L50)
19+
[Show source in formatter.py:51](../../../licensecheck/formatter.py#L51)
2020

2121
Format to ansi
2222

2323
#### Arguments
2424

25-
- `packages` *list[PackageCompat]* - list of PackageCompats to format.
25+
- `packages` *list[PackageInfo]* - list of PackageCompats to format.
2626

2727
#### Returns
2828

@@ -31,25 +31,25 @@ Format to ansi
3131
#### Signature
3232

3333
```python
34-
def ansi(packages: list[PackageCompat]) -> str:
34+
def ansi(packages: list[PackageInfo]) -> str:
3535
...
3636
```
3737

3838
#### See also
3939

40-
- [PackageCompat](./types.md#packagecompat)
40+
- [PackageInfo](./types.md#packageinfo)
4141

4242

4343

4444
## markdown
4545

46-
[Show source in formatter.py:91](../../../licensecheck/formatter.py#L91)
46+
[Show source in formatter.py:99](../../../licensecheck/formatter.py#L99)
4747

4848
Format to markdown
4949

5050
#### Arguments
5151

52-
- `packages` *list[PackageCompat]* - list of PackageCompats to format.
52+
- `packages` *list[PackageInfo]* - list of PackageCompats to format.
5353

5454
#### Returns
5555

@@ -58,25 +58,25 @@ Format to markdown
5858
#### Signature
5959

6060
```python
61-
def markdown(packages: list[PackageCompat]) -> str:
61+
def markdown(packages: list[PackageInfo]) -> str:
6262
...
6363
```
6464

6565
#### See also
6666

67-
- [PackageCompat](./types.md#packagecompat)
67+
- [PackageInfo](./types.md#packageinfo)
6868

6969

7070

7171
## plainText
7272

73-
[Show source in formatter.py:79](../../../licensecheck/formatter.py#L79)
73+
[Show source in formatter.py:87](../../../licensecheck/formatter.py#L87)
7474

7575
Format to plain text
7676

7777
#### Arguments
7878

79-
- `packages` *list[PackageCompat]* - list of PackageCompats to format.
79+
- `packages` *list[PackageInfo]* - list of PackageCompats to format.
8080

8181
#### Returns
8282

@@ -85,25 +85,25 @@ Format to plain text
8585
#### Signature
8686

8787
```python
88-
def plainText(packages: list[PackageCompat]) -> str:
88+
def plainText(packages: list[PackageInfo]) -> str:
8989
...
9090
```
9191

9292
#### See also
9393

94-
- [PackageCompat](./types.md#packagecompat)
94+
- [PackageInfo](./types.md#packageinfo)
9595

9696

9797

9898
## raw
9999

100-
[Show source in formatter.py:127](../../../licensecheck/formatter.py#L127)
100+
[Show source in formatter.py:134](../../../licensecheck/formatter.py#L134)
101101

102102
Format to raw json
103103

104104
#### Arguments
105105

106-
- `packages` *list[PackageCompat]* - list of PackageCompats to format.
106+
- `packages` *list[PackageInfo]* - list of PackageCompats to format.
107107

108108
#### Returns
109109

@@ -112,25 +112,25 @@ Format to raw json
112112
#### Signature
113113

114114
```python
115-
def raw(packages: list[PackageCompat]) -> str:
115+
def raw(packages: list[PackageInfo]) -> str:
116116
...
117117
```
118118

119119
#### See also
120120

121-
- [PackageCompat](./types.md#packagecompat)
121+
- [PackageInfo](./types.md#packageinfo)
122122

123123

124124

125125
## rawCsv
126126

127-
[Show source in formatter.py:139](../../../licensecheck/formatter.py#L139)
127+
[Show source in formatter.py:146](../../../licensecheck/formatter.py#L146)
128128

129129
Format to raw csv
130130

131131
#### Arguments
132132

133-
- `packages` *list[PackageCompat]* - list of PackageCompats to format.
133+
- `packages` *list[PackageInfo]* - list of PackageCompats to format.
134134

135135
#### Returns
136136

@@ -139,19 +139,19 @@ Format to raw csv
139139
#### Signature
140140

141141
```python
142-
def rawCsv(packages: list[PackageCompat]) -> str:
142+
def rawCsv(packages: list[PackageInfo]) -> str:
143143
...
144144
```
145145

146146
#### See also
147147

148-
- [PackageCompat](./types.md#packagecompat)
148+
- [PackageInfo](./types.md#packageinfo)
149149

150150

151151

152152
## stripAnsi
153153

154-
[Show source in formatter.py:38](../../../licensecheck/formatter.py#L38)
154+
[Show source in formatter.py:39](../../../licensecheck/formatter.py#L39)
155155

156156
Strip ansi codes from a given string
157157

documentation/reference/licensecheck/get_deps.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Get Deps
1414

1515
[Show source in get_deps.py:90](../../../licensecheck/get_deps.py#L90)
1616

17-
Get a list of dependencies with licenses and determin license compatibility.
17+
Get a set of dependencies with licenses and determin license compatibility.
1818

1919
#### Arguments
2020

@@ -26,7 +26,7 @@ Get a list of dependencies with licenses and determin license compatibility.
2626

2727
#### Returns
2828

29-
- `list[PackageCompat]` - list of packagecompat types: dependency info + licence compat
29+
- `set[PackageInfo]` - set of updated dependencies with licenseCompat set
3030

3131
#### Signature
3232

@@ -37,13 +37,13 @@ def getDepsWithLicenses(
3737
failPackages: list[str],
3838
ignoreLicenses: list[str],
3939
failLicenses: list[str],
40-
) -> list[PackageCompat]:
40+
) -> set[PackageInfo]:
4141
...
4242
```
4343

4444
#### See also
4545

46-
- [PackageCompat](./types.md#packagecompat)
46+
- [PackageInfo](./types.md#packageinfo)
4747

4848

4949

@@ -66,12 +66,12 @@ Get requirements for the end user project/ lib.
6666

6767
#### Returns
6868

69-
- `list[str]` - list of requirement packages
69+
- `set[str]` - set of requirement packages
7070

7171
#### Signature
7272

7373
```python
74-
def getReqs(using: str) -> list[str]:
74+
def getReqs(using: str) -> set[str]:
7575
...
7676
```
7777

documentation/reference/licensecheck/license_matrix.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ Identify if the end user license is compatible with the dependency license(s).
5252
def depCompatWMyLice(
5353
myLicense: L,
5454
depLice: list[L],
55-
ignoreLicenses: list[L] = None,
56-
failLicenses: list[L] = None,
55+
ignoreLicenses: list[L] | None = None,
56+
failLicenses: list[L] | None = None,
5757
) -> bool:
5858
...
5959
```

0 commit comments

Comments
 (0)