added stylecheck job to github action
This commit is contained in:
1 parent
3652cebd9f
commit
2d5551b80d
2 files changed
+20
-4
No files matched your search
@@ -3,6 +3,23 @@ name: Python package
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
stylecheck:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Setup Python 3.12
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: 3.12
|
||||
- name: Install Dependencies
|
||||
run: |
|
||||
pip install ".[test]"
|
||||
mypy src || true
|
||||
mypy --install-types --non-interactive
|
||||
- name: Stylecheck
|
||||
run: |
|
||||
mypy --strict src
|
||||
pycodestyle --max-line-length 120 src
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
|
||||
@@ -2,18 +2,17 @@ import bs4
|
||||
from .formatters import formatters
|
||||
|
||||
|
||||
def main():
|
||||
def main() -> None:
|
||||
with open("test.html", "r") as file:
|
||||
soup = bs4.BeautifulSoup(file, "html.parser")
|
||||
|
||||
for formatter in formatters:
|
||||
formatter.format(soup)
|
||||
|
||||
formatter = bs4.formatter.HTMLFormatter(indent=4)
|
||||
with open("out.html", "w") as file:
|
||||
file.write("{% load static %}\n")
|
||||
file.write(soup.prettify(formatter=formatter))
|
||||
file.write(soup.prettify(formatter=bs4.formatter.HTMLFormatter(indent=4)))
|
||||
|
||||
|
||||
def command_entry():
|
||||
def command_entry() -> None:
|
||||
print("ok")
|
||||
Reference in new issue
Block a user