Skip to content

Commit 813d9b9

Browse files
committed
update branch
1 parent feca5b9 commit 813d9b9

8 files changed

Lines changed: 66 additions & 36 deletions

File tree

.gitignore

Lines changed: 47 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,60 @@
1-
```gitignore
2-
# Python cache
1+
```
2+
# Python
33
__pycache__/
4-
*.pyc
5-
*.pyo
6-
*.pyd
4+
*.py[cod]
5+
*$py.class
6+
*.so
7+
.Python
8+
build/
9+
develop-eggs/
10+
dist/
11+
downloads/
12+
eggs/
13+
.eggs/
14+
lib/
15+
lib64/
16+
parts/
17+
sdist/
18+
var/
19+
wheels/
20+
*.egg-info/
21+
.installed.cfg
22+
*.egg
723

8-
# Dependencies
9-
.venv/
24+
# Virtual environments
1025
venv/
26+
ENV/
27+
env.bak/
28+
.venv/
1129
env/
12-
.env
13-
.env.local
14-
.env.*
30+
ENV/
31+
32+
# IDE
33+
.vscode/
34+
.idea/
35+
*.swp
36+
*.swo
1537

1638
# Logs
1739
*.log
1840

19-
# Coverage
41+
# Environment variables
42+
.env
43+
.env.local
44+
*.env.*
45+
46+
# Coverage reports
2047
.coverage
2148
htmlcov/
22-
coverage/
49+
.coverage.*
50+
.cache
2351

24-
# IDE
25-
.vscode/
26-
.idea/
27-
*.swp
28-
*.swo
52+
# Pytest
53+
.pytest_cache/
54+
55+
# MyPy
56+
.mypy_cache/
2957

30-
# OS
31-
.DS_Store
32-
Thumbs.db
58+
# Distribution / packaging
59+
.pybuild/
3360
```

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,6 @@ dev = [
4747
"pip-audit (>=2.10.1,<3.0.0)",
4848
"import-linter (>=2.11,<3.0)"
4949
]
50+
51+
[tool.ruff]
52+
lint.ignore = ["F821"]

src/modules/authorization/infrastructure/models/permission_model.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ class PermissionModel(Base, TimeStampMixin, SoftDeleteMixin):
3030
description: Mapped[str | None] = mapped_column(String(255), nullable=True)
3131

3232
# Relationships
33-
roles: Mapped[list["RolePermissionModel"]] = relationship(
33+
roles: Mapped[list["RolePermissionModel"]] = relationship( # type: ignore[name-defined]
3434
back_populates="permission",
3535
cascade="all, delete-orphan",
3636
)
37-
authorization_resource: Mapped["AuthorizationResourceModel"] = relationship(
37+
authorization_resource: Mapped["AuthorizationResourceModel"] = relationship( # type: ignore[name-defined]
3838
back_populates="permissions",
3939
foreign_keys=[resource_id],
4040
)

src/modules/authorization/infrastructure/models/resource_model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class AuthorizationResourceModel(Base, TimeStampMixin, SoftDeleteMixin):
2020
description: Mapped[str | None] = mapped_column(String(255), nullable=True)
2121

2222
# Relationships
23-
permissions: Mapped[list["PermissionModel"]] = relationship(
23+
permissions: Mapped[list["PermissionModel"]] = relationship( # type: ignore[name-defined]
2424
back_populates="authorization_resource",
2525
cascade="all, delete-orphan",
2626
)

src/modules/authorization/infrastructure/models/role_permission_model.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ class RolePermissionModel(Base):
2727
permission_id: Mapped[UUID] = mapped_column(nullable=False)
2828

2929
# Relationships
30-
role: Mapped["RoleModel"] = relationship(
30+
role: Mapped["RoleModel"] = relationship( # type: ignore[name-defined]
3131
back_populates="permissions",
3232
foreign_keys=[role_id],
3333
)
34-
permission: Mapped["PermissionModel"] = relationship(
34+
permission: Mapped["PermissionModel"] = relationship( # type: ignore[name-defined]
3535
back_populates="roles",
3636
foreign_keys=[permission_id],
3737
)

src/modules/authorization/infrastructure/models/user_has_role_model.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ class UserHasRoleModel(Base):
2727
role_id: Mapped[UUID] = mapped_column(nullable=False)
2828

2929
# Relationships
30-
user: Mapped["UserModel"] = relationship(
30+
user: Mapped["UserModel"] = relationship( # type: ignore[name-defined]
3131
back_populates="role_assignments",
3232
foreign_keys=[user_id],
3333
)
34-
role: Mapped["RoleModel"] = relationship(
34+
role: Mapped["RoleModel"] = relationship( # type: ignore[name-defined]
3535
back_populates="user_assignments",
3636
foreign_keys=[role_id],
3737
)

src/modules/user/infrastructure/models/refresh_token_model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class UserSessionModel(Base, TimeStampMixin, SoftDeleteMixin):
5252
revoked_reason: Mapped[str | None] = mapped_column(String(255), nullable=True)
5353

5454
# Relationship
55-
user: Mapped["UserModel"] = relationship(
55+
user: Mapped["UserModel"] = relationship( # type: ignore[name-defined]
5656
back_populates="sessions",
5757
foreign_keys=[user_id],
5858
)

src/modules/user/infrastructure/models/user_model.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -60,40 +60,40 @@ class UserModel(
6060
)
6161

6262
# Relationships (one-to-one)
63-
profile: Mapped["UserProfileModel"] = relationship(
63+
profile: Mapped["UserProfileModel"] = relationship( # type: ignore[name-defined]
6464
back_populates="user",
6565
uselist=False,
6666
cascade="all, delete-orphan",
6767
)
68-
security: Mapped["UserSecurityModel"] = relationship(
68+
security: Mapped["UserSecurityModel"] = relationship( # type: ignore[name-defined]
6969
back_populates="user",
7070
uselist=False,
7171
cascade="all, delete-orphan",
7272
)
73-
settings: Mapped["UserSettingsModel"] = relationship(
73+
settings: Mapped["UserSettingsModel"] = relationship( # type: ignore[name-defined]
7474
back_populates="user",
7575
uselist=False,
7676
cascade="all, delete-orphan",
7777
)
7878

7979
# Relationships (one-to-many)
80-
contacts: Mapped[list["UserContactModel"]] = relationship(
80+
contacts: Mapped[list["UserContactModel"]] = relationship( # type: ignore[name-defined]
8181
back_populates="user",
8282
cascade="all, delete-orphan",
8383
)
84-
addresses: Mapped[list["UserAddressModel"]] = relationship(
84+
addresses: Mapped[list["UserAddressModel"]] = relationship( # type: ignore[name-defined]
8585
back_populates="user",
8686
cascade="all, delete-orphan",
8787
)
88-
verifications: Mapped[list["UserVerificationModel"]] = relationship(
88+
verifications: Mapped[list["UserVerificationModel"]] = relationship( # type: ignore[name-defined]
8989
back_populates="user",
9090
cascade="all, delete-orphan",
9191
)
92-
sessions: Mapped[list["UserSessionModel"]] = relationship(
92+
sessions: Mapped[list["UserSessionModel"]] = relationship( # type: ignore[name-defined]
9393
back_populates="user",
9494
cascade="all, delete-orphan",
9595
)
96-
role_assignments: Mapped[list["UserHasRoleModel"]] = relationship(
96+
role_assignments: Mapped[list["UserHasRoleModel"]] = relationship( # type: ignore[name-defined]
9797
back_populates="user",
9898
cascade="all, delete-orphan",
9999
)

0 commit comments

Comments
 (0)