Skip to content

Commit 8ff7188

Browse files
authored
Merge pull request #159 from nabenabe0928/add-future-annotations
Add future annotations as some modules fail with Python 3.9
2 parents d6e89b6 + 1c8e469 commit 8ff7188

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

.github/pull_request_template.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,6 @@ Otherwise, please check the following TODO list:
2525
- [ ] Replace `<COPYRIGHT HOLDER>` in `LICENSE` of your package with your name
2626
- [ ] Fill out `README.md` in your package
2727
- [ ] Add import statements of your function or class names to be used in `__init__.py`
28+
- [ ] (Optional) Add `from __future__ import annotations` at the head of any Python files that include typing to support older Python versions
2829
- [ ] Apply the formatter based on the tips in [`README.md`](https://github.com/optuna/optunahub-registry/tree/main)
2930
- [ ] Check whether your module works as intended based on the tips in [`README.md`](https://github.com/optuna/optunahub-registry/tree/main)

package/samplers/nelder_mead/generate_initial_simplex.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2323
# SOFTWARE.
2424

25+
from __future__ import annotations
26+
2527
import numpy as np
2628

2729

package/samplers/plmbo/plmbo.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from __future__ import annotations
2+
13
from typing import Any
24

35
import GPy

0 commit comments

Comments
 (0)