Skip to content

Commit

Permalink
Use ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
yuanx749 committed Oct 15, 2024
1 parent 28f651b commit 1cf1282
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 26 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python: ["3.7", "3.8", "3.9", "3.10"]
python: ["3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Generate coverage report
Expand All @@ -21,6 +21,8 @@ jobs:
pip install pytest-cov
pytest --cov=configargparser --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
verbose: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
16 changes: 5 additions & 11 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,9 @@ repos:
- id: end-of-file-fixer
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
- repo: https://github.com/psf/black
rev: 23.3.0
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.9
hooks:
- id: black
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort
- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
hooks:
- id: flake8
- id: ruff
args: [--fix, --show-fixes]
- id: ruff-format
2 changes: 1 addition & 1 deletion configargparser/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""A package to help automatically create command-line interface from configuration or code."""

__version__ = "1.3.2"
__version__ = "1.4.0"

from .cap import ConfigArgumentParser
from .tap import TypeArgumentParser
Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[tool.ruff.lint]
select = ["E4", "E7", "E9", "F", "I"]
13 changes: 2 additions & 11 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,12 @@ long_description_content_type = text/markdown
keywords = CLI, option, argument, parameter, flag, configuration, parser, command, comment, dataclass, Python

[options]
python_requires = >=3.7
python_requires = >=3.8
packages = configargparser

[options.extras_require]
dev =
pre-commit
black==23.3.0
flake8==6.0.0
isort==5.12.0
pytest
pytest-cov

[flake8]
extend-ignore =
E402
E501
extend-exclude =
.venv
ruff

0 comments on commit 1cf1282

Please sign in to comment.