Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.8/site-packages/astroid/brain/brain_sqlalchemy.py: 83%
6 statements
« prev ^ index » next coverage.py v7.2.7, created at 2023-06-07 06:53 +0000
« prev ^ index » next coverage.py v7.2.7, created at 2023-06-07 06:53 +0000
1# Licensed under the LGPL: https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
2# For details: https://github.com/pylint-dev/astroid/blob/main/LICENSE
3# Copyright (c) https://github.com/pylint-dev/astroid/blob/main/CONTRIBUTORS.txt
5from astroid.brain.helpers import register_module_extender
6from astroid.builder import parse
7from astroid.manager import AstroidManager
10def _session_transform():
11 return parse(
12 """
13 from sqlalchemy.orm.session import Session
15 class sessionmaker:
16 def __init__(
17 self,
18 bind=None,
19 class_=Session,
20 autoflush=True,
21 autocommit=False,
22 expire_on_commit=True,
23 info=None,
24 **kw
25 ):
26 return
28 def __call__(self, **local_kw):
29 return Session()
31 def configure(self, **new_kw):
32 return
34 return Session()
35 """
36 )
39register_module_extender(AstroidManager(), "sqlalchemy.orm.session", _session_transform)