Skip to content

Commit dc5e1d2

Browse files
committed
delint
Signed-off-by: Sylvain Hellegouarch <sh@defuze.org>
1 parent d073032 commit dc5e1d2

File tree

7 files changed

+19
-19
lines changed

7 files changed

+19
-19
lines changed

reliably/backend/reliably_app/database.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
]
3030

3131

32-
SessionLocal = sessionmaker(
32+
SessionLocal = sessionmaker( # type: ignore
3333
autocommit=False,
3434
autoflush=False,
3535
expire_on_commit=False,

reliably/backend/reliably_app/deployment/schemas.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,16 +182,16 @@ def dump_to_dict(dep: Deployment | DeploymentCreate) -> Dict[str, Any]:
182182

183183
match dep.definition.type:
184184
case "k8s_job":
185-
if dep.definition.credentials: # type: ignore
186-
c = dep.definition.credentials.get_secret_value() # type: ignore # noqa
185+
if dep.definition.credentials:
186+
c = dep.definition.credentials.get_secret_value()
187187
dump["definition"]["credentials"] = base64.b64encode(
188188
encrypt(c, settings) # type: ignore
189189
).decode("utf-8")
190190
else:
191191
dump["definition"]["credentials"] = None
192192
case "github":
193-
if dep.definition.token: # type: ignore
194-
c = dep.definition.token.get_secret_value() # type: ignore
193+
if dep.definition.token:
194+
c = dep.definition.token.get_secret_value()
195195
dump["definition"]["token"] = base64.b64encode(
196196
encrypt(c, settings) # type: ignore
197197
).decode("utf-8")

reliably/backend/reliably_app/login/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def register_oauth_providers(settings: Settings) -> None:
2323
overwrite=True,
2424
client_id=settings.OAUTH_GITHUB_CLIENT_ID,
2525
client_secret=settings.OAUTH_GITHUB_CLIENT_SECRET.get_secret_value(), # type: ignore # noqa
26-
**GitHub.OAUTH_CONFIG, # type: ignore
26+
**GitHub.OAUTH_CONFIG,
2727
)
2828
OAUTH_PROVIDERS.append("github")
2929

@@ -33,7 +33,7 @@ def register_oauth_providers(settings: Settings) -> None:
3333
overwrite=True,
3434
client_id=settings.OAUTH_GOOGLE_CLIENT_ID,
3535
client_secret=settings.OAUTH_GOOGLE_CLIENT_SECRET.get_secret_value(), # type: ignore # noqa
36-
**Google.OAUTH_CONFIG, # type: ignore
36+
**Google.OAUTH_CONFIG,
3737
)
3838
OAUTH_PROVIDERS.append("google")
3939

@@ -48,7 +48,7 @@ def register_oauth_providers(settings: Settings) -> None:
4848
server_metadata_url=f"{okta_base_url}/oauth2/default/.well-known/oauth-authorization-server", # noqa
4949
access_token_url=f"{okta_base_url}/oauth2/default/v1/token",
5050
authorize_url=f"{okta_base_url}/oauth2/default/v1/authorize",
51-
**Okta.OAUTH_CONFIG, # type: ignore
51+
**Okta.OAUTH_CONFIG,
5252
)
5353
OAUTH_PROVIDERS.append("okta")
5454

reliably/backend/reliably_app/middlewares.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,27 +18,27 @@ def configure_middlewares(app: FastAPI, settings: Settings) -> None:
1818

1919
def configure_sec(app: FastAPI, settings: Settings) -> None:
2020
app.add_middleware(
21-
Secweb.CacheControl.CacheControlMiddleware.CacheControl,
21+
Secweb.CacheControl.CacheControlMiddleware.CacheControl, # type: ignore
2222
Option={
2323
"s-maxage": 3600,
2424
"must-revalidate": True,
2525
"no-transform": True,
2626
},
2727
)
28-
app.add_middleware(Secweb.XContentTypeOptions.XContentTypeOptions)
29-
app.add_middleware(Secweb.StrictTransportSecurity.HSTS)
30-
app.add_middleware(Secweb.OriginAgentCluster.OriginAgentCluster)
28+
app.add_middleware(Secweb.XContentTypeOptions.XContentTypeOptions) # type: ignore
29+
app.add_middleware(Secweb.StrictTransportSecurity.HSTS) # type: ignore
30+
app.add_middleware(Secweb.OriginAgentCluster.OriginAgentCluster) # type: ignore
3131
app.add_middleware(
32-
Secweb.XFrameOptions.XFrame,
32+
Secweb.XFrameOptions.XFrame, # type: ignore
3333
Option="SAMEORIGIN",
3434
)
35-
app.add_middleware(Secweb.xXSSProtection.xXSSProtection)
35+
app.add_middleware(Secweb.xXSSProtection.xXSSProtection) # type: ignore
3636
app.add_middleware(
37-
Secweb.ReferrerPolicy.ReferrerPolicy,
37+
Secweb.ReferrerPolicy.ReferrerPolicy, # type: ignore
3838
Option=["no-referrer-when-downgrade"],
3939
)
4040
app.add_middleware(
41-
Secweb.ContentSecurityPolicy.ContentSecurityPolicyMiddleware.ContentSecurityPolicy, # noqa
41+
Secweb.ContentSecurityPolicy.ContentSecurityPolicyMiddleware.ContentSecurityPolicy, # type: ignore # noqa
4242
Option={
4343
"default-src": ["'self'"],
4444
"script-src": [

reliably/backend/reliably_app/migrations/env.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def run_sync_migrations_online(connectable: Engine | None) -> None:
116116

117117
def run_migrations_online() -> None:
118118
"""Run migrations in 'online' mode."""
119-
connectable: Engine | AsyncEngine = config.attributes.get(
119+
connectable: Engine | AsyncEngine = config.attributes.get( # type: ignore
120120
"connection", None
121121
)
122122

reliably/backend/reliably_app/plan/providers/k8s.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -730,7 +730,7 @@ async def supervise_job(
730730

731731
j = job.status.active[0]
732732
job = get_k8s_job(k8s_client, j.name, j.namespace, False)
733-
status = job.status
733+
status = job.status # type: ignore
734734
else:
735735
status = job.status
736736

reliably/backend/reliably_app/snapshot/service.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ async def get_data(
253253
elif isinstance(c, dict):
254254
converted_candidates = []
255255
for c in candidates:
256-
converted_candidates.extend([f"{k}={v}" for k, v in c.items()])
256+
converted_candidates.extend([f"{k}={v}" for k, v in c.items()]) # type: ignore
257257
candidates = sorted(set(converted_candidates))
258258

259259
return {

0 commit comments

Comments
 (0)