Skip to content

Commit 222911c

Browse files
committed
rel 2024
1 parent c28b0f5 commit 222911c

File tree

8 files changed

+196
-121
lines changed

8 files changed

+196
-121
lines changed

.github/workflows/test-lint.yaml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Python Test and Lint
2+
3+
on:
4+
push:
5+
branches:
6+
- '*'
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
test:
13+
name: Python Test and Lint
14+
runs-on: ubuntu-latest
15+
16+
strategy:
17+
matrix:
18+
python-version:
19+
- '3.9'
20+
- '3.10'
21+
- '3.11'
22+
- '3.12'
23+
24+
steps:
25+
- name: Checkout code
26+
uses: actions/checkout@v4
27+
28+
- name: Set up Python ${{ matrix.python-version }}
29+
uses: actions/setup-python@v4
30+
with:
31+
python-version: ${{ matrix.python-version }}
32+
33+
- name: Install Poetry
34+
run: |
35+
curl -sSL https://install.python-poetry.org | python3 -
36+
37+
- name: Install dependencies
38+
run: poetry install
39+
40+
- name: Run pytest
41+
run: poetry run pytest
42+
43+
- name: Run ruff
44+
run: poetry run ruff check --output-format=github
45+
continue-on-error: true

.pre-commit-config.yaml

Lines changed: 27 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,45 @@
11
repos:
2-
- repo: https://github.com/FHPythonUtils/Blackt
3-
rev: '2022.0.3'
2+
- repo: https://github.com/astral-sh/ruff-pre-commit
3+
rev: v0.3.3
44
hooks:
5-
- id: blackt
5+
- id: ruff
6+
args: [ --fix ]
7+
- id: ruff-format
68

7-
- repo: https://github.com/pycqa/isort
8-
rev: 5.12.0
9+
- repo: https://github.com/RobertCraigie/pyright-python
10+
rev: v1.1.354
911
hooks:
10-
- id: isort
12+
- id: pyright
1113

12-
- repo: https://github.com/pycqa/pylint
13-
rev: v3.0.0a6
14+
- repo: https://github.com/Lucas-C/pre-commit-hooks-safety
15+
rev: v1.3.3
1416
hooks:
15-
- id: pylint
16-
exclude: "tests/"
17-
args: [--disable=import-error,--jobs=0]
17+
- id: python-safety-dependencies-check
18+
files: pyproject.toml
1819

1920
- repo: https://github.com/pre-commit/pre-commit-hooks
20-
rev: v4.4.0
21+
rev: v4.5.0
2122
hooks:
2223
- id: trailing-whitespace
23-
exclude: "tests/"
2424
- id: end-of-file-fixer
25-
exclude: "tests/"
25+
- id: check-case-conflict
26+
- id: check-executables-have-shebangs
27+
- id: check-json
28+
- id: check-merge-conflict
29+
- id: check-shebang-scripts-are-executable
30+
- id: check-symlinks
31+
- id: check-toml
32+
- id: check-vcs-permalinks
33+
- id: check-yaml
34+
- id: detect-private-key
35+
- id: mixed-line-ending
2636

27-
- repo: https://github.com/asottile/pyupgrade
28-
rev: v3.7.0
29-
hooks:
30-
- id: pyupgrade
31-
args: [--py38-plus]
3237
- repo: https://github.com/boidolr/pre-commit-images
33-
rev: v1.2.1
38+
rev: v1.5.2
3439
hooks:
35-
- id: optimize-avif
36-
exclude: "tests/"
3740
- id: optimize-jpg
38-
exclude: "tests/"
3941
- id: optimize-png
40-
exclude: "tests/"
4142
- id: optimize-svg
42-
exclude: "tests/"
4343
- id: optimize-webp
44-
exclude: "tests/"
44+
45+
exclude: "tests/data|documentation/reference"

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,14 @@
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+
## 2024 - 2024/03/30
7+
8+
- Update deps
9+
610
## 2023 - 2023/01/08
711

812
- Add tox config
9-
- Use `playwright` and `install_playwright` in-place of `pyppeteer`
13+
- Use `playwright` and `install_playwright` in-place of `playwright`
1014
- Seemingly minor perf improvements (~32s vs ~38s)
1115

1216
## 2022 - 2022/01/23
Lines changed: 53 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# Pylottie
22

3-
[Pylottie Index](../README.md#pylottie-index) /
4-
Pylottie
3+
[Pylottie Index](../README.md#pylottie-index) / Pylottie
54

65
> Auto-generated documentation for [pylottie](../../../pylottie/__init__.py) module.
76
@@ -24,189 +23,188 @@ Convert to gif and webp
2423

2524
#### Arguments
2625

27-
- `fileName` *str* - file path of the lottie file
28-
- `newFileName` *str* - name of the file to write (omit file ext)
29-
- `quality` *int, optional* - Quality of the returned sequence. Defaults to 1.
26+
----
27+
- `fileName` *str* - file path of the lottie file
28+
- `newFileName` *str* - name of the file to write (omit file ext)
29+
- `quality` *int, optional* - Quality of the returned sequence. Defaults to 1.
3030

3131
#### Signature
3232

3333
```python
34-
def convertLottie2ALL(fileName: str, newFileName: str, quality: int = 1):
35-
...
34+
def convertLottie2ALL(fileName: str, newFileName: str, quality: int = 1): ...
3635
```
3736

3837

3938

4039
## convertLottie2GIF
4140

42-
[Show source in __init__.py:30](../../../pylottie/__init__.py#L30)
41+
[Show source in __init__.py:32](../../../pylottie/__init__.py#L32)
4342

4443
Convert to gif
4544

4645
#### Arguments
4746

48-
- `fileName` *str* - file path of the lottie file
49-
- `newFileName` *str* - name of the file to write
50-
- `quality` *int, optional* - Quality of the returned sequence. Defaults to 1.
47+
----
48+
- `fileName` *str* - file path of the lottie file
49+
- `newFileName` *str* - name of the file to write
50+
- `quality` *int, optional* - Quality of the returned sequence. Defaults to 1.
5151

5252
#### Signature
5353

5454
```python
55-
def convertLottie2GIF(fileName: str, newFileName: str, quality: int = 1):
56-
...
55+
def convertLottie2GIF(fileName: str, newFileName: str, quality: int = 1): ...
5756
```
5857

5958

6059

6160
## convertLottie2Webp
6261

63-
[Show source in __init__.py:41](../../../pylottie/__init__.py#L41)
62+
[Show source in __init__.py:45](../../../pylottie/__init__.py#L45)
6463

6564
Convert to webp
6665

6766
#### Arguments
6867

69-
- `fileName` *str* - file path of the lottie file
70-
- `newFileName` *str* - name of the file to write
71-
- `quality` *int, optional* - Quality of the returned sequence. Defaults to 1.
68+
----
69+
- `fileName` *str* - file path of the lottie file
70+
- `newFileName` *str* - name of the file to write
71+
- `quality` *int, optional* - Quality of the returned sequence. Defaults to 1.
7272

7373
#### Signature
7474

7575
```python
76-
def convertLottie2Webp(fileName: str, newFileName: str, quality: int = 1):
77-
...
76+
def convertLottie2Webp(fileName: str, newFileName: str, quality: int = 1): ...
7877
```
7978

8079

8180

8281
## convertLotties2PIL
8382

84-
[Show source in __init__.py:137](../../../pylottie/__init__.py#L137)
83+
[Show source in __init__.py:149](../../../pylottie/__init__.py#L149)
8584

8685
Convert list of lottie files to a list of images with a duration.
8786

8887
#### Arguments
8988

90-
- `fileNames` *list[str]* - list of file paths of the lottie files
91-
- `quality` *int, optional* - Quality of the returned sequence. Defaults to 1.
89+
----
90+
- `fileNames` *list[str]* - list of file paths of the lottie files
91+
- `quality` *int, optional* - Quality of the returned sequence. Defaults to 1.
9292

9393
#### Returns
9494

95-
- `list[tuple[list[Image],` *float]]* - pil images to write to gif/ webp and duration
95+
-------
96+
- `list[tuple[list[Image],` *float]]* - pil images to write to gif/ webp and duration
9697

9798
#### Signature
9899

99100
```python
100101
def convertLotties2PIL(
101102
fileNames: list[str], quality: int = 1
102-
) -> list[tuple[list[Image.Image], float]]:
103-
...
103+
) -> list[tuple[list[Image.Image], float]]: ...
104104
```
105105

106106

107107

108108
## convertMultLottie2ALL
109109

110-
[Show source in __init__.py:52](../../../pylottie/__init__.py#L52)
110+
[Show source in __init__.py:58](../../../pylottie/__init__.py#L58)
111111

112112
Convert to gif and webp
113113

114114
#### Arguments
115115

116-
- `fileNames` *list[str]* - list of file path to the lottie files
117-
- `newFileNames` *list[str]* - name of the files to write (omit file ext)
118-
- `quality` *int, optional* - Quality of the returned sequence. Defaults to 1.
116+
----
117+
- `fileNames` *list[str]* - list of file path to the lottie files
118+
- `newFileNames` *list[str]* - name of the files to write (omit file ext)
119+
- `quality` *int, optional* - Quality of the returned sequence. Defaults to 1.
119120

120121
#### Signature
121122

122123
```python
123124
def convertMultLottie2ALL(
124125
fileNames: list[str], newFileNames: list[str], quality: int = 1
125-
):
126-
...
126+
): ...
127127
```
128128

129129

130130

131131
## convertMultLottie2GIF
132132

133-
[Show source in __init__.py:84](../../../pylottie/__init__.py#L84)
133+
[Show source in __init__.py:92](../../../pylottie/__init__.py#L92)
134134

135135
Convert to gif
136136

137137
#### Arguments
138138

139-
- `fileNames` *list[str]* - list of file path to the lottie files
140-
- `newFileNames` *list[str]* - name of the files to write
141-
- `quality` *int, optional* - Quality of the returned sequence. Defaults to 1.
139+
----
140+
- `fileNames` *list[str]* - list of file path to the lottie files
141+
- `newFileNames` *list[str]* - name of the files to write
142+
- `quality` *int, optional* - Quality of the returned sequence. Defaults to 1.
142143

143144
#### Signature
144145

145146
```python
146147
def convertMultLottie2GIF(
147148
fileNames: list[str], newFileNames: list[str], quality: int = 1
148-
):
149-
...
149+
): ...
150150
```
151151

152152

153153

154154
## convertMultLottie2Webp
155155

156-
[Show source in __init__.py:108](../../../pylottie/__init__.py#L108)
156+
[Show source in __init__.py:118](../../../pylottie/__init__.py#L118)
157157

158158
Convert to webp
159159

160160
#### Arguments
161161

162-
- `fileNames` *list[str]* - list of file path to the lottie files
163-
- `newFileNames` *list[str]* - name of the files to write
164-
- `quality` *int, optional* - Quality of the returned sequence. Defaults to 1.
162+
----
163+
- `fileNames` *list[str]* - list of file path to the lottie files
164+
- `newFileNames` *list[str]* - name of the files to write
165+
- `quality` *int, optional* - Quality of the returned sequence. Defaults to 1.
165166

166167
#### Signature
167168

168169
```python
169170
def convertMultLottie2Webp(
170171
fileNames: list[str], newFileNames: list[str], quality: int = 1
171-
):
172-
...
172+
): ...
173173
```
174174

175175

176176

177177
## recordLotties
178178

179-
[Show source in __init__.py:177](../../../pylottie/__init__.py#L177)
179+
[Show source in __init__.py:192](../../../pylottie/__init__.py#L192)
180180

181181
Record the lottie data to a set of images
182182

183183
#### Arguments
184184

185-
- `lottieData` *str* - lottie data as string
186-
- `quality` *int, optional* - Quality of the returned sequence.
185+
----
186+
- `lottieData` *str* - lottie data as string
187+
- `quality` *int, optional* - Quality of the returned sequence.
187188

188189
#### Returns
189190

190-
- `list[list[int]]` - duration and number of frames
191+
-------
192+
- `list[list[int]]` - duration and number of frames
191193

192194
#### Signature
193195

194196
```python
195-
def recordLotties(lottieData: list[str], quality: int) -> list[list[int]]:
196-
...
197+
def recordLotties(lottieData: list[str], quality: int) -> list[list[int]]: ...
197198
```
198199

199200

200201

201202
## recordSingleLottie
202203

203-
[Show source in __init__.py:206](../../../pylottie/__init__.py#L206)
204+
[Show source in __init__.py:224](../../../pylottie/__init__.py#L224)
204205

205206
#### Signature
206207

207208
```python
208-
def recordSingleLottie(browser, lottieDataInstance, quality, index) -> list[int]:
209-
...
210-
```
211-
212-
209+
def recordSingleLottie(browser, lottieDataInstance, quality, index) -> list[int]: ...
210+
```

0 commit comments

Comments
 (0)