Skip to content

Commit

Permalink
Fix issues found by ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-k committed Feb 28, 2024
1 parent cc57346 commit ff0e3ab
Show file tree
Hide file tree
Showing 8 changed files with 4 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
Checks that Pylint does not complain Postgres model fields.
"""
# pylint: disable=C0111,W5101
from __future__ import print_function

from django.contrib.postgres import fields
from django.db import models
Expand Down
4 changes: 1 addition & 3 deletions pylint_django/tests/input/func_hard_coded_auth_user.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# pylint: disable=missing-docstring, wildcard-import, unused-wildcard-import
# flake8: noqa=F401, F403

from django.contrib.auth.models import * # [imported-auth-user]
from django.contrib.auth.models import User # [imported-auth-user]
from django.contrib.auth.models import * # [imported-auth-user] # noqa: F403
from django.db import models


Expand Down
1 change: 0 additions & 1 deletion pylint_django/tests/input/func_noerror_form_fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
methods on Django form forms.
"""
# pylint: disable=missing-docstring
from __future__ import print_function

from datetime import date, datetime

Expand Down
1 change: 0 additions & 1 deletion pylint_django/tests/input/func_noerror_model_fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
methods on Django model fields.
"""
# pylint: disable=missing-docstring
from __future__ import print_function

from datetime import date, datetime
from decimal import Decimal
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
and https://docs.djangoproject.com/en/1.9/ref/models/meta/)
"""
# pylint: disable=missing-docstring
from __future__ import print_function

from django.db import models

Expand Down
1 change: 0 additions & 1 deletion pylint_django/tests/input/func_noerror_uuid_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
Checks that Pylint does not complain about UUID fields.
"""
# pylint: disable=missing-class-docstring,missing-function-docstring
from __future__ import print_function

from django.db import models

Expand Down
2 changes: 1 addition & 1 deletion pylint_django/tests/input/migrations/0002_new_column.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
> ... adding columns with default values will cause a full rewrite of
> the table, for a time proportional to its size.
> For this reason, its recommended you always create new columns with
> For this reason, it's recommended you always create new columns with
> null=True, as this way they will be added immediately.
"""
# pylint: disable=missing-docstring, invalid-name
Expand Down
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ max-line-length = 120

[tool.ruff]
line-length = 120

[tool.ruff.lint]
select = [
"E", # pycodestyle
"F", # pyflakes
Expand Down

0 comments on commit ff0e3ab

Please sign in to comment.