Skip to content

Commit

Permalink
fix: Add pylintrc to configure pylint
Browse files Browse the repository at this point in the history
  • Loading branch information
dragonejt committed Jul 14, 2024
1 parent 4b95e4a commit 74aecb1
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/integrate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
pipenv run coverage xml
- name: Lint Project
run: pipenv run pylint --load-plugins pylint_django --django-settings-module=sibyl.settings --exit-zero sibyl community psychopass dominator
run: pipenv run pylint sibyl community psychopass dominator

- name: Check Formatting
run: pipenv run black --check .
Expand Down
16 changes: 16 additions & 0 deletions .pylintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[MAIN]
django-settings-module=sibyl.settings

load-plugins=
pylint_django

ignore-paths=
.*/migrations/

exit-zero=True

[MESSAGES CONTROL]
disable=
C0114,
C0115,
C0116
4 changes: 2 additions & 2 deletions community/tests.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from rest_framework.test import APITestCase
from rest_framework import status
from django.contrib.auth import get_user_model
from django.utils.crypto import get_random_string
from rest_framework.test import APITestCase
from rest_framework import status
from rest_framework.authtoken.models import Token
from community.views import Community, CommunitySerializer

Expand Down
14 changes: 7 additions & 7 deletions dominator/tests.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import random
from rest_framework.test import APITestCase
from rest_framework import status
from random import random, randint
from django.contrib.auth import get_user_model
from django.utils.crypto import get_random_string
from rest_framework.test import APITestCase
from rest_framework import status
from rest_framework.authtoken.models import Token
from dominator.views import (
Community,
Expand Down Expand Up @@ -48,8 +48,8 @@ def test_put(self) -> None:
self.dominator.toxicity_threshold,
MemberDominator._meta.get_field("toxicity_threshold").get_default(),
)
toxicity_action = random.randint(0, 4)
toxicity_threshold = random.random()
toxicity_action = randint(0, 4)
toxicity_threshold = random()

response = self.client.put(
self.url,
Expand Down Expand Up @@ -113,8 +113,8 @@ def test_put(self) -> None:
self.dominator.toxicity_threshold,
MessageDominator._meta.get_field("toxicity_threshold").get_default(),
)
toxicity_action = random.randint(0, 4)
toxicity_threshold = random.random()
toxicity_action = randint(0, 4)
toxicity_threshold = random()

response = self.client.put(
self.url,
Expand Down
2 changes: 1 addition & 1 deletion psychopass/models.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
from types import NoneType
from django.db import models
from django.contrib.auth import get_user_model
from community.models import Community
from rest_framework.serializers import (
ModelSerializer,
IntegerField,
CharField,
DictField,
)
from community.models import Community

# Create your models here

Expand Down
2 changes: 1 addition & 1 deletion psychopass/tests.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from random import random
from rest_framework.test import APITestCase
from django.contrib.auth import get_user_model
from django.utils.crypto import get_random_string
from rest_framework.test import APITestCase
from rest_framework import status
from rest_framework.authtoken.models import Token
from psychopass.views import (
Expand Down

0 comments on commit 74aecb1

Please sign in to comment.