-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce ruff code checker and formatter
- make code formatting consistent - discover issues like #6 earlier
- Loading branch information
Showing
4 changed files
with
55 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: pre-commit check | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
pre-commit: | ||
runs-on: ubuntu-24.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.13' | ||
- uses: astral-sh/setup-uv@v4 | ||
- name: pre-commit | ||
run: uvx pre-commit run --all | ||
env: | ||
RUFF_OUTPUT_FORMAT: github | ||
- name: show diff | ||
run: git diff | ||
if: always() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# See https://pre-commit.com for more information | ||
# See https://pre-commit.com/hooks.html for more hooks | ||
repos: | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: v0.8.0 | ||
hooks: | ||
- id: ruff | ||
args: [--fix, --exit-non-zero-on-fix] | ||
- id: ruff-format |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
from setuptools import setup, find_packages | ||
|
||
setup( | ||
name='altcha', | ||
version='0.1.5', | ||
description='A library for creating and verifying challenges for ALTCHA.', | ||
long_description=open('README.md').read(), | ||
long_description_content_type='text/markdown', | ||
author='Daniel Regeci', | ||
author_email='[email protected]', | ||
url='https://github.com/altcha-org/altcha-lib-py', | ||
name="altcha", | ||
version="0.1.5", | ||
description="A library for creating and verifying challenges for ALTCHA.", | ||
long_description=open("README.md").read(), | ||
long_description_content_type="text/markdown", | ||
author="Daniel Regeci", | ||
author_email="[email protected]", | ||
url="https://github.com/altcha-org/altcha-lib-py", | ||
packages=find_packages(), | ||
classifiers=[ | ||
'Programming Language :: Python :: 3', | ||
'License :: OSI Approved :: MIT License', | ||
'Operating System :: OS Independent', | ||
"Programming Language :: Python :: 3", | ||
"License :: OSI Approved :: MIT License", | ||
"Operating System :: OS Independent", | ||
], | ||
python_requires='>=3.6', | ||
python_requires=">=3.6", | ||
install_requires=[ | ||
# Add any dependencies here | ||
], | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters