Skip to content

Commit

Permalink
Merge pull request #34 from digitalfabrik/pylint-more-files
Browse files Browse the repository at this point in the history
Enable pylint for more files
  • Loading branch information
timobrembeck committed Apr 21, 2023
2 parents 0dd0d31 + ac8676d commit 3413706
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion integreat_compass/integreat-compass-cli
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
"""Django's command-line utility for administrative tasks."""
import os
import sys
from django.core.management.commands.runserver import Command as runserver


def main():
"""Run administrative tasks."""
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "integreat_compass.core.settings")

try:
# pylint: disable=import-outside-toplevel
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ImportError(
Expand Down
6 changes: 6 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ dev = [
"build",
"pylint",
"pylint-django",
"pylint-per-file-ignores",
"pytest-circleci-parallelized",
"pytest-cov",
"pytest-django",
Expand Down Expand Up @@ -75,6 +76,7 @@ dev-pinned = [
"pprintpp==0.4.0",
"pylint==2.17.2",
"pylint-django==2.5.3",
"pylint-per-file-ignores==1.2.0",
"pylint-plugin-utils==0.7",
"pyproject_hooks==1.0.0",
"pytest==7.3.1",
Expand Down Expand Up @@ -110,6 +112,7 @@ skip-magic-trailing-comma = true
jobs = 0
load-plugins = [
"pylint_django",
"pylint_per_file_ignores",
"pylint.extensions.code_style",
"pylint.extensions.comparetozero",
"pylint.extensions.comparison_placement",
Expand Down Expand Up @@ -157,3 +160,6 @@ enable = [

[tool.pylint.reports]
output-format = "colorized"

[tool.pylint-per-file-ignores]
"/tests/"="unused-argument,missing-function-docstring"
Empty file added tests/cms/__init__.py
Empty file.
1 change: 0 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
ANONYMOUS = "ANONYMOUS"


# pylint: disable=unused-argument
@pytest.fixture(scope="session")
def load_test_data(django_db_setup, django_db_blocker):
"""
Expand Down
3 changes: 2 additions & 1 deletion tools/pylint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ require_installed

# Run pylint
echo "Starting code linting with pylint..." | print_info
pylint .
# Explicitly include cli which does not have a .py ending
pylint . integreat_compass/integreat-compass-cli
echo "✔ Linting finished" | print_success

0 comments on commit 3413706

Please sign in to comment.