15
15
# specific language governing permissions and limitations
16
16
# under the License.
17
17
18
- # -----------------------------------------------------------------
19
- # This script recursively scans the `selenium` package directory
20
- # to find all modules, then generates the `py/docs/source/api.rst`
21
- # file containing a listing of all modules in separate sections.
22
- # The `api.rst` file is later used by `sphinx-autogen` to generate
23
- # sphinx autodoc stub pages used in the Python API documentation.
24
- # See `py/tox.ini` for how it is invoked.
18
+
19
+ """ This script recursively scans the `selenium` package directory
20
+ to find all modules, then generates the `py/docs/source/api.rst`
21
+ file containing a listing of all modules in separate sections.
22
+ The `api.rst` file is later used by `sphinx-autogen` to generate
23
+ sphinx autodoc stub pages used in the Python API documentation.
24
+ See `py/tox.ini` for how it is invoked."""
25
25
26
26
import os
27
27
import site
@@ -47,8 +47,8 @@ def find_modules(package_name):
47
47
package_name = "selenium"
48
48
output_file = os .path .join ("docs" , "source" , "api.rst" )
49
49
print (f"generating module list for sphinx autodoc in: { output_file } \n " )
50
- modules = find_modules (package_name )
51
- base_modules = [mod for mod in sorted (set ( module .rsplit ("." , 1 )[0 ] for module in modules ) ) if mod != package_name ]
50
+ modules = [ module for module in find_modules (package_name ) if ".devtools." not in module ]
51
+ base_modules = [mod for mod in sorted ({ module .rsplit ("." , 1 )[0 ] for module in modules } ) if mod != package_name ]
52
52
print ("found sections:" )
53
53
for base_module in base_modules :
54
54
print (f" { base_module } " )
0 commit comments