From 8778a088e6d05015e6a6ade0e11d1fce5184862c Mon Sep 17 00:00:00 2001 From: yann Date: Tue, 10 Jun 2025 16:07:12 +0200 Subject: [PATCH] added flake, report, updated requirements --- flake-report/back.svg | 73 +++ flake-report/file.svg | 64 +++ flake-report/index.html | 209 +++++++ .../softdesk.authentication.admin.report.html | 73 +++ .../softdesk.authentication.admin.source.html | 41 ++ ...cation.migrations.0001_initial.report.html | 161 ++++++ ...cation.migrations.0001_initial.source.html | 281 +++++++++ .../softdesk.authentication.tests.report.html | 73 +++ .../softdesk.authentication.tests.source.html | 41 ++ .../softdesk.softdesk.settings.report.html | 152 +++++ .../softdesk.softdesk.settings.source.html | 542 ++++++++++++++++++ .../softdesk.support.admin.report.html | 96 ++++ .../softdesk.support.admin.source.html | 101 ++++ ...upport.migrations.0001_initial.report.html | 189 ++++++ ...upport.migrations.0001_initial.source.html | 389 +++++++++++++ ...ect_active_alter_issue_project.report.html | 73 +++ ...ect_active_alter_issue_project.source.html | 104 ++++ ...ions.0004_alter_project_author.report.html | 73 +++ ...ions.0004_alter_project_author.source.html | 89 +++ ...ions.0005_alter_project_author.report.html | 73 +++ ...ions.0005_alter_project_author.source.html | 89 +++ ...ions.0006_alter_project_author.report.html | 73 +++ ...ions.0006_alter_project_author.source.html | 89 +++ ...or_active_alter_project_author.report.html | 73 +++ ...or_active_alter_project_author.source.html | 110 ++++ ...or_alter_issue_author_and_more.report.html | 119 ++++ ...or_alter_issue_author_and_more.source.html | 242 ++++++++ ...ty_alter_issue_status_and_more.report.html | 91 +++ ...ty_alter_issue_status_and_more.source.html | 134 +++++ ...ue_priority_alter_issue_status.report.html | 84 +++ ...ue_priority_alter_issue_status.source.html | 110 ++++ ...tions.0013_alter_issue_project.report.html | 73 +++ ...tions.0013_alter_issue_project.source.html | 89 +++ ...tions.0014_alter_issue_project.report.html | 73 +++ ...tions.0014_alter_issue_project.source.html | 89 +++ ...ions.0015_alter_project_author.report.html | 73 +++ ...ions.0015_alter_project_author.source.html | 95 +++ ...ue_author_alter_project_author.report.html | 84 +++ ...ue_author_alter_project_author.source.html | 119 ++++ ...projectcontributor_contributor.report.html | 73 +++ ...projectcontributor_contributor.source.html | 95 +++ .../softdesk.support.permissions.report.html | 73 +++ .../softdesk.support.permissions.source.html | 86 +++ .../softdesk.support.tests.report.html | 73 +++ .../softdesk.support.tests.source.html | 41 ++ flake-report/styles.css | 327 +++++++++++ requirements.txt | 9 + softdesk/authentication/models.py | 3 +- softdesk/authentication/serializers.py | 3 - softdesk/authentication/views.py | 9 +- softdesk/softdesk/urls.py | 15 +- softdesk/support/models.py | 10 +- softdesk/support/permissions.py | 3 - softdesk/support/serializers.py | 12 +- softdesk/support/views.py | 49 +- 55 files changed, 5633 insertions(+), 54 deletions(-) create mode 100644 flake-report/back.svg create mode 100644 flake-report/file.svg create mode 100644 flake-report/index.html create mode 100644 flake-report/softdesk.authentication.admin.report.html create mode 100644 flake-report/softdesk.authentication.admin.source.html create mode 100644 flake-report/softdesk.authentication.migrations.0001_initial.report.html create mode 100644 flake-report/softdesk.authentication.migrations.0001_initial.source.html create mode 100644 flake-report/softdesk.authentication.tests.report.html create mode 100644 flake-report/softdesk.authentication.tests.source.html create mode 100644 flake-report/softdesk.softdesk.settings.report.html create mode 100644 flake-report/softdesk.softdesk.settings.source.html create mode 100644 flake-report/softdesk.support.admin.report.html create mode 100644 flake-report/softdesk.support.admin.source.html create mode 100644 flake-report/softdesk.support.migrations.0001_initial.report.html create mode 100644 flake-report/softdesk.support.migrations.0001_initial.source.html create mode 100644 flake-report/softdesk.support.migrations.0002_project_active_alter_issue_project.report.html create mode 100644 flake-report/softdesk.support.migrations.0002_project_active_alter_issue_project.source.html create mode 100644 flake-report/softdesk.support.migrations.0004_alter_project_author.report.html create mode 100644 flake-report/softdesk.support.migrations.0004_alter_project_author.source.html create mode 100644 flake-report/softdesk.support.migrations.0005_alter_project_author.report.html create mode 100644 flake-report/softdesk.support.migrations.0005_alter_project_author.source.html create mode 100644 flake-report/softdesk.support.migrations.0006_alter_project_author.report.html create mode 100644 flake-report/softdesk.support.migrations.0006_alter_project_author.source.html create mode 100644 flake-report/softdesk.support.migrations.0007_contributor_active_alter_project_author.report.html create mode 100644 flake-report/softdesk.support.migrations.0007_contributor_active_alter_project_author.source.html create mode 100644 flake-report/softdesk.support.migrations.0010_alter_comment_author_alter_issue_author_and_more.report.html create mode 100644 flake-report/softdesk.support.migrations.0010_alter_comment_author_alter_issue_author_and_more.source.html create mode 100644 flake-report/softdesk.support.migrations.0011_alter_issue_priority_alter_issue_status_and_more.report.html create mode 100644 flake-report/softdesk.support.migrations.0011_alter_issue_priority_alter_issue_status_and_more.source.html create mode 100644 flake-report/softdesk.support.migrations.0012_alter_issue_priority_alter_issue_status.report.html create mode 100644 flake-report/softdesk.support.migrations.0012_alter_issue_priority_alter_issue_status.source.html create mode 100644 flake-report/softdesk.support.migrations.0013_alter_issue_project.report.html create mode 100644 flake-report/softdesk.support.migrations.0013_alter_issue_project.source.html create mode 100644 flake-report/softdesk.support.migrations.0014_alter_issue_project.report.html create mode 100644 flake-report/softdesk.support.migrations.0014_alter_issue_project.source.html create mode 100644 flake-report/softdesk.support.migrations.0015_alter_project_author.report.html create mode 100644 flake-report/softdesk.support.migrations.0015_alter_project_author.source.html create mode 100644 flake-report/softdesk.support.migrations.0016_alter_issue_author_alter_project_author.report.html create mode 100644 flake-report/softdesk.support.migrations.0016_alter_issue_author_alter_project_author.source.html create mode 100644 flake-report/softdesk.support.migrations.0017_alter_projectcontributor_contributor.report.html create mode 100644 flake-report/softdesk.support.migrations.0017_alter_projectcontributor_contributor.source.html create mode 100644 flake-report/softdesk.support.permissions.report.html create mode 100644 flake-report/softdesk.support.permissions.source.html create mode 100644 flake-report/softdesk.support.tests.report.html create mode 100644 flake-report/softdesk.support.tests.source.html create mode 100644 flake-report/styles.css diff --git a/flake-report/back.svg b/flake-report/back.svg new file mode 100644 index 0000000..ce80d2e --- /dev/null +++ b/flake-report/back.svg @@ -0,0 +1,73 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + diff --git a/flake-report/file.svg b/flake-report/file.svg new file mode 100644 index 0000000..98706cf --- /dev/null +++ b/flake-report/file.svg @@ -0,0 +1,64 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + diff --git a/flake-report/index.html b/flake-report/index.html new file mode 100644 index 0000000..eb32bbf --- /dev/null +++ b/flake-report/index.html @@ -0,0 +1,209 @@ + + + + flake8 violations + + + + +
+
+

flake8 violations

+

Generated on 2025-06-10 16:06 + with Installed plugins: flake8-html: 0.4.3, mccabe: 0.7.0, pycodestyle: 2.13.0, pyflakes: 3.3.2 +

+ +
+ + \ No newline at end of file diff --git a/flake-report/softdesk.authentication.admin.report.html b/flake-report/softdesk.authentication.admin.report.html new file mode 100644 index 0000000..aa5f10a --- /dev/null +++ b/flake-report/softdesk.authentication.admin.report.html @@ -0,0 +1,73 @@ + + + + flake8 violations: softdesk/authentication/admin.py + + + + + +
+
+ +

+ + ⬅ + softdesk/authentication/admin.py + +

+ + +
+ + \ No newline at end of file diff --git a/flake-report/softdesk.authentication.admin.source.html b/flake-report/softdesk.authentication.admin.source.html new file mode 100644 index 0000000..54f64a1 --- /dev/null +++ b/flake-report/softdesk.authentication.admin.source.html @@ -0,0 +1,41 @@ + + + + softdesk/authentication/admin.py - flake8 annotated source + + + + +
+
+

+ + ⬅ + softdesk/authentication/admin.py source + +

+ +
+
+
    + +
  • + + E265 + + Block comment should start with '# '
  • + +
1 #from django.contrib import admin +
+
2   +
+
3 # Register your models here. +
+ +
+
+ + \ No newline at end of file diff --git a/flake-report/softdesk.authentication.migrations.0001_initial.report.html b/flake-report/softdesk.authentication.migrations.0001_initial.report.html new file mode 100644 index 0000000..2708148 --- /dev/null +++ b/flake-report/softdesk.authentication.migrations.0001_initial.report.html @@ -0,0 +1,161 @@ + + + + flake8 violations: softdesk/authentication/migrations/0001_initial.py + + + + + +
+
+ +

+ + ⬅ + softdesk/authentication/migrations/0001_initial.py + +

+ + +
+ + \ No newline at end of file diff --git a/flake-report/softdesk.authentication.migrations.0001_initial.source.html b/flake-report/softdesk.authentication.migrations.0001_initial.source.html new file mode 100644 index 0000000..f8fc7b6 --- /dev/null +++ b/flake-report/softdesk.authentication.migrations.0001_initial.source.html @@ -0,0 +1,281 @@ + + + + softdesk/authentication/migrations/0001_initial.py - flake8 annotated source + + + + +
+
+

+ + ⬅ + softdesk/authentication/migrations/0001_initial.py source + +

+ +
+
1 # Generated by Django 5.2.1 on 2025-05-23 03:58 +
+
2   +
+
3 import django.contrib.auth.models +
+
4 import django.contrib.auth.validators +
+
5 import django.utils.timezone +
+
6 from django.db import migrations, models +
+
7   +
+
8   +
+
9 class Migration(migrations.Migration): +
+
10   +
+
11 initial = True +
+
12   +
+
13 dependencies = [ +
+
14 ('auth', '0012_alter_user_first_name_max_length'), +
+
15 ] +
+
16   +
+
17 operations = [ +
+
18 migrations.CreateModel( +
+
19 name='User', +
+
20 fields=[ +
+
+
    + +
  • + + E501 + + Line too long (117 > 79 characters)
  • + +
21 ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), +
+
+
    + +
  • + + E501 + + Line too long (88 > 79 characters)
  • + +
22 ('password', models.CharField(max_length=128, verbose_name='password')), +
+
+
    + +
  • + + E501 + + Line too long (103 > 79 characters)
  • + +
23 ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')), +
+
+
    + +
  • + + E501 + + Line too long (196 > 79 characters)
  • + +
24 ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')), +
+
+
    + +
  • + + E501 + + Line too long (329 > 79 characters)
  • + +
25 ('username', models.CharField(error_messages={'unique': 'A user with that username already exists.'}, help_text='Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.', max_length=150, unique=True, validators=[django.contrib.auth.validators.UnicodeUsernameValidator()], verbose_name='username')), +
+
+
    + +
  • + + E501 + + Line too long (104 > 79 characters)
  • + +
26 ('first_name', models.CharField(blank=True, max_length=150, verbose_name='first name')), +
+
+
    + +
  • + + E501 + + Line too long (102 > 79 characters)
  • + +
27 ('last_name', models.CharField(blank=True, max_length=150, verbose_name='last name')), +
+
+
    + +
  • + + E501 + + Line too long (103 > 79 characters)
  • + +
28 ('email', models.EmailField(blank=True, max_length=254, verbose_name='email address')), +
+
+
    + +
  • + + E501 + + Line too long (165 > 79 characters)
  • + +
29 ('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='staff status')), +
+
+
    + +
  • + + E501 + + Line too long (203 > 79 characters)
  • + +
30 ('is_active', models.BooleanField(default=True, help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')), +
+
+
    + +
  • + + E501 + + Line too long (117 > 79 characters)
  • + +
31 ('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')), +
+
32 ('can_be_contacted', models.BooleanField(default=False)), +
+
33 ('can_data_be_shared', models.BooleanField(default=False)), +
+
34 ('age', models.IntegerField()), +
+
+
    + +
  • + + E501 + + Line too long (266 > 79 characters)
  • + +
35 ('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.group', verbose_name='groups')), +
+
+
    + +
  • + + E501 + + Line too long (229 > 79 characters)
  • + +
36 ('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.permission', verbose_name='user permissions')), +
+
37 ], +
+
38 options={ +
+
39 'verbose_name': 'user', +
+
40 'verbose_name_plural': 'users', +
+
41 'abstract': False, +
+
42 }, +
+
43 managers=[ +
+
44 ('objects', django.contrib.auth.models.UserManager()), +
+
45 ], +
+
46 ), +
+
47 ] +
+ +
+
+ + \ No newline at end of file diff --git a/flake-report/softdesk.authentication.tests.report.html b/flake-report/softdesk.authentication.tests.report.html new file mode 100644 index 0000000..84b5a7c --- /dev/null +++ b/flake-report/softdesk.authentication.tests.report.html @@ -0,0 +1,73 @@ + + + + flake8 violations: softdesk/authentication/tests.py + + + + + +
+
+ +

+ + ⬅ + softdesk/authentication/tests.py + +

+ + +
+ + \ No newline at end of file diff --git a/flake-report/softdesk.authentication.tests.source.html b/flake-report/softdesk.authentication.tests.source.html new file mode 100644 index 0000000..db2c9d4 --- /dev/null +++ b/flake-report/softdesk.authentication.tests.source.html @@ -0,0 +1,41 @@ + + + + softdesk/authentication/tests.py - flake8 annotated source + + + + +
+
+

+ + ⬅ + softdesk/authentication/tests.py source + +

+ +
+
+
    + +
  • + + F401 + + 'django.test.TestCase' imported but unused
  • + +
1 from django.test import TestCase +
+
2   +
+
3 # Create your tests here. +
+ +
+
+ + \ No newline at end of file diff --git a/flake-report/softdesk.softdesk.settings.report.html b/flake-report/softdesk.softdesk.settings.report.html new file mode 100644 index 0000000..1b540d4 --- /dev/null +++ b/flake-report/softdesk.softdesk.settings.report.html @@ -0,0 +1,152 @@ + + + + flake8 violations: softdesk/softdesk/settings.py + + + + + +
+
+ +

+ + ⬅ + softdesk/softdesk/settings.py + +

+ + +
+ + \ No newline at end of file diff --git a/flake-report/softdesk.softdesk.settings.source.html b/flake-report/softdesk.softdesk.settings.source.html new file mode 100644 index 0000000..0960c83 --- /dev/null +++ b/flake-report/softdesk.softdesk.settings.source.html @@ -0,0 +1,542 @@ + + + + softdesk/softdesk/settings.py - flake8 annotated source + + + + +
+
+

+ + ⬅ + softdesk/softdesk/settings.py source + +

+ +
+
1 """ +
+
2 Django settings for softdesk project. +
+
3   +
+
4 Generated by 'django-admin startproject' using Django 5.2.1. +
+
5   +
+
6 For more information on this file, see +
+
7 https://docs.djangoproject.com/en/5.2/topics/settings/ +
+
8   +
+
9 For the full list of settings and their values, see +
+
10 https://docs.djangoproject.com/en/5.2/ref/settings/ +
+
11 """ +
+
12   +
+
13 from pathlib import Path +
+
14 from datetime import timedelta +
+
15   +
+
16 # Build paths inside the project like this: BASE_DIR / 'subdir'. +
+
17 BASE_DIR = Path(__file__).resolve().parent.parent +
+
18   +
+
19   +
+
20 # Quick-start development settings - unsuitable for production +
+
21 # See https://docs.djangoproject.com/en/5.2/howto/deployment/checklist/ +
+
22   +
+
23 # SECURITY WARNING: keep the secret key used in production secret! +
+
+
    + +
  • + + E501 + + Line too long (81 > 79 characters)
  • + +
24 SECRET_KEY = 'django-insecure-_vs15jeip&ba(7@n!ptk+b0$4fjhj-esfz1qrhk8+eh4d6k%br' +
+
25   +
+
26 # SECURITY WARNING: don't run with debug turned on in production! +
+
27 DEBUG = True +
+
28   +
+
29 ALLOWED_HOSTS = [] +
+
30   +
+
31   +
+
32 # Application definition +
+
33   +
+
34 INSTALLED_APPS = [ +
+
35 'django.contrib.admin', +
+
36 'django.contrib.auth', +
+
37 'django.contrib.contenttypes', +
+
38 'django.contrib.sessions', +
+
39 'django.contrib.messages', +
+
40 'django.contrib.staticfiles', +
+
+
    + +
  • + + W291 + + Trailing whitespace
  • + +
41 'rest_framework', +
+
+
    + +
  • + + W291 + + Trailing whitespace
  • + +
42 'rest_framework_simplejwt', +
+
+
    + +
  • + + W291 + + Trailing whitespace
  • + +
43 'authentication', +
+
+
    + +
  • + + W291 + + Trailing whitespace
  • + +
44 'support', +
+
45 ] +
+
46   +
+
47 MIDDLEWARE = [ +
+
48 'django.middleware.security.SecurityMiddleware', +
+
49 'django.contrib.sessions.middleware.SessionMiddleware', +
+
50 'django.middleware.common.CommonMiddleware', +
+
51 'django.middleware.csrf.CsrfViewMiddleware', +
+
52 'django.contrib.auth.middleware.AuthenticationMiddleware', +
+
53 'django.contrib.messages.middleware.MessageMiddleware', +
+
54 'django.middleware.clickjacking.XFrameOptionsMiddleware', +
+
55 ] +
+
56   +
+
57 ROOT_URLCONF = 'softdesk.urls' +
+
58   +
+
59 TEMPLATES = [ +
+
60 { +
+
61 'BACKEND': 'django.template.backends.django.DjangoTemplates', +
+
62 'DIRS': [], +
+
63 'APP_DIRS': True, +
+
64 'OPTIONS': { +
+
65 'context_processors': [ +
+
66 'django.template.context_processors.request', +
+
67 'django.contrib.auth.context_processors.auth', +
+
68 'django.contrib.messages.context_processors.messages', +
+
69 ], +
+
70 }, +
+
71 }, +
+
72 ] +
+
73   +
+
74 WSGI_APPLICATION = 'softdesk.wsgi.application' +
+
75   +
+
76   +
+
77 # Database +
+
78 # https://docs.djangoproject.com/en/5.2/ref/settings/#databases +
+
79   +
+
80 DATABASES = { +
+
81 'default': { +
+
82 'ENGINE': 'django.db.backends.sqlite3', +
+
83 'NAME': BASE_DIR / 'db.sqlite3', +
+
84 } +
+
85 } +
+
86   +
+
87   +
+
88 # Password validation +
+
89 # https://docs.djangoproject.com/en/5.2/ref/settings/#auth-password-validators +
+
90   +
+
91 AUTH_PASSWORD_VALIDATORS = [ +
+
92 { +
+
+
    + +
  • + + E501 + + Line too long (91 > 79 characters)
  • + +
93 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', +
+
94 }, +
+
95 { +
+
+
    + +
  • + + E501 + + Line too long (81 > 79 characters)
  • + +
96 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', +
+
97 }, +
+
98 { +
+
+
    + +
  • + + E501 + + Line too long (82 > 79 characters)
  • + +
99 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', +
+
100 }, +
+
101 { +
+
+
    + +
  • + + E501 + + Line too long (83 > 79 characters)
  • + +
102 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', +
+
103 }, +
+
104 ] +
+
105   +
+
106   +
+
107 # Internationalization +
+
108 # https://docs.djangoproject.com/en/5.2/topics/i18n/ +
+
109   +
+
110 LANGUAGE_CODE = 'en-us' +
+
111   +
+
112 TIME_ZONE = 'UTC' +
+
113   +
+
114 USE_I18N = True +
+
115   +
+
116 USE_TZ = True +
+
117   +
+
118   +
+
119 # Static files (CSS, JavaScript, Images) +
+
120 # https://docs.djangoproject.com/en/5.2/howto/static-files/ +
+
121   +
+
122 STATIC_URL = 'static/' +
+
123   +
+
124 # Default primary key field type +
+
125 # https://docs.djangoproject.com/en/5.2/ref/settings/#default-auto-field +
+
126   +
+
127 DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' +
+
128   +
+
129 AUTH_USER_MODEL = 'authentication.User' +
+
130   +
+
131 REST_FRAMEWORK = { +
+
+
    + +
  • + + E501 + + Line too long (105 > 79 characters)
  • + +
132 'DEFAULT_AUTHENTICATION_CLASSES': ('rest_framework_simplejwt.authentication.JWTAuthentication',), +
+
+
    + +
  • + + E501 + + Line too long (86 > 79 characters)
  • + +
133 'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.LimitOffsetPagination', +
+
134 'PAGE_SIZE': 5 +
+
135 } +
+
136   +
+
137 SIMPLE_JWT = { +
+
138 'ACCESS_TOKEN_LIFETIME': timedelta(days=30), +
+
139 'REFRESH_TOKEN_LIFETIME': timedelta(days=30), +
+
140 } +
+ +
+
+ + \ No newline at end of file diff --git a/flake-report/softdesk.support.admin.report.html b/flake-report/softdesk.support.admin.report.html new file mode 100644 index 0000000..fd183d7 --- /dev/null +++ b/flake-report/softdesk.support.admin.report.html @@ -0,0 +1,96 @@ + + + + flake8 violations: softdesk/support/admin.py + + + + + +
+
+ +

+ + ⬅ + softdesk/support/admin.py + +

+ + +
+ + \ No newline at end of file diff --git a/flake-report/softdesk.support.admin.source.html b/flake-report/softdesk.support.admin.source.html new file mode 100644 index 0000000..93885d1 --- /dev/null +++ b/flake-report/softdesk.support.admin.source.html @@ -0,0 +1,101 @@ + + + + softdesk/support/admin.py - flake8 annotated source + + + + +
+
+

+ + ⬅ + softdesk/support/admin.py source + +

+ +
+
1 from django.contrib import admin +
+
2 from support.models import Project, Issue, Comment, ProjectContributor +
+
3 from authentication.models import User +
+
4   +
+
+
    + +
  • + + E302 + + Expected 2 blank lines, found 1
  • + +
5 class AdminProject(admin.ModelAdmin): +
+
6 list_display = ('id', 'title', 'author', 'contributors') +
+
7   +
+
8 @admin.display(description='contributors') +
+
9 def contributors(self, obj): +
+
10 return obj.contributors +
+
11   +
+
+
    + +
  • + + E302 + + Expected 2 blank lines, found 1
  • + +
12 class AdminIssue(admin.ModelAdmin): +
+
13 list_display = ('id', 'title', 'author', 'project') +
+
14   +
+
15   +
+
16 admin.site.register(User) +
+
17 admin.site.register(Project, AdminProject) +
+
18 admin.site.register(Issue, AdminIssue) +
+
19 admin.site.register(Comment) +
+
20 admin.site.register(ProjectContributor) +
+ +
+
+ + \ No newline at end of file diff --git a/flake-report/softdesk.support.migrations.0001_initial.report.html b/flake-report/softdesk.support.migrations.0001_initial.report.html new file mode 100644 index 0000000..13f2fd7 --- /dev/null +++ b/flake-report/softdesk.support.migrations.0001_initial.report.html @@ -0,0 +1,189 @@ + + + + flake8 violations: softdesk/support/migrations/0001_initial.py + + + + + +
+
+ +

+ + ⬅ + softdesk/support/migrations/0001_initial.py + +

+ + +
+ + \ No newline at end of file diff --git a/flake-report/softdesk.support.migrations.0001_initial.source.html b/flake-report/softdesk.support.migrations.0001_initial.source.html new file mode 100644 index 0000000..79c1e3f --- /dev/null +++ b/flake-report/softdesk.support.migrations.0001_initial.source.html @@ -0,0 +1,389 @@ + + + + softdesk/support/migrations/0001_initial.py - flake8 annotated source + + + + +
+
+

+ + ⬅ + softdesk/support/migrations/0001_initial.py source + +

+ +
+
1 # Generated by Django 5.2.1 on 2025-05-23 03:58 +
+
2   +
+
3 import django.db.models.deletion +
+
4 from django.conf import settings +
+
5 from django.db import migrations, models +
+
6   +
+
7   +
+
8 class Migration(migrations.Migration): +
+
9   +
+
10 initial = True +
+
11   +
+
12 dependencies = [ +
+
13 migrations.swappable_dependency(settings.AUTH_USER_MODEL), +
+
14 ] +
+
15   +
+
16 operations = [ +
+
17 migrations.CreateModel( +
+
18 name='Contributor', +
+
19 fields=[ +
+
+
    + +
  • + + E501 + + Line too long (117 > 79 characters)
  • + +
20 ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), +
+
21 ('data', models.CharField(blank=True, max_length=255)), +
+
+
    + +
  • + + E501 + + Line too long (128 > 79 characters)
  • + +
22 ('contributor', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to=settings.AUTH_USER_MODEL)), +
+
23 ], +
+
24 ), +
+
25 migrations.CreateModel( +
+
26 name='Issue', +
+
27 fields=[ +
+
+
    + +
  • + + E501 + + Line too long (117 > 79 characters)
  • + +
28 ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), +
+
+
    + +
  • + + E501 + + Line too long (82 > 79 characters)
  • + +
29 ('title', models.CharField(max_length=255, verbose_name='title')), +
+
30 ('date_created', models.DateTimeField(auto_now_add=True)), +
+
31 ('description', models.TextField()), +
+
+
    + +
  • + + E501 + + Line too long (149 > 79 characters)
  • + +
32 ('status', models.CharField(max_length=15, verbose_name=[('ToDo', 'Todo'), ('InProgress', 'Inprogress'), ('Finished', 'Finished')])), +
+
+
    + +
  • + + E501 + + Line too long (123 > 79 characters)
  • + +
33 ('priority', models.CharField(max_length=15, verbose_name=[('L', 'Low'), ('M', 'Medium'), ('H', 'High')])), +
+
+
    + +
  • + + E501 + + Line too long (130 > 79 characters)
  • + +
34 ('tag', models.CharField(max_length=15, verbose_name=[('Bug', 'Bug'), ('Feature', 'Feature'), ('Task', 'Task')])), +
+
+
    + +
  • + + E501 + + Line too long (120 > 79 characters)
  • + +
35 ('author', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='support.contributor')), +
+
36 ], +
+
37 ), +
+
38 migrations.CreateModel( +
+
39 name='Comment', +
+
40 fields=[ +
+
+
    + +
  • + + E501 + + Line too long (117 > 79 characters)
  • + +
41 ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), +
+
42 ('title', models.CharField(max_length=255)), +
+
43 ('date_created', models.DateTimeField(auto_now_add=True)), +
+
44 ('description', models.CharField(max_length=4000)), +
+
+
    + +
  • + + E501 + + Line too long (120 > 79 characters)
  • + +
45 ('author', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='support.contributor')), +
+
+
    + +
  • + + E501 + + Line too long (110 > 79 characters)
  • + +
46 ('issue', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='support.issue')), +
+
47 ], +
+
48 ), +
+
49 migrations.CreateModel( +
+
50 name='Project', +
+
51 fields=[ +
+
+
    + +
  • + + E501 + + Line too long (117 > 79 characters)
  • + +
52 ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), +
+
53 ('title', models.CharField(max_length=255)), +
+
54 ('date_created', models.DateTimeField(auto_now_add=True)), +
+
+
    + +
  • + + E501 + + Line too long (158 > 79 characters)
  • + +
55 ('type', models.CharField(choices=[('BackEnd', 'Backend'), ('FrontEnd', 'Frontend'), ('iOS', 'Ios'), ('Android', 'Android')], max_length=10)), +
+
56 ('description', models.CharField(max_length=4000)), +
+
+
    + +
  • + + E501 + + Line too long (143 > 79 characters)
  • + +
57 ('author', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, related_name='author', to='support.contributor')), +
+
+
    + +
  • + + E501 + + Line too long (146 > 79 characters)
  • + +
58 ('contributors', models.ManyToManyField(related_name='contribution', through='support.Contributor', to=settings.AUTH_USER_MODEL)), +
+
59 ], +
+
60 ), +
+
61 migrations.AddField( +
+
62 model_name='issue', +
+
63 name='project', +
+
+
    + +
  • + + E501 + + Line too long (127 > 79 characters)
  • + +
64 field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='support.project'), +
+
65 ), +
+
66 migrations.AddField( +
+
67 model_name='contributor', +
+
68 name='project', +
+
+
    + +
  • + + E501 + + Line too long (127 > 79 characters)
  • + +
69 field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='project', to='support.project'), +
+
70 ), +
+
71 ] +
+ +
+
+ + \ No newline at end of file diff --git a/flake-report/softdesk.support.migrations.0002_project_active_alter_issue_project.report.html b/flake-report/softdesk.support.migrations.0002_project_active_alter_issue_project.report.html new file mode 100644 index 0000000..022737b --- /dev/null +++ b/flake-report/softdesk.support.migrations.0002_project_active_alter_issue_project.report.html @@ -0,0 +1,73 @@ + + + + flake8 violations: softdesk/support/migrations/0002_project_active_alter_issue_project.py + + + + + +
+
+ +

+ + ⬅ + softdesk/support/migrations/0002_project_active_alter_issue_project.py + +

+ + +
+ + \ No newline at end of file diff --git a/flake-report/softdesk.support.migrations.0002_project_active_alter_issue_project.source.html b/flake-report/softdesk.support.migrations.0002_project_active_alter_issue_project.source.html new file mode 100644 index 0000000..12116c2 --- /dev/null +++ b/flake-report/softdesk.support.migrations.0002_project_active_alter_issue_project.source.html @@ -0,0 +1,104 @@ + + + + softdesk/support/migrations/0002_project_active_alter_issue_project.py - flake8 annotated source + + + + +
+
+

+ + ⬅ + softdesk/support/migrations/0002_project_active_alter_issue_project.py source + +

+ +
+
1 # Generated by Django 5.2.1 on 2025-05-25 19:20 +
+
2   +
+
3 import django.db.models.deletion +
+
4 from django.db import migrations, models +
+
5   +
+
6   +
+
7 class Migration(migrations.Migration): +
+
8   +
+
9 dependencies = [ +
+
10 ('support', '0001_initial'), +
+
11 ] +
+
12   +
+
13 operations = [ +
+
14 migrations.AddField( +
+
15 model_name='project', +
+
16 name='active', +
+
17 field=models.BooleanField(default=True), +
+
18 ), +
+
19 migrations.AlterField( +
+
20 model_name='issue', +
+
21 name='project', +
+
+
    + +
  • + + E501 + + Line too long (126 > 79 characters)
  • + +
22 field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='support.project'), +
+
23 ), +
+
24 ] +
+ +
+
+ + \ No newline at end of file diff --git a/flake-report/softdesk.support.migrations.0004_alter_project_author.report.html b/flake-report/softdesk.support.migrations.0004_alter_project_author.report.html new file mode 100644 index 0000000..2616d83 --- /dev/null +++ b/flake-report/softdesk.support.migrations.0004_alter_project_author.report.html @@ -0,0 +1,73 @@ + + + + flake8 violations: softdesk/support/migrations/0004_alter_project_author.py + + + + + +
+
+ +

+ + ⬅ + softdesk/support/migrations/0004_alter_project_author.py + +

+ + +
+ + \ No newline at end of file diff --git a/flake-report/softdesk.support.migrations.0004_alter_project_author.source.html b/flake-report/softdesk.support.migrations.0004_alter_project_author.source.html new file mode 100644 index 0000000..9c0ac73 --- /dev/null +++ b/flake-report/softdesk.support.migrations.0004_alter_project_author.source.html @@ -0,0 +1,89 @@ + + + + softdesk/support/migrations/0004_alter_project_author.py - flake8 annotated source + + + + +
+
+

+ + ⬅ + softdesk/support/migrations/0004_alter_project_author.py source + +

+ +
+
1 # Generated by Django 5.2.1 on 2025-05-25 19:36 +
+
2   +
+
3 import django.db.models.deletion +
+
4 from django.db import migrations, models +
+
5   +
+
6   +
+
7 class Migration(migrations.Migration): +
+
8   +
+
9 dependencies = [ +
+
10 ('support', '0003_rename_contributor_contributor_user'), +
+
11 ] +
+
12   +
+
13 operations = [ +
+
14 migrations.AlterField( +
+
15 model_name='project', +
+
16 name='author', +
+
+
    + +
  • + + E501 + + Line too long (145 > 79 characters)
  • + +
17 field=models.ForeignKey(blank=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='author', to='support.contributor'), +
+
18 ), +
+
19 ] +
+ +
+
+ + \ No newline at end of file diff --git a/flake-report/softdesk.support.migrations.0005_alter_project_author.report.html b/flake-report/softdesk.support.migrations.0005_alter_project_author.report.html new file mode 100644 index 0000000..7c94dbf --- /dev/null +++ b/flake-report/softdesk.support.migrations.0005_alter_project_author.report.html @@ -0,0 +1,73 @@ + + + + flake8 violations: softdesk/support/migrations/0005_alter_project_author.py + + + + + +
+
+ +

+ + ⬅ + softdesk/support/migrations/0005_alter_project_author.py + +

+ + +
+ + \ No newline at end of file diff --git a/flake-report/softdesk.support.migrations.0005_alter_project_author.source.html b/flake-report/softdesk.support.migrations.0005_alter_project_author.source.html new file mode 100644 index 0000000..6c5bc02 --- /dev/null +++ b/flake-report/softdesk.support.migrations.0005_alter_project_author.source.html @@ -0,0 +1,89 @@ + + + + softdesk/support/migrations/0005_alter_project_author.py - flake8 annotated source + + + + +
+
+

+ + ⬅ + softdesk/support/migrations/0005_alter_project_author.py source + +

+ +
+
1 # Generated by Django 5.2.1 on 2025-05-25 19:37 +
+
2   +
+
3 import django.db.models.deletion +
+
4 from django.db import migrations, models +
+
5   +
+
6   +
+
7 class Migration(migrations.Migration): +
+
8   +
+
9 dependencies = [ +
+
10 ('support', '0004_alter_project_author'), +
+
11 ] +
+
12   +
+
13 operations = [ +
+
14 migrations.AlterField( +
+
15 model_name='project', +
+
16 name='author', +
+
+
    + +
  • + + E501 + + Line too long (144 > 79 characters)
  • + +
17 field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='author', to='support.contributor'), +
+
18 ), +
+
19 ] +
+ +
+
+ + \ No newline at end of file diff --git a/flake-report/softdesk.support.migrations.0006_alter_project_author.report.html b/flake-report/softdesk.support.migrations.0006_alter_project_author.report.html new file mode 100644 index 0000000..6c8c18f --- /dev/null +++ b/flake-report/softdesk.support.migrations.0006_alter_project_author.report.html @@ -0,0 +1,73 @@ + + + + flake8 violations: softdesk/support/migrations/0006_alter_project_author.py + + + + + +
+
+ +

+ + ⬅ + softdesk/support/migrations/0006_alter_project_author.py + +

+ + +
+ + \ No newline at end of file diff --git a/flake-report/softdesk.support.migrations.0006_alter_project_author.source.html b/flake-report/softdesk.support.migrations.0006_alter_project_author.source.html new file mode 100644 index 0000000..170ce6d --- /dev/null +++ b/flake-report/softdesk.support.migrations.0006_alter_project_author.source.html @@ -0,0 +1,89 @@ + + + + softdesk/support/migrations/0006_alter_project_author.py - flake8 annotated source + + + + +
+
+

+ + ⬅ + softdesk/support/migrations/0006_alter_project_author.py source + +

+ +
+
1 # Generated by Django 5.2.1 on 2025-05-25 19:37 +
+
2   +
+
3 import django.db.models.deletion +
+
4 from django.db import migrations, models +
+
5   +
+
6   +
+
7 class Migration(migrations.Migration): +
+
8   +
+
9 dependencies = [ +
+
10 ('support', '0005_alter_project_author'), +
+
11 ] +
+
12   +
+
13 operations = [ +
+
14 migrations.AlterField( +
+
15 model_name='project', +
+
16 name='author', +
+
+
    + +
  • + + E501 + + Line too long (156 > 79 characters)
  • + +
17 field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='author', to='support.contributor'), +
+
18 ), +
+
19 ] +
+ +
+
+ + \ No newline at end of file diff --git a/flake-report/softdesk.support.migrations.0007_contributor_active_alter_project_author.report.html b/flake-report/softdesk.support.migrations.0007_contributor_active_alter_project_author.report.html new file mode 100644 index 0000000..e72c440 --- /dev/null +++ b/flake-report/softdesk.support.migrations.0007_contributor_active_alter_project_author.report.html @@ -0,0 +1,73 @@ + + + + flake8 violations: softdesk/support/migrations/0007_contributor_active_alter_project_author.py + + + + + +
+
+ +

+ + ⬅ + softdesk/support/migrations/0007_contributor_active_alter_project_author.py + +

+ + +
+ + \ No newline at end of file diff --git a/flake-report/softdesk.support.migrations.0007_contributor_active_alter_project_author.source.html b/flake-report/softdesk.support.migrations.0007_contributor_active_alter_project_author.source.html new file mode 100644 index 0000000..0b608fd --- /dev/null +++ b/flake-report/softdesk.support.migrations.0007_contributor_active_alter_project_author.source.html @@ -0,0 +1,110 @@ + + + + softdesk/support/migrations/0007_contributor_active_alter_project_author.py - flake8 annotated source + + + + +
+
+

+ + ⬅ + softdesk/support/migrations/0007_contributor_active_alter_project_author.py source + +

+ +
+
1 # Generated by Django 5.2.1 on 2025-05-25 19:49 +
+
2   +
+
3 import django.db.models.deletion +
+
4 from django.conf import settings +
+
5 from django.db import migrations, models +
+
6   +
+
7   +
+
8 class Migration(migrations.Migration): +
+
9   +
+
10 dependencies = [ +
+
11 ('support', '0006_alter_project_author'), +
+
12 migrations.swappable_dependency(settings.AUTH_USER_MODEL), +
+
13 ] +
+
14   +
+
15 operations = [ +
+
16 migrations.AddField( +
+
17 model_name='contributor', +
+
18 name='active', +
+
19 field=models.BooleanField(default=True), +
+
20 ), +
+
21 migrations.AlterField( +
+
22 model_name='project', +
+
23 name='author', +
+
+
    + +
  • + + E501 + + Line too long (159 > 79 characters)
  • + +
24 field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='author', to=settings.AUTH_USER_MODEL), +
+
25 ), +
+
26 ] +
+ +
+
+ + \ No newline at end of file diff --git a/flake-report/softdesk.support.migrations.0010_alter_comment_author_alter_issue_author_and_more.report.html b/flake-report/softdesk.support.migrations.0010_alter_comment_author_alter_issue_author_and_more.report.html new file mode 100644 index 0000000..fe16769 --- /dev/null +++ b/flake-report/softdesk.support.migrations.0010_alter_comment_author_alter_issue_author_and_more.report.html @@ -0,0 +1,119 @@ + + + + flake8 violations: softdesk/support/migrations/0010_alter_comment_author_alter_issue_author_and_more.py + + + + + +
+
+ +

+ + ⬅ + softdesk/support/migrations/0010_alter_comment_author_alter_issue_author_and_more.py + +

+ + +
+ + \ No newline at end of file diff --git a/flake-report/softdesk.support.migrations.0010_alter_comment_author_alter_issue_author_and_more.source.html b/flake-report/softdesk.support.migrations.0010_alter_comment_author_alter_issue_author_and_more.source.html new file mode 100644 index 0000000..50c8e25 --- /dev/null +++ b/flake-report/softdesk.support.migrations.0010_alter_comment_author_alter_issue_author_and_more.source.html @@ -0,0 +1,242 @@ + + + + softdesk/support/migrations/0010_alter_comment_author_alter_issue_author_and_more.py - flake8 annotated source + + + + +
+
+

+ + ⬅ + softdesk/support/migrations/0010_alter_comment_author_alter_issue_author_and_more.py source + +

+ +
+
1 # Generated by Django 5.2.1 on 2025-05-26 05:53 +
+
2   +
+
3 import django.db.models.deletion +
+
4 from django.conf import settings +
+
5 from django.db import migrations, models +
+
6   +
+
7   +
+
8 class Migration(migrations.Migration): +
+
9   +
+
10 dependencies = [ +
+
11 ('support', '0009_rename_contributor_user_contributor_username'), +
+
12 migrations.swappable_dependency(settings.AUTH_USER_MODEL), +
+
13 ] +
+
14   +
+
15 operations = [ +
+
16 migrations.AlterField( +
+
17 model_name='comment', +
+
18 name='author', +
+
+
    + +
  • + + E501 + + Line too long (155 > 79 characters)
  • + +
19 field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='comment_author', to=settings.AUTH_USER_MODEL), +
+
20 ), +
+
21 migrations.AlterField( +
+
22 model_name='issue', +
+
23 name='author', +
+
+
    + +
  • + + E501 + + Line too long (153 > 79 characters)
  • + +
24 field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='issue_author', to=settings.AUTH_USER_MODEL), +
+
25 ), +
+
26 migrations.AlterField( +
+
27 model_name='project', +
+
28 name='author', +
+
+
    + +
  • + + E501 + + Line too long (155 > 79 characters)
  • + +
29 field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='project_author', to=settings.AUTH_USER_MODEL), +
+
30 ), +
+
31 migrations.CreateModel( +
+
32 name='ProjectContributor', +
+
33 fields=[ +
+
+
    + +
  • + + E501 + + Line too long (117 > 79 characters)
  • + +
34 ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), +
+
35 ('active', models.BooleanField(default=True)), +
+
36 ('data', models.CharField(blank=True, max_length=255)), +
+
+
    + +
  • + + E501 + + Line too long (128 > 79 characters)
  • + +
37 ('contributor', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to=settings.AUTH_USER_MODEL)), +
+
+
    + +
  • + + E501 + + Line too long (138 > 79 characters)
  • + +
38 ('project', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='project', to='support.project')), +
+
39 ], +
+
40 options={ +
+
41 'unique_together': {('contributor', 'project')}, +
+
42 }, +
+
43 ), +
+
44 migrations.AlterField( +
+
45 model_name='project', +
+
46 name='contributors', +
+
+
    + +
  • + + E501 + + Line too long (137 > 79 characters)
  • + +
47 field=models.ManyToManyField(related_name='contribution', through='support.ProjectContributor', to=settings.AUTH_USER_MODEL), +
+
48 ), +
+
49 migrations.DeleteModel( +
+
50 name='Contributor', +
+
51 ), +
+
52 ] +
+ +
+
+ + \ No newline at end of file diff --git a/flake-report/softdesk.support.migrations.0011_alter_issue_priority_alter_issue_status_and_more.report.html b/flake-report/softdesk.support.migrations.0011_alter_issue_priority_alter_issue_status_and_more.report.html new file mode 100644 index 0000000..eb2a142 --- /dev/null +++ b/flake-report/softdesk.support.migrations.0011_alter_issue_priority_alter_issue_status_and_more.report.html @@ -0,0 +1,91 @@ + + + + flake8 violations: softdesk/support/migrations/0011_alter_issue_priority_alter_issue_status_and_more.py + + + + + +
+
+ +

+ + ⬅ + softdesk/support/migrations/0011_alter_issue_priority_alter_issue_status_and_more.py + +

+ + +
+ + \ No newline at end of file diff --git a/flake-report/softdesk.support.migrations.0011_alter_issue_priority_alter_issue_status_and_more.source.html b/flake-report/softdesk.support.migrations.0011_alter_issue_priority_alter_issue_status_and_more.source.html new file mode 100644 index 0000000..f8b49d3 --- /dev/null +++ b/flake-report/softdesk.support.migrations.0011_alter_issue_priority_alter_issue_status_and_more.source.html @@ -0,0 +1,134 @@ + + + + softdesk/support/migrations/0011_alter_issue_priority_alter_issue_status_and_more.py - flake8 annotated source + + + + +
+
+

+ + ⬅ + softdesk/support/migrations/0011_alter_issue_priority_alter_issue_status_and_more.py source + +

+ +
+
1 # Generated by Django 5.2.1 on 2025-05-26 18:26 +
+
2   +
+
3 from django.db import migrations, models +
+
4   +
+
5   +
+
6 class Migration(migrations.Migration): +
+
7   +
+
8 dependencies = [ +
+
9 ('support', '0010_alter_comment_author_alter_issue_author_and_more'), +
+
10 ] +
+
11   +
+
12 operations = [ +
+
13 migrations.AlterField( +
+
14 model_name='issue', +
+
15 name='priority', +
+
+
    + +
  • + + E501 + + Line too long (106 > 79 characters)
  • + +
16 field=models.CharField(choices=[('L', 'Low'), ('M', 'Medium'), ('H', 'High')], max_length=15), +
+
17 ), +
+
18 migrations.AlterField( +
+
19 model_name='issue', +
+
20 name='status', +
+
+
    + +
  • + + E501 + + Line too long (134 > 79 characters)
  • + +
21 field=models.CharField(choices=[('ToDo', 'Todo'), ('InProgress', 'Inprogress'), ('Finished', 'Finished')], max_length=15), +
+
22 ), +
+
23 migrations.AlterField( +
+
24 model_name='issue', +
+
25 name='tag', +
+
+
    + +
  • + + E501 + + Line too long (118 > 79 characters)
  • + +
26 field=models.CharField(choices=[('Bug', 'Bug'), ('Feature', 'Feature'), ('Task', 'Task')], max_length=15), +
+
27 ), +
+
28 ] +
+ +
+
+ + \ No newline at end of file diff --git a/flake-report/softdesk.support.migrations.0012_alter_issue_priority_alter_issue_status.report.html b/flake-report/softdesk.support.migrations.0012_alter_issue_priority_alter_issue_status.report.html new file mode 100644 index 0000000..2092dd5 --- /dev/null +++ b/flake-report/softdesk.support.migrations.0012_alter_issue_priority_alter_issue_status.report.html @@ -0,0 +1,84 @@ + + + + flake8 violations: softdesk/support/migrations/0012_alter_issue_priority_alter_issue_status.py + + + + + +
+
+ +

+ + ⬅ + softdesk/support/migrations/0012_alter_issue_priority_alter_issue_status.py + +

+ + +
+ + \ No newline at end of file diff --git a/flake-report/softdesk.support.migrations.0012_alter_issue_priority_alter_issue_status.source.html b/flake-report/softdesk.support.migrations.0012_alter_issue_priority_alter_issue_status.source.html new file mode 100644 index 0000000..a3ebce0 --- /dev/null +++ b/flake-report/softdesk.support.migrations.0012_alter_issue_priority_alter_issue_status.source.html @@ -0,0 +1,110 @@ + + + + softdesk/support/migrations/0012_alter_issue_priority_alter_issue_status.py - flake8 annotated source + + + + +
+
+

+ + ⬅ + softdesk/support/migrations/0012_alter_issue_priority_alter_issue_status.py source + +

+ +
+
1 # Generated by Django 5.2.1 on 2025-05-26 18:26 +
+
2   +
+
3 from django.db import migrations, models +
+
4   +
+
5   +
+
6 class Migration(migrations.Migration): +
+
7   +
+
8 dependencies = [ +
+
9 ('support', '0011_alter_issue_priority_alter_issue_status_and_more'), +
+
10 ] +
+
11   +
+
12 operations = [ +
+
13 migrations.AlterField( +
+
14 model_name='issue', +
+
15 name='priority', +
+
+
    + +
  • + + E501 + + Line too long (116 > 79 characters)
  • + +
16 field=models.CharField(choices=[('Low', 'Low'), ('Medium', 'Medium'), ('High', 'High')], max_length=15), +
+
17 ), +
+
18 migrations.AlterField( +
+
19 model_name='issue', +
+
20 name='status', +
+
+
    + +
  • + + E501 + + Line too long (135 > 79 characters)
  • + +
21 field=models.CharField(choices=[('ToDo', 'Todo'), ('In Progress', 'Inprogress'), ('Finished', 'Finished')], max_length=15), +
+
22 ), +
+
23 ] +
+ +
+
+ + \ No newline at end of file diff --git a/flake-report/softdesk.support.migrations.0013_alter_issue_project.report.html b/flake-report/softdesk.support.migrations.0013_alter_issue_project.report.html new file mode 100644 index 0000000..511bdb0 --- /dev/null +++ b/flake-report/softdesk.support.migrations.0013_alter_issue_project.report.html @@ -0,0 +1,73 @@ + + + + flake8 violations: softdesk/support/migrations/0013_alter_issue_project.py + + + + + +
+
+ +

+ + ⬅ + softdesk/support/migrations/0013_alter_issue_project.py + +

+ + +
+ + \ No newline at end of file diff --git a/flake-report/softdesk.support.migrations.0013_alter_issue_project.source.html b/flake-report/softdesk.support.migrations.0013_alter_issue_project.source.html new file mode 100644 index 0000000..a7ed12d --- /dev/null +++ b/flake-report/softdesk.support.migrations.0013_alter_issue_project.source.html @@ -0,0 +1,89 @@ + + + + softdesk/support/migrations/0013_alter_issue_project.py - flake8 annotated source + + + + +
+
+

+ + ⬅ + softdesk/support/migrations/0013_alter_issue_project.py source + +

+ +
+
1 # Generated by Django 5.2.1 on 2025-05-26 19:06 +
+
2   +
+
3 import django.db.models.deletion +
+
4 from django.db import migrations, models +
+
5   +
+
6   +
+
7 class Migration(migrations.Migration): +
+
8   +
+
9 dependencies = [ +
+
10 ('support', '0012_alter_issue_priority_alter_issue_status'), +
+
11 ] +
+
12   +
+
13 operations = [ +
+
14 migrations.AlterField( +
+
15 model_name='issue', +
+
16 name='project', +
+
+
    + +
  • + + E501 + + Line too long (114 > 79 characters)
  • + +
17 field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='support.project'), +
+
18 ), +
+
19 ] +
+ +
+
+ + \ No newline at end of file diff --git a/flake-report/softdesk.support.migrations.0014_alter_issue_project.report.html b/flake-report/softdesk.support.migrations.0014_alter_issue_project.report.html new file mode 100644 index 0000000..ec50749 --- /dev/null +++ b/flake-report/softdesk.support.migrations.0014_alter_issue_project.report.html @@ -0,0 +1,73 @@ + + + + flake8 violations: softdesk/support/migrations/0014_alter_issue_project.py + + + + + +
+
+ +

+ + ⬅ + softdesk/support/migrations/0014_alter_issue_project.py + +

+ + +
+ + \ No newline at end of file diff --git a/flake-report/softdesk.support.migrations.0014_alter_issue_project.source.html b/flake-report/softdesk.support.migrations.0014_alter_issue_project.source.html new file mode 100644 index 0000000..daaa08d --- /dev/null +++ b/flake-report/softdesk.support.migrations.0014_alter_issue_project.source.html @@ -0,0 +1,89 @@ + + + + softdesk/support/migrations/0014_alter_issue_project.py - flake8 annotated source + + + + +
+
+

+ + ⬅ + softdesk/support/migrations/0014_alter_issue_project.py source + +

+ +
+
1 # Generated by Django 5.2.1 on 2025-05-27 09:30 +
+
2   +
+
3 import django.db.models.deletion +
+
4 from django.db import migrations, models +
+
5   +
+
6   +
+
7 class Migration(migrations.Migration): +
+
8   +
+
9 dependencies = [ +
+
10 ('support', '0013_alter_issue_project'), +
+
11 ] +
+
12   +
+
13 operations = [ +
+
14 migrations.AlterField( +
+
15 model_name='issue', +
+
16 name='project', +
+
+
    + +
  • + + E501 + + Line too long (103 > 79 characters)
  • + +
17 field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='support.project'), +
+
18 ), +
+
19 ] +
+ +
+
+ + \ No newline at end of file diff --git a/flake-report/softdesk.support.migrations.0015_alter_project_author.report.html b/flake-report/softdesk.support.migrations.0015_alter_project_author.report.html new file mode 100644 index 0000000..fa0fe1b --- /dev/null +++ b/flake-report/softdesk.support.migrations.0015_alter_project_author.report.html @@ -0,0 +1,73 @@ + + + + flake8 violations: softdesk/support/migrations/0015_alter_project_author.py + + + + + +
+
+ +

+ + ⬅ + softdesk/support/migrations/0015_alter_project_author.py + +

+ + +
+ + \ No newline at end of file diff --git a/flake-report/softdesk.support.migrations.0015_alter_project_author.source.html b/flake-report/softdesk.support.migrations.0015_alter_project_author.source.html new file mode 100644 index 0000000..b2ace6f --- /dev/null +++ b/flake-report/softdesk.support.migrations.0015_alter_project_author.source.html @@ -0,0 +1,95 @@ + + + + softdesk/support/migrations/0015_alter_project_author.py - flake8 annotated source + + + + +
+
+

+ + ⬅ + softdesk/support/migrations/0015_alter_project_author.py source + +

+ +
+
1 # Generated by Django 5.2.1 on 2025-06-09 09:40 +
+
2   +
+
3 import django.db.models.deletion +
+
4 from django.conf import settings +
+
5 from django.db import migrations, models +
+
6   +
+
7   +
+
8 class Migration(migrations.Migration): +
+
9   +
+
10 dependencies = [ +
+
11 ('support', '0014_alter_issue_project'), +
+
12 migrations.swappable_dependency(settings.AUTH_USER_MODEL), +
+
13 ] +
+
14   +
+
15 operations = [ +
+
16 migrations.AlterField( +
+
17 model_name='project', +
+
18 name='author', +
+
+
    + +
  • + + E501 + + Line too long (167 > 79 characters)
  • + +
19 field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='project_author', to=settings.AUTH_USER_MODEL), +
+
20 ), +
+
21 ] +
+ +
+
+ + \ No newline at end of file diff --git a/flake-report/softdesk.support.migrations.0016_alter_issue_author_alter_project_author.report.html b/flake-report/softdesk.support.migrations.0016_alter_issue_author_alter_project_author.report.html new file mode 100644 index 0000000..8e50e96 --- /dev/null +++ b/flake-report/softdesk.support.migrations.0016_alter_issue_author_alter_project_author.report.html @@ -0,0 +1,84 @@ + + + + flake8 violations: softdesk/support/migrations/0016_alter_issue_author_alter_project_author.py + + + + + +
+
+ +

+ + ⬅ + softdesk/support/migrations/0016_alter_issue_author_alter_project_author.py + +

+ + +
+ + \ No newline at end of file diff --git a/flake-report/softdesk.support.migrations.0016_alter_issue_author_alter_project_author.source.html b/flake-report/softdesk.support.migrations.0016_alter_issue_author_alter_project_author.source.html new file mode 100644 index 0000000..709aa9e --- /dev/null +++ b/flake-report/softdesk.support.migrations.0016_alter_issue_author_alter_project_author.source.html @@ -0,0 +1,119 @@ + + + + softdesk/support/migrations/0016_alter_issue_author_alter_project_author.py - flake8 annotated source + + + + +
+
+

+ + ⬅ + softdesk/support/migrations/0016_alter_issue_author_alter_project_author.py source + +

+ +
+
1 # Generated by Django 5.2.1 on 2025-06-09 15:44 +
+
2   +
+
3 import django.db.models.deletion +
+
4 from django.conf import settings +
+
5 from django.db import migrations, models +
+
6   +
+
7   +
+
8 class Migration(migrations.Migration): +
+
9   +
+
10 dependencies = [ +
+
11 ('support', '0015_alter_project_author'), +
+
12 migrations.swappable_dependency(settings.AUTH_USER_MODEL), +
+
13 ] +
+
14   +
+
15 operations = [ +
+
16 migrations.AlterField( +
+
17 model_name='issue', +
+
18 name='author', +
+
+
    + +
  • + + E501 + + Line too long (165 > 79 characters)
  • + +
19 field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='issue_author', to=settings.AUTH_USER_MODEL), +
+
20 ), +
+
21 migrations.AlterField( +
+
22 model_name='project', +
+
23 name='author', +
+
+
    + +
  • + + E501 + + Line too long (153 > 79 characters)
  • + +
24 field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='project_author', to=settings.AUTH_USER_MODEL), +
+
25 ), +
+
26 ] +
+ +
+
+ + \ No newline at end of file diff --git a/flake-report/softdesk.support.migrations.0017_alter_projectcontributor_contributor.report.html b/flake-report/softdesk.support.migrations.0017_alter_projectcontributor_contributor.report.html new file mode 100644 index 0000000..f8ce9b0 --- /dev/null +++ b/flake-report/softdesk.support.migrations.0017_alter_projectcontributor_contributor.report.html @@ -0,0 +1,73 @@ + + + + flake8 violations: softdesk/support/migrations/0017_alter_projectcontributor_contributor.py + + + + + +
+
+ +

+ + ⬅ + softdesk/support/migrations/0017_alter_projectcontributor_contributor.py + +

+ + +
+ + \ No newline at end of file diff --git a/flake-report/softdesk.support.migrations.0017_alter_projectcontributor_contributor.source.html b/flake-report/softdesk.support.migrations.0017_alter_projectcontributor_contributor.source.html new file mode 100644 index 0000000..694364e --- /dev/null +++ b/flake-report/softdesk.support.migrations.0017_alter_projectcontributor_contributor.source.html @@ -0,0 +1,95 @@ + + + + softdesk/support/migrations/0017_alter_projectcontributor_contributor.py - flake8 annotated source + + + + +
+
+

+ + ⬅ + softdesk/support/migrations/0017_alter_projectcontributor_contributor.py source + +

+ +
+
1 # Generated by Django 5.2.1 on 2025-06-09 15:59 +
+
2   +
+
3 import django.db.models.deletion +
+
4 from django.conf import settings +
+
5 from django.db import migrations, models +
+
6   +
+
7   +
+
8 class Migration(migrations.Migration): +
+
9   +
+
10 dependencies = [ +
+
11 ('support', '0016_alter_issue_author_alter_project_author'), +
+
12 migrations.swappable_dependency(settings.AUTH_USER_MODEL), +
+
13 ] +
+
14   +
+
15 operations = [ +
+
16 migrations.AlterField( +
+
17 model_name='projectcontributor', +
+
18 name='contributor', +
+
+
    + +
  • + + E501 + + Line too long (110 > 79 characters)
  • + +
19 field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL), +
+
20 ), +
+
21 ] +
+ +
+
+ + \ No newline at end of file diff --git a/flake-report/softdesk.support.permissions.report.html b/flake-report/softdesk.support.permissions.report.html new file mode 100644 index 0000000..5a95698 --- /dev/null +++ b/flake-report/softdesk.support.permissions.report.html @@ -0,0 +1,73 @@ + + + + flake8 violations: softdesk/support/permissions.py + + + + + +
+
+ +

+ + ⬅ + softdesk/support/permissions.py + +

+ + +
+ + \ No newline at end of file diff --git a/flake-report/softdesk.support.permissions.source.html b/flake-report/softdesk.support.permissions.source.html new file mode 100644 index 0000000..ff0a6ae --- /dev/null +++ b/flake-report/softdesk.support.permissions.source.html @@ -0,0 +1,86 @@ + + + + softdesk/support/permissions.py - flake8 annotated source + + + + +
+
+

+ + ⬅ + softdesk/support/permissions.py source + +

+ +
+
1 from rest_framework.permissions import BasePermission +
+
2   +
+
+
    + +
  • + + E302 + + Expected 2 blank lines, found 1
  • + +
3 class IsAuthor(BasePermission): +
+
4   +
+
5 def has_object_permission(self, request, view, object): +
+
6 return bool(request.user +
+
7 and request.user.is_authenticated +
+
8 and request.user == object.author +
+
9 ) +
+
10   +
+
11   +
+
12 class IsContributor(BasePermission): +
+
13   +
+
14 def has_object_permission(self, request, view, object): +
+
15 print(object.contributors.all()) +
+
16 return bool(request.user.is_authenticated +
+
17 and request.user in object.contributors.all() +
+
18 ) +
+ +
+
+ + \ No newline at end of file diff --git a/flake-report/softdesk.support.tests.report.html b/flake-report/softdesk.support.tests.report.html new file mode 100644 index 0000000..ff15970 --- /dev/null +++ b/flake-report/softdesk.support.tests.report.html @@ -0,0 +1,73 @@ + + + + flake8 violations: softdesk/support/tests.py + + + + + +
+
+ +

+ + ⬅ + softdesk/support/tests.py + +

+ + +
+ + \ No newline at end of file diff --git a/flake-report/softdesk.support.tests.source.html b/flake-report/softdesk.support.tests.source.html new file mode 100644 index 0000000..cc71560 --- /dev/null +++ b/flake-report/softdesk.support.tests.source.html @@ -0,0 +1,41 @@ + + + + softdesk/support/tests.py - flake8 annotated source + + + + +
+
+

+ + ⬅ + softdesk/support/tests.py source + +

+ +
+
+
    + +
  • + + F401 + + 'django.test.TestCase' imported but unused
  • + +
1 from django.test import TestCase +
+
2   +
+
3 # Create your tests here. +
+ +
+
+ + \ No newline at end of file diff --git a/flake-report/styles.css b/flake-report/styles.css new file mode 100644 index 0000000..6e0e447 --- /dev/null +++ b/flake-report/styles.css @@ -0,0 +1,327 @@ +html { + font-family: sans-serif; + font-size: 90%; +} + +#masthead { + position: fixed; + left: 0; + top: 0; + right: 0; + height: 40%; +} + +h1, h2 { + font-family: sans-serif; + font-weight: normal; +} + +h1 { + color: white; + font-size: 36px; + margin-top: 1em; +} + +h1 img { + margin-right: 0.3em; +} + +h2 { + margin-top: 0; +} + +h1 a { + color: white; +} + +#versions { + color: rgba(255, 255, 255, 0.7); +} + +#page { + position: relative; + max-width: 960px; + margin: 0 auto; +} + +#index { + background-color: white; + box-shadow: 0 0 4px rgba(0, 0, 0, 0.8); + padding: 0; + margin: 0; +} + +#index li { + list-style: none; + margin: 0; + padding: 1px 0; +} + +#index li + li { + border-top: solid silver 1px; +} + +.details p { + margin-left: 3em; + color: #888; +} + +#index a { + display: block; + padding: 0.8em 1em; + cursor: pointer; +} + +#index #all-good { + padding: 1.4em 1em 0.8em; +} + +#all-good .count .tick { + font-size: 2em; +} + +#all-good .count { + float: left; +} + +#all-good h2, +#all-good p { + margin-left: 50px; +} + +#index a:hover { + background-color: #eee; +} + +.count { + display: inline-block; + border-radius: 50%; + text-align: center; + width: 2.5em; + line-height: 2.5em; + height: 2.5em; + color: white; + margin-right: 1em; +} + +.sev-1 { + background-color: #a00; +} +.sev-2 { + background-color: #b80; +} +.sev-3 { + background-color: #28c; +} +.sev-4 { + background-color: #383; +} + +a { + text-decoration: none; +} + +#doc { + background-color: white; + margin: 1em 0; + padding: 1em; + padding-left: 1.2em; + position: relative; + box-shadow: 0 0 4px rgba(0, 0, 0, 0.8); +} + +#doc pre { + margin: 0; + padding: 0.07em; +} + +.violations { + position: absolute; + margin: 1.2em 0 0 3em; + padding: 0.5em 1em; + font-size: 14px; + background-color: white; + box-shadow: 0 0 4px rgba(0, 0, 0, 0.4); + display: none; +} + +.violations .count { + font-size: 70%; +} + +.violations li { + padding: 0.1em 0.3em; + list-style: none; +} + +.line-violations::before { + display: block; + content: ""; + position: absolute; + left: -1em; + width: 14px; + height: 14px; + border-radius: 50%; + background-color: red; +} + +.code:hover .violations { + display: block; +} + +tt { + white-space: pre-wrap; + font-family: Consolas, monospace; + font-size: 10pt; +} + +tt i { + color: silver; + display: inline-block; + text-align: right; + width: 3em; + box-sizing: border-box; + height: 100%; + border-right: solid #eee 1px; + padding-right: 0.2em; +} + +.le { + background-color: #ffe8e8; + cursor: pointer; +} + +.le:hover { + background-color: #fcc; +} + +.details { + clear: both; +} + +#index .details { + border-top-style: none; + margin: 1em; +} + +ul.details { + margin-left: 0; + padding-left: 0; +} + +#index .details li { + list-style: none; + border-top-style: none; + margin: 0.3em 0; + padding: 0; +} + +#srclink { + float: right; + font-size: 36px; + margin: 0; +} + +#srclink a { + color: white; +} + +#index .details a { + padding: 0; + color: inherit; +} + +.le { + background-color: #ffe8e8; + cursor: pointer; +} + +.le.sev-1 { + background-color: #f88; +} +.le.sev-2 { + background-color: #fda; +} +.le.sev-3 { + background-color: #adf; +} + +img { + height: 1.2em; + vertical-align: -0.35em; +} + +pre { line-height: 125%; } +td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +.hll { background-color: #ffffcc } +.c { color: #3D7B7B; font-style: italic } /* Comment */ +.err { border: 1px solid #F00 } /* Error */ +.k { color: #008000; font-weight: bold } /* Keyword */ +.o { color: #666 } /* Operator */ +.ch { color: #3D7B7B; font-style: italic } /* Comment.Hashbang */ +.cm { color: #3D7B7B; font-style: italic } /* Comment.Multiline */ +.cp { color: #9C6500 } /* Comment.Preproc */ +.cpf { color: #3D7B7B; font-style: italic } /* Comment.PreprocFile */ +.c1 { color: #3D7B7B; font-style: italic } /* Comment.Single */ +.cs { color: #3D7B7B; font-style: italic } /* Comment.Special */ +.gd { color: #A00000 } /* Generic.Deleted */ +.ge { font-style: italic } /* Generic.Emph */ +.ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */ +.gr { color: #E40000 } /* Generic.Error */ +.gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.gi { color: #008400 } /* Generic.Inserted */ +.go { color: #717171 } /* Generic.Output */ +.gp { color: #000080; font-weight: bold } /* Generic.Prompt */ +.gs { font-weight: bold } /* Generic.Strong */ +.gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.gt { color: #04D } /* Generic.Traceback */ +.kc { color: #008000; font-weight: bold } /* Keyword.Constant */ +.kd { color: #008000; font-weight: bold } /* Keyword.Declaration */ +.kn { color: #008000; font-weight: bold } /* Keyword.Namespace */ +.kp { color: #008000 } /* Keyword.Pseudo */ +.kr { color: #008000; font-weight: bold } /* Keyword.Reserved */ +.kt { color: #B00040 } /* Keyword.Type */ +.m { color: #666 } /* Literal.Number */ +.s { color: #BA2121 } /* Literal.String */ +.na { color: #687822 } /* Name.Attribute */ +.nb { color: #008000 } /* Name.Builtin */ +.nc { color: #00F; font-weight: bold } /* Name.Class */ +.no { color: #800 } /* Name.Constant */ +.nd { color: #A2F } /* Name.Decorator */ +.ni { color: #717171; font-weight: bold } /* Name.Entity */ +.ne { color: #CB3F38; font-weight: bold } /* Name.Exception */ +.nf { color: #00F } /* Name.Function */ +.nl { color: #767600 } /* Name.Label */ +.nn { color: #00F; font-weight: bold } /* Name.Namespace */ +.nt { color: #008000; font-weight: bold } /* Name.Tag */ +.nv { color: #19177C } /* Name.Variable */ +.ow { color: #A2F; font-weight: bold } /* Operator.Word */ +.w { color: #BBB } /* Text.Whitespace */ +.mb { color: #666 } /* Literal.Number.Bin */ +.mf { color: #666 } /* Literal.Number.Float */ +.mh { color: #666 } /* Literal.Number.Hex */ +.mi { color: #666 } /* Literal.Number.Integer */ +.mo { color: #666 } /* Literal.Number.Oct */ +.sa { color: #BA2121 } /* Literal.String.Affix */ +.sb { color: #BA2121 } /* Literal.String.Backtick */ +.sc { color: #BA2121 } /* Literal.String.Char */ +.dl { color: #BA2121 } /* Literal.String.Delimiter */ +.sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */ +.s2 { color: #BA2121 } /* Literal.String.Double */ +.se { color: #AA5D1F; font-weight: bold } /* Literal.String.Escape */ +.sh { color: #BA2121 } /* Literal.String.Heredoc */ +.si { color: #A45A77; font-weight: bold } /* Literal.String.Interpol */ +.sx { color: #008000 } /* Literal.String.Other */ +.sr { color: #A45A77 } /* Literal.String.Regex */ +.s1 { color: #BA2121 } /* Literal.String.Single */ +.ss { color: #19177C } /* Literal.String.Symbol */ +.bp { color: #008000 } /* Name.Builtin.Pseudo */ +.fm { color: #00F } /* Name.Function.Magic */ +.vc { color: #19177C } /* Name.Variable.Class */ +.vg { color: #19177C } /* Name.Variable.Global */ +.vi { color: #19177C } /* Name.Variable.Instance */ +.vm { color: #19177C } /* Name.Variable.Magic */ +.il { color: #666 } /* Literal.Number.Integer.Long */ \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 72e7a51..722a047 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,8 +4,17 @@ charset-normalizer==3.4.2 Django==5.2.1 djangorestframework==3.16.0 djangorestframework_simplejwt==5.5.0 +flake8==7.2.0 +flake8-html==0.4.3 idna==3.10 +Jinja2==3.1.6 +MarkupSafe==3.0.2 +mccabe==0.7.0 +pycodestyle==2.13.0 +pyflakes==3.3.2 +Pygments==2.19.1 PyJWT==2.9.0 requests==2.32.3 sqlparse==0.5.3 +typing_extensions==4.13.2 urllib3==2.4.0 diff --git a/softdesk/authentication/models.py b/softdesk/authentication/models.py index 532d0b6..7e9f10c 100644 --- a/softdesk/authentication/models.py +++ b/softdesk/authentication/models.py @@ -1,5 +1,5 @@ from django.db import models -from django.contrib.auth.models import AbstractUser, Group +from django.contrib.auth.models import AbstractUser class User(AbstractUser): @@ -9,4 +9,3 @@ class User(AbstractUser): def __str__(self): return self.username - diff --git a/softdesk/authentication/serializers.py b/softdesk/authentication/serializers.py index 7401b76..a4823ad 100644 --- a/softdesk/authentication/serializers.py +++ b/softdesk/authentication/serializers.py @@ -75,6 +75,3 @@ class PasswordUpdateSerializer(ModelSerializer): class Meta: model = User fields = ['old_password', 'new_password'] - - - diff --git a/softdesk/authentication/views.py b/softdesk/authentication/views.py index 49cad28..4943289 100644 --- a/softdesk/authentication/views.py +++ b/softdesk/authentication/views.py @@ -1,14 +1,9 @@ from django.contrib.auth import update_session_auth_hash -from django.shortcuts import render -from django.utils.autoreload import raise_last_exception from rest_framework.views import APIView from rest_framework.response import Response -from rest_framework.viewsets import ModelViewSet, ReadOnlyModelViewSet from rest_framework import status from rest_framework.permissions import IsAuthenticated from django.core.exceptions import PermissionDenied - -from authentication.models import User from authentication.serializers import (UserSerializer, UserUpdateSerializer, UserRegisterSerializer, @@ -45,7 +40,7 @@ class PasswordUpdateView(APIView): serializer = PasswordUpdateSerializer(data=request.data) if serializer.is_valid(): if not user.check_password(serializer.data.get("old_password")): - return Response({"old_password":"Wrong password"}, + return Response({"old_password": "Wrong password"}, status=status.HTTP_400_BAD_REQUEST) user.set_password(serializer.data.get('new_password')) user.save() @@ -56,6 +51,7 @@ class PasswordUpdateView(APIView): return Response(response, status=status.HTTP_204_NO_CONTENT) return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST) + class UserView(APIView): permission_classes = [IsAuthenticated] @@ -86,4 +82,3 @@ class UserView(APIView): raise PermissionDenied() response = {"detail": "Username to delete must be given in data"} return Response(response, status=status.HTTP_400_BAD_REQUEST) - diff --git a/softdesk/softdesk/urls.py b/softdesk/softdesk/urls.py index aa56c92..d2f1181 100644 --- a/softdesk/softdesk/urls.py +++ b/softdesk/softdesk/urls.py @@ -19,7 +19,8 @@ from django.urls import path, include from authentication.views import (UserView, UserCreateView, PasswordUpdateView) from support.views import ProjectViewSet, IssueViewSet, CommentViewSet from rest_framework import routers -from rest_framework_simplejwt.views import TokenObtainPairView, TokenRefreshView +from rest_framework_simplejwt.views import (TokenObtainPairView, + TokenRefreshView) router = routers.SimpleRouter() @@ -33,7 +34,13 @@ urlpatterns = [ path('api/', include(router.urls)), path('api/user/', UserView.as_view(), name='user'), path('api/user/create/', UserCreateView.as_view(), name='user_create'), - path('api/user/password-update/', PasswordUpdateView.as_view(), name='password_update'), - path('api/token/', TokenObtainPairView.as_view(), name='token_obtain_pair'), - path('api/token/refresh/', TokenRefreshView.as_view(), name='token_refresh'), + path('api/user/password-update/', + PasswordUpdateView.as_view(), + name='password_update'), + path('api/token/', + TokenObtainPairView.as_view(), + name='token_obtain_pair'), + path('api/token/refresh/', + TokenRefreshView.as_view(), + name='token_refresh'), ] diff --git a/softdesk/support/models.py b/softdesk/support/models.py index 974d841..89263c9 100644 --- a/softdesk/support/models.py +++ b/softdesk/support/models.py @@ -10,7 +10,6 @@ class Project(models.Model): IOS = 'iOS' ANDROID = 'Android' - title = models.CharField(max_length=255) date_created = models.DateTimeField(auto_now_add=True) type = models.CharField(choices=Type.choices, max_length=10) @@ -19,7 +18,6 @@ class Project(models.Model): author = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.SET_NULL, related_name='project_author', null=True) - contributors = models.ManyToManyField(settings.AUTH_USER_MODEL, through='ProjectContributor', related_name='contribution') @@ -27,6 +25,7 @@ class Project(models.Model): def __str__(self): return self.title + class ProjectContributor(models.Model): contributor = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE) @@ -52,20 +51,17 @@ class Issue(models.Model): LOW = 'Low' MEDIUM = 'Medium' HIGH = 'High' - class Status(models.TextChoices): TODO = 'ToDo' INPROGRESS = 'In Progress' FINISHED = 'Finished' - class Tag(models.TextChoices): BUG = 'Bug' FEATURE = 'Feature' TASK = 'Task' - title = models.CharField(max_length=255, verbose_name='title') date_created = models.DateTimeField(auto_now_add=True) description = models.TextField() @@ -76,7 +72,8 @@ class Issue(models.Model): on_delete=models.CASCADE) author = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.DO_NOTHING, - related_name='issue_author', blank=True, null=True) + related_name='issue_author', + blank=True, null=True) class Comment(models.Model): @@ -87,4 +84,3 @@ class Comment(models.Model): author = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.DO_NOTHING, related_name='comment_author', null=True) - diff --git a/softdesk/support/permissions.py b/softdesk/support/permissions.py index a0a1a06..8f1795e 100644 --- a/softdesk/support/permissions.py +++ b/softdesk/support/permissions.py @@ -1,6 +1,4 @@ from rest_framework.permissions import BasePermission -from support.models import Project, Issue, Comment - class IsAuthor(BasePermission): @@ -18,4 +16,3 @@ class IsContributor(BasePermission): return bool(request.user.is_authenticated and request.user in object.contributors.all() ) - diff --git a/softdesk/support/serializers.py b/softdesk/support/serializers.py index 8ac4af1..b737eb6 100644 --- a/softdesk/support/serializers.py +++ b/softdesk/support/serializers.py @@ -28,15 +28,22 @@ class ProjectSerializer(ModelSerializer): contributors = SlugRelatedField(many=True, read_only='True', slug_field='username') + class Meta: model = Project - fields = ['id', 'author', 'contributors', 'title', 'type', 'date_created'] + fields = ['id', + 'author', + 'contributors', + 'title', + 'type', + 'date_created'] def validate_title(self, value): if Project.objects.filter(title=value).exists(): raise ValidationError("Project already exists.") return value + class ProjectDetailSerializer(ModelSerializer): contributors = SlugRelatedField(many=True, @@ -63,6 +70,7 @@ class IssueListSerializer(ModelSerializer): model = Issue fields = ['id', 'title'] + class IssueSerializer(ModelSerializer): author = StringRelatedField(many=False) @@ -73,11 +81,9 @@ class IssueSerializer(ModelSerializer): class IssueDetailSerializer(ModelSerializer): - comments = SerializerMethodField() author = StringRelatedField(many=False) - class Meta: model = Issue fields = ['title', 'project', 'date_created', 'priority', diff --git a/softdesk/support/views.py b/softdesk/support/views.py index 91ea709..c54b753 100644 --- a/softdesk/support/views.py +++ b/softdesk/support/views.py @@ -4,10 +4,8 @@ from authentication.models import User from support.serializers import (ProjectSerializer, ProjectDetailSerializer, ContributorSerializer, - ContributorListSerializer, IssueSerializer, IssueDetailSerializer, - IssueListSerializer, CommentListSerializer, CommentDetailSerializer) from authentication.serializers import UserListSerializer @@ -15,9 +13,9 @@ from rest_framework.response import Response from rest_framework import status from rest_framework.permissions import (IsAuthenticated, IsAuthenticatedOrReadOnly) -from support.permissions import IsAuthor, IsContributor +from support.permissions import IsContributor from rest_framework.decorators import action -from django.core.exceptions import PermissionDenied, ObjectDoesNotExist +from django.core.exceptions import PermissionDenied class ProjectViewSet(ModelViewSet): @@ -25,7 +23,6 @@ class ProjectViewSet(ModelViewSet): serializer_class = ProjectSerializer detail_serializer_class = ProjectDetailSerializer - def get_queryset(self): """ add a filter on contributor or author in querystring @@ -35,25 +32,24 @@ class ProjectViewSet(ModelViewSet): try: user = User.objects.get(username=requested_contributor) return Project.objects.filter(contributors=user) - except: + except User.DoesNotExist: return User.objects.filter(username=requested_contributor) if self.request.GET.get('author'): requested_author = self.request.GET.get('author') try: user = User.objects.get(username=requested_author) return Project.objects.filter(author=user) - except: + except User.DoesNotExist: return User.objects.filter(username=requested_author) return Project.objects.filter(active=True) - def retrieve(self, request, *args, **kwargs): """ check if requestor is in the project's contributor Raises exception or returns project detail """ project = self.get_object() - if not request.user in project.contributors.all(): + if request.user not in project.contributors.all(): raise PermissionDenied() return Response(ProjectDetailSerializer(project).data) @@ -65,7 +61,9 @@ class ProjectViewSet(ModelViewSet): project = self.get_object() if not request.user == project.author: raise PermissionDenied() - serialized = ProjectDetailSerializer(project, data=request.data, partial=True) + serialized = ProjectDetailSerializer(project, + data=request.data, + partial=True) if serialized.is_valid(raise_exception=True): serialized.save() return Response(serialized.data) @@ -80,17 +78,18 @@ class ProjectViewSet(ModelViewSet): @action(detail=True, methods=['patch'], permission_classes=[IsContributor]) def contributor(self, request, pk): - """Add a contributor to a project + """ + Add a contributor to a project by creating a ProjectContributor's instance """ - #check if requestor is contributor - if not request.user in Project.objects.get(id=pk).contributors.all(): + # check if requestor is contributor + if request.user not in Project.objects.get(id=pk).contributors.all(): raise PermissionDenied() - if request.data is None or not 'contributor' in request.data: + if request.data is None or 'contributor' not in request.data: response = {"detail": "Key error;`contributor` is expected"} return Response(response, status=status.HTTP_400_BAD_REQUEST) requested_contributor = request.data['contributor'] - #get the user's instance + # get the user's instance try: user = User.objects.get(username=requested_contributor) data = {'contributor': user.id, 'project': int(pk)} @@ -98,12 +97,12 @@ class ProjectViewSet(ModelViewSet): project = Project.objects.get(id=pk) if serializer.is_valid(): serializer.save() - response = {"detail": f"User {user}" + response = {"detail": f"User {user}" f"added to project ''{project}''"} return Response(response, status=status.HTTP_202_ACCEPTED) response = {"detail": "This user is already contributing"} return Response(response, status=status.HTTP_226_IM_USED) - except: + except User.DoesNotExist: response = {"detail": "User doesn't exist"} return Response(response, status=status.HTTP_404_NOT_FOUND) @@ -125,13 +124,13 @@ class IssueViewSet(ModelViewSet): """ if self.request.GET.get('project'): project_id = int(self.request.GET.get('project')) - if not self.request.user in Project.objects.get( + if self.request.user not in Project.objects.get( id=project_id).contributors.all(): raise PermissionDenied() return Issue.objects.filter(project=project_id) projects = Project.objects.filter( contributors=self.request.user).values('id') - #query on a list + # query on a list return Issue.objects.filter(project__in=projects) def perform_update(self, serializer): @@ -167,7 +166,7 @@ class IssueViewSet(ModelViewSet): raise PermissionDenied() def create(self, request, *args, **kwargs): - if not 'project' in request.data: + if 'project' not in request.data: return Response("A project id is required", status=status.HTTP_400_BAD_REQUEST) project = Project.objects.get(id=request.data['project']) @@ -183,7 +182,7 @@ class IssueViewSet(ModelViewSet): "detail": f"Issue {issue.id} created for project {project}", "data": serializer.data } - return Response(response, status = status.HTTP_201_CREATED) + return Response(response, status=status.HTTP_201_CREATED) class CommentViewSet(ModelViewSet): @@ -200,11 +199,12 @@ class CommentViewSet(ModelViewSet): if self.request.GET.get('issue'): issue_id = int(self.request.GET.get('issue')) project = Issue.objects.get(id=issue_id).project - if not self.request.user in project.contributors.all(): + if self.request.user not in project.contributors.all(): raise PermissionDenied() return Comment.objects.filter(issue=issue_id) - #or returns those from projects where requestor is contributing - projects = Project.objects.filter(contributors=self.request.user).values('id') + # or returns those from projects where requestor is contributing + projects = Project.objects.filter( + contributors=self.request.user).values('id') issues = Issue.objects.filter(project__in=projects) return Comment.objects.filter(issue__in=issues) @@ -226,4 +226,3 @@ class CommentViewSet(ModelViewSet): return Response(response, status=status.HTTP_201_CREATED) response = {"detail": f"{user} isn't contributor for '{project}'"} return Response(response, status=status.HTTP_403_FORBIDDEN) -