febus982/bootstrap-python-fastapi

View on GitHub
Update all non-major dependencies #725
renovate[bot] authored 3b0cb3fd
complete00:00:14
1
git clone
2
codeclimate validate-config
View output
codeclimate validate-config
No errors or warnings found in .codeclimate.yml.
3
codeclimate prepare
View output
codeclimate prepare
4
builder pull-engines
View output
determining required images
5
structure
View output
12
Parser process id: 12
codeclimate-parser socket not present
waiting 1s...
6
duplication
View output
12
Parser process id: 12
codeclimate-parser socket not present
waiting 1s...
I, [2024-08-31T00:47:47.670195 #1]  INFO -- : Skipping file ./src/gateways/event.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 6
    async def emit(
            ^
SyntaxError: invalid syntax


I, [2024-08-31T00:47:47.690462 #1]  INFO -- : Skipping file ./src/http_app/routes/events.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 15
    def _event_registry() -> Dict[str, typing.Type[BaseModel]]:
                          ^
SyntaxError: invalid syntax


I, [2024-08-31T00:47:47.707380 #1]  INFO -- : Skipping file ./src/http_app/routes/graphql/resolvers.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 4
    async def list_books():
            ^
SyntaxError: invalid syntax


I, [2024-08-31T00:47:47.713763 #1]  INFO -- : Skipping file ./src/http_app/routes/graphql/types.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 8
    book_id: Union[int, None] = None
           ^
SyntaxError: invalid syntax


I, [2024-08-31T00:47:47.727011 #1]  INFO -- : Skipping file ./src/http_app/routes/graphql/query.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 11
    books: List[Book] = strawberry.field(resolver=list_books)
         ^
SyntaxError: invalid syntax


I, [2024-08-31T00:47:47.731250 #1]  INFO -- : Skipping file ./src/http_app/routes/graphql/__init__.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 8
    router: GraphQLRouter = GraphQLRouter(schema)
          ^
SyntaxError: invalid syntax


I, [2024-08-31T00:47:47.746442 #1]  INFO -- : Skipping file ./src/http_app/routes/api/books.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 10
    book: dto.Book
        ^
SyntaxError: invalid syntax


I, [2024-08-31T00:47:47.755718 #1]  INFO -- : Skipping file ./src/http_app/routes/ping.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 8
    ping: str
        ^
SyntaxError: invalid syntax


I, [2024-08-31T00:47:47.763083 #1]  INFO -- : Skipping file ./src/http_app/routes/__init__.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 6
    def init_routes(app: FastAPI) -> None:
                       ^
SyntaxError: invalid syntax


I, [2024-08-31T00:47:47.773679 #1]  INFO -- : Skipping file ./src/http_app/routes/hello.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 10
    async def hello(request: Request):
        ^
SyntaxError: invalid syntax


I, [2024-08-31T00:47:47.790545 #1]  INFO -- : Skipping file ./src/http_app/__init__.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 14
    test_config: Union[AppConfig, None] = None,
               ^
SyntaxError: invalid syntax


I, [2024-08-31T00:47:47.795156 #1]  INFO -- : Skipping file ./src/bootstrap/bootstrap.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 14
    celery_app: Celery
              ^
SyntaxError: invalid syntax


I, [2024-08-31T00:47:47.805661 #1]  INFO -- : Skipping file ./src/bootstrap/storage/SQLAlchemy/default_bind_tables.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 6
    def init_tables(registry_mapper: registry):
                                   ^
SyntaxError: invalid syntax


I, [2024-08-31T00:47:47.811853 #1]  INFO -- : Skipping file ./src/bootstrap/storage/SQLAlchemy/__init__.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 8
    TABLE_INIT_REGISTRY: Dict[str, Callable] = {
                       ^
SyntaxError: invalid syntax


I, [2024-08-31T00:47:47.823927 #1]  INFO -- : Skipping file ./src/bootstrap/di_container.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 63
    BookRepositoryInterface: Factory[BookRepositoryInterface] = Factory(
                           ^
SyntaxError: invalid syntax


I, [2024-08-31T00:47:47.837062 #1]  INFO -- : Skipping file ./src/bootstrap/config.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 14
    timezone: str = "UTC"
            ^
SyntaxError: invalid syntax


I, [2024-08-31T00:47:47.837115 #1]  INFO -- : Skipping file ./src/bootstrap/celery.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 6
    def init_celery(config: AppConfig) -> Celery:
                          ^
SyntaxError: invalid syntax


I, [2024-08-31T00:47:47.854716 #1]  INFO -- : Skipping file ./src/bootstrap/logs/processors.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 5
    def extract_from_record(_, __, event_dict: EventDict) -> EventDict:
                                             ^
SyntaxError: invalid syntax


I, [2024-08-31T00:47:47.856443 #1]  INFO -- : Skipping file ./src/bootstrap/logs/__init__.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 16
    def init_logger(config: AppConfig) -> None:
                          ^
SyntaxError: invalid syntax


I, [2024-08-31T00:47:47.878682 #1]  INFO -- : Skipping file ./src/domains/common/cloudevent_base.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 9
    def type_field(default: typing.Union[str, None] = None) -> typing.Any:
                          ^
SyntaxError: invalid syntax


I, [2024-08-31T00:47:47.900506 #1]  INFO -- : Skipping file ./src/domains/books/interfaces.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 8
    async def create_book(self, book: BookData) -> Book: ...
            ^
SyntaxError: invalid syntax


I, [2024-08-31T00:47:47.906842 #1]  INFO -- : Skipping file ./src/domains/books/events.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 14
    book_id: int
           ^
SyntaxError: invalid syntax


I, [2024-08-31T00:47:47.919861 #1]  INFO -- : Skipping file ./src/domains/books/dto.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 7
    title: str
         ^
SyntaxError: invalid syntax


I, [2024-08-31T00:47:47.920557 #1]  INFO -- : Skipping file ./src/domains/books/_gateway_interfaces.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 9
    async def save(self, book: BookModel) -> BookModel: ...
            ^
SyntaxError: invalid syntax


I, [2024-08-31T00:47:47.938985 #1]  INFO -- : Skipping file ./src/domains/books/_service.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 15
    _book_repository: BookRepositoryInterface
                    ^
SyntaxError: invalid syntax


I, [2024-08-31T00:47:47.939881 #1]  INFO -- : Skipping file ./src/domains/books/_tasks.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 27
    def book_cpu_intensive_task(book_id: str, **kwargs) -> str:
                                       ^
SyntaxError: invalid syntax


I, [2024-08-31T00:47:47.955160 #1]  INFO -- : Skipping file ./src/domains/books/_models.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 7
    title: str
         ^
SyntaxError: invalid syntax
7
sonar-python
sonar-python engine documentation
View output
INFO: Java 1.8.0_111-internal Oracle Corporation (64-bit)
INFO: Linux 4.4.0-1128-aws amd64
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/src/app/build/libs/sonarlint-core-2.17.0.899.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/src/app/build/libs/sonarlint-cli-2.1.0.566.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]
INFO: Index files
INFO: 71 files indexed
ERROR: Unable to parse file: /code/src/http_app/routes/graphql/types.py
ERROR: Parse error at line 8 column 11:

    1: from typing import Union
    2: 
    3: import strawberry
    4: 
    5: 
    6: @strawberry.type
    7: class Book:
  -->      book_id: Union[int, None] = None
    9:     title: str
   10:     author_name: str
   11: EOF

ERROR: Unable to parse file: /code/src/http_app/routes/graphql/__init__.py
ERROR: Parse error at line 8 column 6:

    1: from strawberry import Schema
    2: from strawberry.fastapi import GraphQLRouter
    3: 
    4: from .query import Query
    5: 
    6: schema = Schema(query=Query)
    7: 
  -->  router: GraphQLRouter = GraphQLRouter(schema)
    9: EOF

ERROR: Unable to parse file: /code/src/http_app/routes/graphql/query.py
ERROR: Parse error at line 11 column 9:

    1: typing import List
    2: 
    3: import strawberry
    4: 
    5: from .resolvers import list_books
    6: from .types import Book
    7: 
    8: 
    9: @strawberry.type
   10: class Query:
  -->      books: List[Book] = strawberry.field(resolver=list_books)
   12: EOF

ERROR: Unable to parse file: /code/src/http_app/routes/api/books.py
ERROR: Parse error at line 10 column 8:

    3: , ConfigDict
    4: 
    5: router_v1 = APIRouter(prefix="/books/v1")
    6: router_v2 = APIRouter(prefix="/books/v2")
    7: 
    8: 
    9: class CreateBookResponse(BaseModel):
  -->      book: dto.Book
   11:     model_config = ConfigDict(
   12:         json_schema_extra={
   13:             "example": {
   14:                 "title": "The Hitchhiker's Guide to the Galaxy",
   15:                 "author_name": "Douglas Adams",
   16:                 "book_id": 123,
   17:             }
   18:         }
   19:     )

ERROR: Unable to parse file: /code/src/http_app/routes/ping.py
ERROR: Parse error at line 8 column 8:

    1: from fastapi import APIRouter
    2: from pydantic import BaseModel, ConfigDict
    3: 
    4: router = APIRouter()
    5: 
    6: 
    7: class PingResponse(BaseModel):
  -->      ping: str
    9: 
   10:     model_config = ConfigDict(
   11:         json_schema_extra={
   12:             "example": {
   13:                 "ping": "pong!",
   14:             }
   15:         }
   16:     )
   17: 
   18: 
   19: @router.get("/ping")
   20: 

ERROR: Unable to parse file: /code/src/bootstrap/bootstrap.py
ERROR: Parse error at line 14 column 14:

    7: import AppConfig
    8: from .di_container import Container
    9: from .logs import init_logger
   10: from .storage import init_storage
   11: 
   12: 
   13: class InitReference(BaseModel):
  -->      celery_app: Celery
   15:     di_container: DynamicContainer
   16: 
   17:     model_config = ConfigDict(arbitrary_types_allowed=True)
   18: 
   19: 
   20: def application_init(app_config: AppConfig) -> InitReference:
   21:     

ERROR: Unable to parse file: /code/src/bootstrap/storage/SQLAlchemy/__init__.py
ERROR: Parse error at line 8 column 19:

    1: from typing import Callable, Dict
    2: 
    3: from dependency_injector.wiring import Provide, inject
    4: from sqlalchemy_bind_manager import SQLAlchemyBindManager
    5: 
    6: from . import default_bind_tables
    7: 
  -->  TABLE_INIT_REGISTRY: Dict[str, Callable] = {
    9:     "default": default_bind_tables.init_tables,
   10: }
   11: 
   12: 
   13: def init_sqlalchemy():
   14:     init_tables()
   15: 
   16: 
   17: @

ERROR: Unable to parse file: /code/src/bootstrap/di_container.py
ERROR: Parse error at line 63 column 27:

   33: config = Dependency(instance_of=AppConfig)
   34: 
   35:     """
   36:     Class mappings
   37: 
   38:     These are classes we want the container to manage the life cycle for
   39:     (e.g. Singletons), we map them using their class name directly.
   40:     """
   41:     SQLAlchemyBindManager = Singleton(
   42:         SQLAlchemyBindManager,
   43:         config=config.provided.SQLALCHEMY_CONFIG,
   44:     )
   45: 
   46:     """
   47:     Interface => Class mappings
   48: 
   49:     We use the interface class name as key so that we can trigger the injection
   50:     using `class.__name__` and avoid using any hardcoded string or constant.
   51: 
   52:     e.g.
   53:     Mapping
   54:         MyInterface = providers.Factory("http_app.storage.repositories.ConcreteClass")
   55: 
   56:     Usage
   57:         @inject
   58:         def function(
   59:             service: MyInterface = Provide[MyInterface.__name__],
   60:         )
   61:     """
   62: 
  -->      BookRepositoryInterface: Factory[BookRepositoryInterface] = Factory(
   64:         SQLAlchemyAsyncRepository,
   65:         bind=SQLAlchemyBindManager.provided.get_bind.call(),
   66:         model_class=BookModel,
   67:     )
   68:     BookEventGatewayInterface:

ERROR: Unable to parse file: /code/src/bootstrap/config.py
ERROR: Parse error at line 14 column 12:

    5: , SettingsConfigDict
    6: from sqlalchemy_bind_manager import SQLAlchemyConfig
    7: 
    8: TYPE_ENVIRONMENT = Literal["local", "test", "staging", "production"]
    9: 
   10: 
   11: class CeleryConfig(BaseModel):
   12: 
   13: 
  -->      timezone: str = "UTC"
   15: 
   16: 
   17:     broker_url: Optional[str] = None
   18:     broker_connection_retry_on_startup: bool = True
   19: 
   20: 
   21:     result_backend: Optional[str] = None
   22:     redis_socket_keepalive

ERROR: Unable to parse file: /code/src/bootstrap/logs/__init__.py
ERROR: Parse error at line 27 column 21:

    8: 
    9: from .processors import (
   10:     add_logging_open_telemetry_spans,
   11:     drop_color_message_key,
   12:     extract_from_record,
   13: )
   14: 
   15: 
   16: def init_logger(config: AppConfig) -> None:
   17:     """
   18:     Configure structlog and stdlib logging with shared handler and formatter.
   19: 
   20:     :param config: The app configuration
   21:     :type config: AppConfig
   22:     :return:
   23:     """
   24: 
   25: 
   26: 
  -->      shared_processors: List[Processor] = [
   28:         structlog.contextvars.merge_contextvars,
   29:         structlog.stdlib.add_logger_name,
   30:         structlog.stdlib.add_log_level,
   31:         structlog.stdlib.PositionalArgumentsFormatter

ERROR: Unable to parse file: /code/src/domains/common/cloudevent_base.py
ERROR: Parse error at line 172 column 10:

  150: ,
  151:         examples=["123"],
  152:     )
  153:     return field
  154: 
  155: 
  156: class BaseEvent(pydantic.BaseModel, abc.ABC):
  157:     """
  158:     This is the implementation of a CloudEvent using pydantic. It is not
  159:     using CloudEvents sdk base class on purpose, to avoid incompatibilities
  160:     with pydantic V2 (the __iter__ method).
  161: 
  162:     This means that in order to use this event we'll manually create the
  163:     relevant CloudEvent object (e.g. from `cloudevents.http`) and use it
  164:     as we need.
  165: 
  166:     Could this be improved if created dynamically?
  167:     Perhaps we can pick up dynamic information
  168:     from the application config or inject data like the event type?.
  169:     https://docs.pydantic.dev/latest/usage/models/#dynamic-model-creation
  170:     """
  171: 
  -->      source: typing.Literal["this.service.url.here"] = source_field(
  173:         "this.service.url.here"
  174:     )
  175:     type: str = type_field()
  176:     dataschema: str = dataschema_field("this.service.url.here")
  177: 

ERROR: Unable to parse file: /code/src/domains/books/events.py
ERROR: Parse error at line 14 column 11:

    4: import ConfigDict
    5: 
    6: from domains.common.cloudevent_base import (
    7:     BaseEvent,
    8:     dataschema_field,
    9:     type_field,
   10: )
   11: 
   12: 
   13: class BookCreatedV1Data(pydantic.BaseModel):
  -->      book_id: int
   15:     title: str
   16:     author_name: str
   17: 
   18: 
   19: class BookCreatedV1(BaseEvent):
   20:     type: typing.Literal["book.created.v1"] = type_field

ERROR: Unable to parse file: /code/src/domains/books/dto.py
ERROR: Parse error at line 7 column 9:

    1: from typing import Union
    2: 
    3: from pydantic import BaseModel
    4: 
    5: 
    6: class BookData(BaseModel):
  -->      title: str
    8:     author_name: str
    9: 
   10: 
   11: class Book(BookData):
   12:     book_id: Union[int, None] = None
   13: EOF

ERROR: Unable to parse file: /code/src/domains/books/_service.py
ERROR: Parse error at line 15 column 20:

    8: BookModel
    9: from ._tasks import book_cpu_intensive_task
   10: from .dto import Book, BookData
   11: from .events import BookCreatedV1, BookCreatedV1Data
   12: 
   13: 
   14: class BookService:
  -->      _book_repository: BookRepositoryInterface
   16:     _event_gateway: BookEventGatewayInterface
   17: 
   18:     @inject
   19:     def __init__(
   20:         self,
   21:         book_repository: BookRepositoryInterface = Provide[
   22:             BookRepositoryInterface.__name__
   23:         ],
   24:         event_gateway: BookEventGatewayInterface =

ERROR: Unable to parse file: /code/src/domains/books/_models.py
ERROR: Parse error at line 7 column 9:

    1: from dataclasses import dataclass
    2: from typing import Union
    3: 
    4: 
    5: @dataclass
    6: class BookModel:
  -->      title: str
    8:     author_name: str
    9:     book_id: Union[int, None] = None
   10: EOF

INFO: ------------------------------------------------------------------------
INFO: EXECUTION SUCCESS
INFO: ------------------------------------------------------------------------
INFO: Total time: 0.448s
INFO: Final Memory: 6M/295M
INFO: ------------------------------------------------------------------------