Skip to content

Commit

Permalink
chore: use DeepSource for linting (#40)
Browse files Browse the repository at this point in the history
* style: format code with black and isort

Format code with black and isort

This commit fixes the style issues introduced in 9560017 according to the output
from black and isort.

Details: https://app.deepsource.com/gh/eshaan7/django-rest-durin/transform/100ee847-53f8-458c-a426-ba32adee2cca/

* remove lints from test.yml

* Update test.yml

---------

Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
Co-authored-by: Eshaan Bansal <eshaan7bansal@gmail.com>
  • Loading branch information
deepsource-autofix[bot] and eshaan7 committed May 3, 2023
1 parent 9560017 commit b50a970
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Linter & Tests
name: Tests

on:
push:
Expand Down
2 changes: 1 addition & 1 deletion durin/migrations/0003_alter_client_token_ttl.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Generated by Django 4.1.3 on 2022-11-25 18:39

from django.db import migrations, models

import durin.models


class Migration(migrations.Migration):

dependencies = [
("durin", "0002_client_throttlerate"),
]
Expand Down
24 changes: 1 addition & 23 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,33 +1,11 @@
[tox]
envlist =
flake8,
black,
isort,
py{35,36,37,38,39}-django22,
py{36,37,38,39,310}-django30
py{36,37,38,39,310}-django31
py{36,37,38,39,310}-django32
py{38,39,310}-django40

[testenv:flake8]
deps = flake8
changedir = {toxinidir}
commands = flake8 . --count

[testenv:black]
deps = black
changedir = {toxinidir}
commands = black . --check

[testenv:isort]
deps = isort
changedir = {toxinidir}
commands = isort --check-only --diff \
setup.py \
durin \
example_project \
tests

[testenv]
commands =
python manage.py migrate
Expand Down Expand Up @@ -56,4 +34,4 @@ python =
3.7: py37
3.8: py38
3.9: py39
3.10: py310, flake8, black, isort
3.10: py310

0 comments on commit b50a970

Please sign in to comment.