Skip to content

Commit

Permalink
Switch to ruff for linting
Browse files Browse the repository at this point in the history
  • Loading branch information
alisaifee committed Jan 18, 2023
1 parent a7538a6 commit b922242
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 10 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,9 @@ jobs:
run: |
python -m pip install --upgrade pip setuptools wheel
pip install -r requirements/ci.txt
- name: Lint with flake8
- name: Lint with ruff
run: |
flake8 . --count --show-source --statistics
flake8 . --count --exit-zero --max-complexity=10
ruff flask_limiter tests
- name: Lint with black
run: |
black tests flask_limiter
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
lint:
black --check tests flask_limiter
mypy flask_limiter
flake8 flask_limiter tests
ruff flask_limiter tests

lint-fix:
black tests flask_limiter
mypy flask_limiter
isort -r --profile=black tests flask_limiter
autoflake8 -i -r tests flask_limiter
ruff --fix flask_limiter tests
6 changes: 3 additions & 3 deletions flask_limiter/extension.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
"""
Flask-Limiter Extension
"""
from __future__ import annotations

import dataclasses
Expand All @@ -9,9 +12,6 @@

from .util import get_qualified_name

"""
Flask-Limiter Extension
"""
import datetime
import itertools
import logging
Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[tool.ruff]
line-length=100

3 changes: 1 addition & 2 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
-r test.txt
-r docs.txt
autoflake8
ruff
black
flake8
isort
keyring
mypy

0 comments on commit b922242

Please sign in to comment.