Closed oesteban closed 3 months ago
I'm afraid I don't understand what is needed.
Here's a gentle explanation about type annotation: https://blog.logrocket.com/understanding-type-annotation-python/.
In practice, this is about adding type hints to each of the configurable variables. For example, instead of:
x = 5.0
you can annotate this and say:
x: float = 5.0
which explicitly says this variable should be a float.
Type annotation also works for functions:
def hello(name):
print(f'Hi {name}')
becomes:
def hello(name : str) -> None:
print(f'Hi {name}')
which explicitly tells you the function accepts a string through the argument name
and returns a None
.
If it's not too urgent, I wouldn't mind trying to take it on sometime in the next couple of weeks.
@ZviBaratz - two weeks is excellent timing.
Done in #1288.
In general, it would be best practice to annotate, but it is of particular interest to the config module, as it will make the documentation of settings way more transparent and clear.
Any takers?
cc/ @celprov @mckenziephagen @teresamg @ZviBaratz