fix: remove unnecessary column_name param from the AddColumn API (#59)
This commit is contained in:
@@ -87,10 +87,9 @@ class _Collection:
|
||||
def Open(arg0: str, arg1: param.CollectionOption) -> _Collection: ...
|
||||
def AddColumn(
|
||||
self,
|
||||
arg0: str,
|
||||
arg1: schema._FieldSchema,
|
||||
arg2: str,
|
||||
arg3: param.AddColumnOption,
|
||||
arg0: schema._FieldSchema,
|
||||
arg1: str,
|
||||
arg2: param.AddColumnOption,
|
||||
) -> None: ...
|
||||
def AlterColumn(
|
||||
self,
|
||||
|
||||
@@ -170,9 +170,7 @@ class Collection:
|
||||
option (Optional[AddColumnOption], optional): Options for the operation.
|
||||
Defaults to ``AddColumnOption()``.
|
||||
"""
|
||||
self._obj.AddColumn(
|
||||
field_schema.name, field_schema._get_object(), expression, option
|
||||
)
|
||||
self._obj.AddColumn(field_schema._get_object(), expression, option)
|
||||
self._schema = CollectionSchema._from_core(self._obj.Schema())
|
||||
|
||||
def drop_column(self, field_name: str) -> None:
|
||||
|
||||
@@ -52,7 +52,7 @@ def require_module(module: str, mitigation: Optional[str] = None) -> Any:
|
||||
package = mitigation or module
|
||||
msg = f"Required package '{package}' is not installed. "
|
||||
if "." in module:
|
||||
top_level = module.split(".")[0]
|
||||
top_level = module.split(".", maxsplit=1)[0]
|
||||
msg += f"Module '{module}' is part of '{top_level}', "
|
||||
if mitigation:
|
||||
msg += f"please pip install '{mitigation}'."
|
||||
|
||||
Reference in New Issue
Block a user