Skip to content

Commit

Permalink
switch to just ruff, no more isort and black
Browse files Browse the repository at this point in the history
  • Loading branch information
sckott committed Mar 22, 2024
1 parent 66b17d1 commit 860a04b
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 21 deletions.
10 changes: 2 additions & 8 deletions .github/workflows/lint.yml
@@ -1,22 +1,16 @@
name: Lint w/ black, ruff
name: Lint w/ ruff

on: [push, pull_request]

jobs:
black:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: psf/black@stable

ruff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
python-version: "3.12"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
10 changes: 4 additions & 6 deletions Makefile
Expand Up @@ -32,14 +32,12 @@ upload:

.PHONY: lint-fix
lint-fix:
pip3 install -q -r requirements-dev.txt
isort .
black .
ruff check --fix habanero
source .env/bin/activate; \
pip3 install -q -r requirements-dev.txt; \
ruff check --select I --fix habanero

.PHONY: lint-check
lint-check:
source ./.env/bin/activate; \
pip3 install -q -r requirements-dev.txt
isort . --check-only
black . --check
ruff check habanero
11 changes: 8 additions & 3 deletions README.rst
@@ -1,7 +1,7 @@
habanero
========

|pypi| |docs| |ghactions| |coverage| |black|
|pypi| |docs| |ghactions| |coverage| |ruff|

This is a low level client for working with Crossref's search API. It's been named to be more generic, as other organizations are/will adopt Crossref's search API, making it possible to interact with all from one client.

Expand Down Expand Up @@ -142,15 +142,20 @@ Meta

.. |pypi| image:: https://badge.fury.io/py/habanero.svg
:target: https://badge.fury.io/py/habanero
:alt: pypi

.. |docs| image:: https://readthedocs.org/projects/habanero/badge/?version=latest
:target: http://habanero.rtfd.org/
:alt: Docs

.. |ghactions| image:: https://github.com/sckott/habanero/actions/workflows/python.yml/badge.svg?branch=main
:target: https://github.com/sckott/habanero/actions/workflows/python.yml
:alt: ghactions

.. |coverage| image:: https://codecov.io/gh/sckott/habanero/branch/main/graph/badge.svg?token=6RrgNAuQmR
:target: https://codecov.io/gh/sckott/habanero
:alt: coverage

.. |black| image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/psf/black
.. |ruff| image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json
:target: https://github.com/astral-sh/ruff
:alt: Ruff
4 changes: 2 additions & 2 deletions pyproject.toml
Expand Up @@ -10,11 +10,11 @@ exclude = [
"dist"
]

ignore = [
lint.ignore = [
"D102",
]

[tool.ruff.per-file-ignores]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["E402", "F401", "F403"]
"habanero/request_class.py" = ["E722"]
"test/*" = ["E501"]
Expand Down
2 changes: 0 additions & 2 deletions requirements-dev.txt
@@ -1,3 +1 @@
ruff==0.3.4
black==24.3.0
isort==5.13.2

0 comments on commit 860a04b

Please sign in to comment.