1515# specific language governing permissions and limitations
1616# under the License.
1717
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."""
2525
2626import os
2727import site
@@ -47,8 +47,8 @@ def find_modules(package_name):
4747 package_name = "selenium"
4848 output_file = os .path .join ("docs" , "source" , "api.rst" )
4949 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 ]
5252 print ("found sections:" )
5353 for base_module in base_modules :
5454 print (f" { base_module } " )
0 commit comments