refactor [P-36]: декомпозиция конструктора + адаптация под создания тестов

This commit is contained in:
Denzel committed 2025-03-03 12:55:04 +03:00
1 parent 6b69addc8b
commit 6b38f3b4d2
23 files changed
+3044 -3859

No files matched your search

+12
View File
@@ -0,0 +1,12 @@
[MASTER]
load-plugins=pylint_django
init-hook='import sys; sys.path.append("/back/"); import os; os.environ["DJANGO_SETTINGS_MODULE"] = "portal.settings"; import django; django.setup()'
[FORMAT]
# Настройки форматирования
max-line-length=100
[MESSAGES CONTROL]
# Отключение определенных сообщений
disable=C0114 # Missing module docstring
View File
Whitespace-only changes.
+3
View File
@@ -20,6 +20,9 @@ class getuserAPIView(APIView):
Если дать дополнительный параметр fullinfo = True, то будет выдаваться информация с комиссиями и ответсвенностью
"""
resp = None
fullinfo = request.query_params.get('fullinfo')
queryset = DictEmployee.objects.get(login=request.query_params.get('userlogin'))
+2804
View File
File diff suppressed because it is too large. Load diff
+136
View File
@@ -0,0 +1,136 @@
[project]
name = "portal"
version = "0.1.0"
description = ""
authors = [
{name = "Your Name",email = "you@example.com"}
]
readme = "README.md"
requires-python = ">=3.10,<4.0"
dependencies = [
"anyio (>=4.8.0,<5.0.0)",
"asgiref (>=3.8.1,<4.0.0)",
"async-timeout (>=5.0.1,<6.0.0)",
"attrs (>=25.1.0,<26.0.0)",
"autobahn (>=24.4.2,<25.0.0)",
"automat (>=24.8.1,<25.0.0)",
"backports-tarfile (>=1.2.0,<2.0.0)",
"build (==1.2.2.post1)",
"cachecontrol (>=0.14.2,<0.15.0)",
"certifi (>=2025.1.31,<2026.0.0)",
"cffi (>=1.17.1,<2.0.0)",
"channels (>=4.2.0,<5.0.0)",
"channels-redis (>=4.2.1,<5.0.0)",
"charset-normalizer (>=3.4.1,<4.0.0)",
"cleo (>=2.1.0,<3.0.0)",
"constantly (>=23.10.4,<24.0.0)",
"crashtest (>=0.4.1,<0.5.0)",
"cryptography (>=44.0.1,<45.0.0)",
"daphne (>=4.1.2,<5.0.0)",
"defusedxml (>=0.7.1,<0.8.0)",
"distlib (>=0.3.9,<0.4.0)",
"django (>=5.1.6,<6.0.0)",
"django-ckeditor (>=6.7.2,<7.0.0)",
"django-ckeditor-5 (>=0.2.17,<0.3.0)",
"django-cors-headers (>=4.7.0,<5.0.0)",
"django-filter (>=25.1,<26.0)",
"django-grappelli (>=4.0.1,<5.0.0)",
"django-js-asset (>=3.1.0,<4.0.0)",
"django-templated-mail (>=1.1.1,<2.0.0)",
"djangorestframework (>=3.15.2,<4.0.0)",
"djangorestframework-simplejwt (>=5.5.0,<6.0.0)",
"djoser (>=2.3.1,<3.0.0)",
"drf-yasg (>=1.21.9,<2.0.0)",
"dulwich (>=0.22.7,<0.23.0)",
"et-xmlfile (>=2.0.0,<3.0.0)",
"exceptiongroup (>=1.2.2,<2.0.0)",
"fastjsonschema (>=2.21.1,<3.0.0)",
"filelock (>=3.17.0,<4.0.0)",
"findpython (>=0.6.2,<0.7.0)",
"h11 (>=0.14.0,<0.15.0)",
"httpcore (>=1.0.7,<2.0.0)",
"httpx (>=0.28.1,<0.29.0)",
"hyperlink (>=21.0.0,<22.0.0)",
"idna (>=3.10,<4.0)",
"importlib-metadata (>=8.6.1,<9.0.0)",
"incremental (>=24.7.2,<25.0.0)",
"inflection (>=0.5.1,<0.6.0)",
"installer (>=0.7.0,<0.8.0)",
"jaraco-classes (>=3.4.0,<4.0.0)",
"jaraco-context (>=6.0.1,<7.0.0)",
"jaraco-functools (>=4.1.0,<5.0.0)",
"jeepney (>=0.9.0,<0.10.0)",
"keyring (>=25.6.0,<26.0.0)",
"markdown (>=3.7,<4.0)",
"more-itertools (>=10.6.0,<11.0.0)",
"msgpack (>=1.1.0,<2.0.0)",
"mysqlclient (>=2.2.7,<3.0.0)",
"numpy (>=2.2.3,<3.0.0)",
"oauthlib (>=3.2.2,<4.0.0)",
"openpyxl (>=3.1.5,<4.0.0)",
"packaging (>=24.2,<25.0)",
"pandas (>=2.2.3,<3.0.0)",
"pbs-installer (>=2025.2.12,<2026.0.0)",
"pillow (>=11.1.0,<12.0.0)",
"pkginfo (>=1.12.1.2,<2.0.0.0)",
"platformdirs (>=4.3.6,<5.0.0)",
"pyasn1 (>=0.6.1,<0.7.0)",
"pyasn1-modules (>=0.4.1,<0.5.0)",
"pycparser (>=2.22,<3.0)",
"pyopenssl (>=25.0.0,<26.0.0)",
"pyproject-hooks (>=1.2.0,<2.0.0)",
"python-dateutil (>=2.9.0.post0,<3.0.0)",
"python3-openid (>=3.2.0,<4.0.0)",
"pytz (>=2025.1,<2026.0)",
"pyyaml (>=6.0.2,<7.0.0)",
"rapidfuzz (>=3.12.1,<4.0.0)",
"redis (>=5.2.1,<6.0.0)",
"requests (>=2.32.3,<3.0.0)",
"requests-oauthlib (>=2.0.0,<3.0.0)",
"requests-toolbelt (>=1.0.0,<2.0.0)",
"secretstorage (>=3.3.3,<4.0.0)",
"service-identity (>=24.2.0,<25.0.0)",
"shellingham (>=1.5.4,<2.0.0)",
"six (>=1.17.0,<2.0.0)",
"sniffio (>=1.3.1,<2.0.0)",
"social-auth-app-django (>=5.4.3,<6.0.0)",
"social-auth-core (>=4.5.6,<5.0.0)",
"sqlparse (>=0.5.3,<0.6.0)",
"tomli (>=2.2.1,<3.0.0)",
"tomlkit (>=0.13.2,<0.14.0)",
"trove-classifiers (>=2025.2.18.16,<2026.0.0.0)",
"twisted (>=24.11.0,<25.0.0)",
"txaio (>=23.1.1,<24.0.0)",
"typing-extensions (>=4.12.2,<5.0.0)",
"tzdata (>=2025.1,<2026.0)",
"uritemplate (>=4.1.1,<5.0.0)",
"urllib3 (>=2.3.0,<3.0.0)",
"virtualenv (>=20.29.2,<21.0.0)",
"xlsxwriter (>=3.2.2,<4.0.0)",
"zipp (>=3.21.0,<4.0.0)",
"zope-interface (>=7.2,<8.0)",
"zstandard (>=0.23.0,<0.24.0)"
]
[tool.poetry]
package-mode = false
[tool.poetry.group.dev.dependencies]
black = "^25.1.0"
pylint = "^3.3.4"
pylint-django = "^2.6.1"
isort = "^6.0.1"
[build-system]
requires = ["poetry-core>=2.0.0,<3.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.black]
line-length = 100
target-version = ['py310']
extend-exclude = '''
(
migrations # Django DB migrations
)
'''
BIN
View File
Binary file not shown.
+19
View File
@@ -0,0 +1,19 @@
import globals from "globals";
import pluginJs from "@eslint/js";
import pluginVue from "eslint-plugin-vue";
/** @type {import('eslint').Linter.Config[]} */
export default [
{files: ["**/*.{js,mjs,cjs,vue}"]
},
{languageOptions: { globals: {...globals.browser, ...globals.node} }},
pluginJs.configs.recommended,
...pluginVue.configs["flat/essential"],
{rules: {
'no-console': 'error',
}},
];
-3692
View File
File diff suppressed because it is too large. Load diff
+18 -2
View File
@@ -6,7 +6,9 @@
"dev": "vite",
"build": "vite build",
"preview": "vite preview",
"docs": "vuepress build docs"
"formatter":"prettier --write",
"linter":"eslint --fix"
},
"dependencies": {
"@ckeditor/ckeditor5-build-classic": "^44.1.0",
@@ -43,6 +45,20 @@
"leaflet": "^1.9.4",
"sass-embedded": "^1.83.4",
"vite": "^6.0.11",
"vite-plugin-vuetify": "^2.1.0"
"vite-plugin-vuetify": "^2.1.0",
"@commitlint/cli": "^19.7.1",
"@commitlint/config-conventional": "^19.7.1",
"@eslint/js": "^9.19.0",
"commitlint": "^19.7.1",
"eslint": "^9.19.0",
"eslint-config-prettier": "^10.0.1",
"eslint-plugin-prettier": "^5.2.3",
"eslint-plugin-vue": "^9.32.0",
"globals": "^15.14.0",
"prettier": "^3.4.2",
"vitepress": "^1.6.3"
}
}
+6 -7
View File
@@ -8,12 +8,12 @@
<structure-inspection />
</v-window-item>
<v-window-item class="gap h-100" value="openVacancies">
<open-vacancies/>
<open-vacancies />
</v-window-item>
<v-window-item class="gap h-100" value="contactInfo">
<contact-info />aasddasd
<contact-info />
</v-window-item>
</template>aassssssrr
</template>
</pattern-tabs>
</template>
@@ -23,7 +23,7 @@ import ContactInfo from "@/components/about_inspection/contacts/ContactInfo.vue"
import { pagecounter } from "@/utils/universal_functions";
import PatternTabs from "@/components/UI/PatternTabs.vue";
import GeneralInformation from "@/components/about_inspection/general_information/GeneralInformation.vue";
import OpenVacancies from '@/components/about_inspection/open_vacancies/OpenVacancies.vue';
import OpenVacancies from "@/components/about_inspection/open_vacancies/OpenVacancies.vue";
export default {
components: {
@@ -31,12 +31,11 @@ export default {
ContactInfo,
PatternTabs,
GeneralInformation,
OpenVacancies
OpenVacancies,
},
setup() {
pagecounter();
pagecounter();
return {
tabs_items: [
{ title: "Общая информация", value: "mainInfo" },
View File
Whitespace-only changes.