-
Notifications
You must be signed in to change notification settings - Fork 561
chore(api): refresh lock file, constraining the dev toolchain #8469
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -40,7 +40,7 @@ dependencies = [ | |
| "drf-spectacular>=0.28.0,<0.29.0", | ||
| "sentry-sdk>=2.24.1,<3", | ||
| "environs>=14.1.1,<15.0.0", | ||
| "django-lifecycle>=1.2.4,<1.3.0", | ||
| "django-lifecycle>=1.2.4,<1.2.5", | ||
| "drf-writable-nested>=0.6.2,<0.7.0", | ||
| "django-filter>=2.4.0,<2.5.0", | ||
| "flagsmith-flag-engine>=11.0.0,<12.0.0", | ||
|
|
@@ -106,19 +106,19 @@ dev = [ | |
| "pep8>=1.7.1,<1.8.0", | ||
| "autopep8>=2.0.1,<2.1.0", | ||
| "pytest>=9.0.3,<9.1.0", | ||
| "pytest-django>=4.8.0,<5.0.0", | ||
| "pytest-django>=4.8.0,<4.9.0", | ||
| "pytest-cov>=4.1.0,<4.2.0", | ||
| "datamodel-code-generator>=0.64,<0.65", | ||
| "requests-mock>=1.11.0,<2.0.0", | ||
| "django-extensions>=3.2.3,<4.0.0", | ||
| "pdbpp>=0.10.3,<0.11.0", | ||
| "pdbpp>=0.12.1,<0.13.0", | ||
| "mypy-boto3-dynamodb>=1.33.0,<2.0.0", | ||
| "mypy-boto3-s3>=1.36.0,<2.0.0", | ||
|
Comment on lines
115
to
116
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win 🔎 Supported by static analysis🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
(
cd api
uv lock --check
)
rg -n -A2 'name = "(boto3|boto3-stubs|mypy-boto3-dynamodb|mypy-boto3-s3)"' api/uv.lockRepository: Flagsmith/flagsmith Length of output: 197 Align the Boto3 stub version bounds.
|
||
| "pytest-structlog>=1.1,<2.0.0", | ||
| "pyfakefs>=6,<7", | ||
| "mypy>=1.15.0,<2.0.0", | ||
| "djangorestframework-stubs>=3.15.2,<4.0.0", | ||
| "boto3-stubs>=1.36.20,<2.0.0", | ||
| "mypy>=1.15.0,<1.16.0", | ||
| "djangorestframework-stubs>=3.15.2,<3.16.0", | ||
| "boto3-stubs>=1.36.20,<1.37.0", | ||
| "types-requests>=2.32.0.20241016,<3.0.0", | ||
| "types-markdown>=3.7.0.20241204,<4.0.0", | ||
| "types-pygments>=2.19.0.20250107,<3.0.0", | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -344,15 +344,15 @@ def get_user_organisation( # type: ignore[return] | |
| def get_permitted_projects( | ||
| self, | ||
| permission_key: str, | ||
| tag_ids: typing.List[int] = None, # type: ignore[assignment] | ||
| tag_ids: list[int] | None = None, | ||
| ) -> QuerySet[Project]: | ||
| return get_permitted_projects_for_user(self, permission_key, tag_ids) | ||
| return get_permitted_projects_for_user(self, permission_key, tag_ids) # type: ignore[arg-type] | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win 🔎 Supported by static analysis🏁 Script executed: rg -n -A10 -B2 'def get_permitted_(projects|environments)_for_user' api/permissions/permission_service.pyRepository: Flagsmith/flagsmith Length of output: 1028 🏁 Script executed: #!/bin/bash
set -e
printf '%s\n' '--- api/users/models.py ---'
sed -n '320,395p' api/users/models.py
printf '%s\n' '--- api/permissions/permission_service.py ---'
sed -n '1,175p' api/permissions/permission_service.py
printf '%s\n' '--- repository type/version context ---'
rg -n 'python_requires|target-version|requires-python|python_version|from __future__ import annotations' pyproject.toml setup.cfg setup.py tox.ini .pre-commit-config.yaml api/users/models.py api/permissions/permission_service.py 2>/dev/null || trueRepository: Flagsmith/flagsmith Length of output: 9748 🤖 get_repo_knowledge executed:
Length of output: 46814 Align the optional
|
||
|
|
||
| def has_project_permission( | ||
| self, | ||
| permission: str, | ||
| project: Project, | ||
| tag_ids: typing.List[int] = None, # type: ignore[assignment] | ||
| tag_ids: list[int] | None = None, | ||
| ) -> bool: | ||
| if self.is_project_admin(project): | ||
| return True | ||
|
|
@@ -375,11 +375,15 @@ def get_permitted_environments( | |
| self, | ||
| permission_key: str, | ||
| project: Project, | ||
| tag_ids: typing.List[int] = None, # type: ignore[assignment] | ||
| tag_ids: list[int] | None = None, | ||
| prefetch_metadata: bool = False, | ||
| ) -> QuerySet["Environment"]: | ||
| return get_permitted_environments_for_user( | ||
| self, project, permission_key, tag_ids, prefetch_metadata=prefetch_metadata | ||
| self, | ||
| project, | ||
| permission_key, | ||
| tag_ids, # type: ignore[arg-type] | ||
| prefetch_metadata=prefetch_metadata, | ||
| ) | ||
|
|
||
| @staticmethod | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win
🔎 Supported by static analysis
🤖 get_repo_knowledge executed:
get_repo_knowledge Flagsmith/flagsmith /tmp/coderabbit-repo-knowledge/flagsmith-flagsmith-a74d157a/learnings /tmp/coderabbit-repo-knowledge/flagsmith-flagsmith-a74d157a/architectureLength of output: 40238
🏁 Script executed:
Repository: Flagsmith/flagsmith
Length of output: 241
🏁 Script executed:
Repository: Flagsmith/flagsmith
Length of output: 6824
🤖 get_repo_knowledge executed:
get_repo_knowledge Flagsmith/flagsmith /tmp/coderabbit-repo-knowledge/flagsmith-flagsmith-a74d157aLength of output: 860
Document the retained
# type: ignore[...]directives.Add a short reason or removal condition to each listed suppression. The
no-any-returndirectives suppress Redis client return typing, and theunion-attrdirectives suppress permission-call typing onrequest.user. The surrounding code does not document these typing limitations.📍 Affects 5 files
api/core/redis_cluster.py#L133-L133(this comment)api/experimentation/ingestion_sync_service.py#L21-L21api/features/feature_states/permissions.py#L17-L17api/features/import_export/permissions.py#L22-L22api/features/import_export/permissions.py#L31-L31api/features/import_export/permissions.py#L41-L41api/features/import_export/permissions.py#L52-L52api/features/import_export/permissions.py#L63-L63api/organisations/permissions/permissions.py#L233-L233Source: Learnings