Skip to content

Commit a9422ad

Browse files
committed
linting
1 parent fe5bd0a commit a9422ad

File tree

2 files changed

+60
-55
lines changed

2 files changed

+60
-55
lines changed

.github/workflows/release.yml

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,34 @@
11
name: Release to PyPI
22

33
on:
4-
push:
5-
tags:
6-
- '*'
4+
push:
5+
tags:
6+
- '*'
77

88
jobs:
9-
release:
10-
runs-on: ubuntu-latest
11-
environment:
12-
name: pypi
13-
url: https://pypi.org/project/pyscript
14-
permissions:
15-
id-token: write
16-
steps:
17-
- name: Checkout code
18-
uses: actions/checkout@v2
9+
release:
10+
runs-on: ubuntu-latest
11+
environment:
12+
name: pypi
13+
url: https://pypi.org/project/pyscript
14+
permissions:
15+
id-token: write
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v2
1919

20-
- name: Set up Python
21-
uses: actions/setup-python@v2
22-
with:
23-
python-version: 3.11
20+
- name: Set up Python
21+
uses: actions/setup-python@v2
22+
with:
23+
python-version: 3.11
2424

25-
- name: Install dependencies
26-
run: pip install -r requirements.txt
25+
- name: Install dependencies
26+
run: pip install -r requirements.txt
2727

28-
- name: Build and package
29-
run: |
30-
pip install wheel
31-
python setup.py sdist bdist_wheel
28+
- name: Build and package
29+
run: |
30+
pip install wheel
31+
python setup.py sdist bdist_wheel
3232
33-
- name: Upload to PyPI
34-
uses: pypa/gh-action-pypi-publish@release/v1
33+
- name: Upload to PyPI
34+
uses: pypa/gh-action-pypi-publish@release/v1

setup.py

Lines changed: 35 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,23 @@
11
import os
2+
23
from setuptools import setup
34

5+
46
def read_version():
5-
with open("src/pyscript/version", "r") as f:
7+
with open("src/pyscript/version") as f:
68
return f.read().strip("\n")
79

10+
811
def check_tag_version():
912
tag = os.getenv("GITHUB_REF")
1013
expected_version = read_version()
1114
if tag != f"refs/tags/{expected_version}":
12-
raise Exception(f"Tag '{tag}' does not match the expected "
13-
f"version '{expected_version}'")
15+
raise Exception(
16+
f"Tag '{tag}' does not match the expected " f"version '{expected_version}'"
17+
)
1418

15-
with open("README.md", "r") as fh:
19+
20+
with open("README.md") as fh:
1621
long_description = fh.read()
1722

1823
check_tag_version()
@@ -29,53 +34,53 @@ def check_tag_version():
2934
license="Apache-2.0",
3035
install_requires=[
3136
'importlib-metadata; python_version<"3.8"',
32-
'Jinja2<3.2',
33-
'pluggy<1.3',
34-
'rich<=13.7.1',
35-
'toml<0.11',
36-
'typer<=0.9.0',
37-
'platformdirs<4.3',
38-
'requests<=2.31.0',
37+
"Jinja2<3.2",
38+
"pluggy<1.3",
39+
"rich<=13.7.1",
40+
"toml<0.11",
41+
"typer<=0.9.0",
42+
"platformdirs<4.3",
43+
"requests<=2.31.0",
3944
],
4045
python_requires=">=3.9",
4146
keywords=["pyscript", "cli", "pyodide", "micropython", "pyscript-cli"],
4247
classifiers=[
43-
'Development Status :: 4 - Beta',
44-
'Environment :: Console',
45-
'Intended Audience :: Developers',
46-
'License :: OSI Approved :: Apache Software License',
47-
'Programming Language :: Python :: 3',
48-
'Programming Language :: Python :: 3.9',
49-
'Programming Language :: Python :: 3.10',
50-
'Topic :: Software Development :: Code Generators',
51-
'Topic :: Software Development :: Libraries :: Python Modules',
52-
'Topic :: Software Development :: Pre-processors',
48+
"Development Status :: 4 - Beta",
49+
"Environment :: Console",
50+
"Intended Audience :: Developers",
51+
"License :: OSI Approved :: Apache Software License",
52+
"Programming Language :: Python :: 3",
53+
"Programming Language :: Python :: 3.9",
54+
"Programming Language :: Python :: 3.10",
55+
"Topic :: Software Development :: Code Generators",
56+
"Topic :: Software Development :: Libraries :: Python Modules",
57+
"Topic :: Software Development :: Pre-processors",
5358
],
5459
extras_require={
5560
"dev": [
5661
"coverage<7.3",
5762
"mypy<=1.4.1",
5863
"pytest<7.5",
5964
"types-toml<0.11",
60-
"types-requests"
65+
"types-requests",
6166
],
6267
"docs": [
6368
"Sphinx<5.2",
6469
"sphinx-autobuild<2021.4.0",
6570
"sphinx-autodoc-typehints<1.20",
6671
"myst-parser<0.19.3",
67-
"pydata-sphinx-theme<0.13.4"
68-
]
72+
"pydata-sphinx-theme<0.13.4",
73+
],
6974
},
7075
entry_points={
71-
'console_scripts': [
72-
'pyscript = pyscript.cli:app',
76+
"console_scripts": [
77+
"pyscript = pyscript.cli:app",
7378
],
7479
},
7580
project_urls={
76-
'Documentation': 'https://docs.pyscript.net',
77-
'Examples': 'https://pyscript.com/@examples',
78-
'Homepage': 'https://pyscript.net',
79-
'Repository': 'https://github.com/pyscript/pyscript-cli',
81+
"Documentation": "https://docs.pyscript.net",
82+
"Examples": "https://pyscript.com/@examples",
83+
"Homepage": "https://pyscript.net",
84+
"Repository": "https://github.com/pyscript/pyscript-cli",
8085
},
8186
)

0 commit comments

Comments
 (0)