Skip to content

Commit

Permalink
Add ruff to workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
wavy-cat committed Mar 9, 2024
1 parent beca67c commit 9f8f17d
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 3 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Lint

on:
push:
branches:
- master
pull_request:
types:
- opened
- synchronize

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- uses: actions/cache@v3
id: cache
with:
path: ${{ env.pythonLocation }}
key: ${{ runner.os }}-python-${{ env.pythonLocation }}-lint
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: pip install Pillow
- name: Lint
run: |
ruff check . --target-version py38
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,7 @@ asyncio.run(main())
```

> [!NOTE]
> Although `generate()`, `scale()` and `raw` are of type `PIL.Image.Image`, suitable for saving a file, it is better to
> use the built-in asynchronous `save` method instead.
> Although the methods `generate()`, `scale()` and the variable `raw` return values of type `PIL.Image.Image`, suitable for saving a file, it's advisable to use the built-in asynchronous save method instead.
* Specifying a style

Expand All @@ -119,7 +118,9 @@ totem.raw.save('totem.png')
```

> [!NOTE]
> The generate() method accepts **kwargs, which will be passed on to the style class. None of the built-in styles support them.
> The `generate()` method accepts **kwargs, which will be passed on to the style class. None of the built-in styles support them.
> STTStyle taken from https://github.com/UnFamousSoul/STT
## Enum values

Expand Down

0 comments on commit 9f8f17d

Please sign in to comment.