typedb / typedb-driver-python

TypeDB Driver for Python

Home Page:https://typedb.com

Repository from Github https://github.comtypedb/typedb-driver-pythonRepository from Github https://github.comtypedb/typedb-driver-python

Client exposes too many methods to create Options object

james-whiteside opened this issue · comments

Description

Client Python currently exposes too many methods to create a TypeDBOptions object. It can be instantiated through any of the following:

TypeDBOptions().core()
TypeDBOptions().cluster()
TypeDBClusterOptions().core()
TypeDBClusterOptons().cluster()

This creates ambiguity in which methods to use, not to mention including nonsensical options.

Environment

  1. TypeDB client-python version: 2.17.0
  2. Python version: 3.9.16

Expected Output

Only two options should be exposed, probably among the following:

TypeDBOptions().core()
TypeDBOptions().cluster()

or

TypeDBOptions()
TypeDBClusterOptions()

or

TypeDBOptions().core()
TypeDBClusterOptions().cluster()

Actual Output

Client Python exposes the four options listed above.

Fixed in the refactor that occurred in #304