Skip to content

Commit

Permalink
Change __dataclass_params to _dataclass_params
Browse files Browse the repository at this point in the history
  • Loading branch information
jieguangzhou committed Aug 15, 2024
1 parent b95e559 commit 04c5ac3
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fix verbosity in component info
- Change default encoding to sqlvector
- Fix some links in documentation
- Change `__dataclass_params__` to `_dataclass_params`

## [0.3.0](https://github.com/superduper-io/superduper/compare/0.3.0...0.2.0]) (2024-Jun-21)

Expand Down
2 changes: 1 addition & 1 deletion plugins/ibis/superduper_ibis/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ class IbisQuery(Query):
}

# Use to control the behavior in the class construction method within LeafMeta
__dataclass_params__: t.ClassVar[t.Dict[str, t.Any]] = {
_dataclass_params: t.ClassVar[t.Dict[str, t.Any]] = {
"eq": False,
"order": False,
}
Expand Down
2 changes: 1 addition & 1 deletion plugins/mongodb/superduper_mongodb/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ class MongoQuery(Query):
}

# Use to control the behavior in the class construction method within LeafMeta
__dataclass_params__: t.ClassVar[t.Dict[str, t.Any]] = {
_dataclass_params: t.ClassVar[t.Dict[str, t.Any]] = {
'eq': False,
'order': False,
}
Expand Down
2 changes: 1 addition & 1 deletion superduper/base/leaf.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def __new__(mcs, name, bases, namespace):
# Determine if any bases are dataclasses and
# apply the appropriate dataclass decorator
#
dataclass_params = namespace.get('__dataclass_params__', {})
dataclass_params = namespace.get('_dataclass_params', {}).copy()
if bases and any(dc.is_dataclass(b) for b in bases):
dataclass_params['kw_only'] = True
dataclass_params['repr'] = not name.endswith('Query')
Expand Down

0 comments on commit 04c5ac3

Please sign in to comment.