Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable pylint for more files #34

Merged
merged 2 commits into from
Apr 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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