From 885288e5ac099c39ec11fb1fd116f7220aebcb82 Mon Sep 17 00:00:00 2001 From: Elizabeth Santorella Date: Fri, 16 Aug 2024 15:36:08 -0700 Subject: [PATCH] Fix type error in validate_sphinx script (#2665) Summary: Pull Request resolved: https://github.com/facebook/Ax/pull/2665 Reverts part of D61274223 Reviewed By: mpolson64 Differential Revision: D61388107 fbshipit-source-id: 7e98aa0ca82aa3e21a5d57ffa6ef0a43a4beeecd --- scripts/validate_sphinx.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/validate_sphinx.py b/scripts/validate_sphinx.py index 28587460404..411d610d2ba 100755 --- a/scripts/validate_sphinx.py +++ b/scripts/validate_sphinx.py @@ -8,6 +8,7 @@ import os import pkgutil import re +from typing import Set # Paths are relative to top-level Ax directory (which is passed into fxn below) @@ -28,7 +29,7 @@ } -def parse_rst(rst_filename: str) -> set[str]: +def parse_rst(rst_filename: str) -> Set[str]: """Extract automodule directives from rst.""" ret = set() with open(rst_filename, "r") as f: