Return the "entry point" dialect class. This is normally the dialect itself except in the case when the returned class implements the get_dialect_cls() method.
(self)
| 759 | return u, loaded_plugins, kwargs |
| 760 | |
| 761 | def _get_entrypoint(self) -> Type[Dialect]: |
| 762 | """Return the "entry point" dialect class. |
| 763 | |
| 764 | This is normally the dialect itself except in the case when the |
| 765 | returned class implements the get_dialect_cls() method. |
| 766 | |
| 767 | """ |
| 768 | if "+" not in self.drivername: |
| 769 | name = self.drivername |
| 770 | else: |
| 771 | name = self.drivername.replace("+", ".") |
| 772 | cls = registry.load(name) |
| 773 | # check for legacy dialects that |
| 774 | # would return a module with 'dialect' as the |
| 775 | # actual class |
| 776 | if ( |
| 777 | hasattr(cls, "dialect") |
| 778 | and isinstance(cls.dialect, type) |
| 779 | and issubclass(cls.dialect, Dialect) |
| 780 | ): |
| 781 | return cls.dialect |
| 782 | else: |
| 783 | return cast("Type[Dialect]", cls) |
| 784 | |
| 785 | def get_dialect(self, _is_async: bool = False) -> Type[Dialect]: |
| 786 | """Return the SQLAlchemy :class:`_engine.Dialect` class corresponding |
no test coverage detected