Skip to content

Commit c0deb3a

Browse files
committed
Fix E1131: unsupported operand type(s) for | (unsupported-binary-operation)
1 parent bc489d7 commit c0deb3a

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

functions/host-info/main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""Main module for the host-info function handler."""
22

33
from logging import Logger
4-
from typing import Dict
4+
from typing import Dict, Optional, Union
55

66
from crowdstrike.foundry.function import Function, Request, Response
77

@@ -11,7 +11,7 @@
1111

1212

1313
@FUNC.handler(method="POST", path="/host-info")
14-
def on_post(request: Request, _config: Dict[str, object] | None, logger: Logger) -> Response:
14+
def on_post(request: Request, _config: Optional[Dict[str, object]], logger: Logger) -> Response:
1515
"""
1616
Handle POST requests to /host-info endpoint.
1717

functions/servicenow/main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""Main module for the ServiceNow function handler."""
22

33
from logging import Logger
4-
from typing import Dict
4+
from typing import Dict, Optional
55

66
from crowdstrike.foundry.function import Function, Request, Response, APIError
77
from falconpy import APIIntegrations
@@ -10,7 +10,7 @@
1010

1111

1212
@FUNC.handler(method="POST", path="/ticket")
13-
def on_post(request: Request, _config: Dict[str, object] | None, logger: Logger) -> Response:
13+
def on_post(request: Request, _config: Optional[Dict[str, object]], logger: Logger) -> Response:
1414
"""
1515
Create an incident ticket in ServiceNow using the Table API.
1616

functions/user-management/main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""Main module for the user-management function handler."""
22

33
from logging import Logger
4-
from typing import Dict
4+
from typing import Dict, Optional
55

66
from crowdstrike.foundry.function import Function, Request, Response
77

@@ -11,7 +11,7 @@
1111

1212

1313
@FUNC.handler(method="POST", path="/create-user")
14-
def on_post(request: Request, _config: Dict[str, object] | None, logger: Logger) -> Response:
14+
def on_post(request: Request, _config: Optional[Dict[str, object]], logger: Logger) -> Response:
1515
"""
1616
Handle POST requests to /create-user endpoint.
1717

0 commit comments

Comments
 (0)