Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change __dataclass_params__ to _dataclass_params #2394

Merged
merged 1 commit into from
Aug 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading