Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 7b51f42c authored by Bruno Guillon's avatar Bruno Guillon
Browse files

types subdialect bugs fixed

parent 94cf74b2
No related branches found
No related tags found
No related merge requests found
Known bugs Known bugs
========== ==========
+ in `qb.sql.types`
+ autocompletion is not working
+ `_repr_pretty` is not working
+ `dir` is not working
...@@ -255,7 +255,7 @@ class Dialect(qbtools.AttrDict): ...@@ -255,7 +255,7 @@ class Dialect(qbtools.AttrDict):
def __repr__(self): def __repr__(self):
return f"{type(self).__name__}.dialects[{self.fullname}]" return f"{type(self).__name__}.dialects[{self.fullname}]"
def _pretty_repr_(self): def _pretty_repr_(self):
return f"{type(self).__name__}({self.fullname})〈{', '.join(self)}" return f"{type(self).__name__}({self.fullname})〈{', '.join(map(str, self))}"
def _repr_pretty_(self, printer, cycle): def _repr_pretty_(self, printer, cycle):
printer.text(self._pretty_repr_()) printer.text(self._pretty_repr_())
def __iter__(self): def __iter__(self):
......
...@@ -55,7 +55,9 @@ class AttrDict(collections.abc.MutableMapping): ...@@ -55,7 +55,9 @@ class AttrDict(collections.abc.MutableMapping):
else: else:
super().__setattr__(attr, v) super().__setattr__(attr, v)
def __dir__(self): def __dir__(self):
return self.proxy_dict.keys() return frozenset(self._reserved_names).union(
k for k in self.proxy_dict.keys() if isinstance(k, str) and k.isidentifier()
)
#MutableMapping method #MutableMapping method
def __getitem__(self, k): def __getitem__(self, k):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment