Skip to content

Commit

Permalink
Revert "util: python: modules(): Sort modules for docstring"
Browse files Browse the repository at this point in the history
Different classes output on Python 3.8

This reverts commit 9112a67.
  • Loading branch information
pdxjohnny committed Jul 16, 2021
1 parent 9112a67 commit e771132
Showing 1 changed file with 4 additions and 15 deletions.
19 changes: 4 additions & 15 deletions dffml/util/python.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,22 +59,11 @@ def modules(
... return (root / "dom") in path.parents or path.name.startswith("__")
...
>>> # Print the first module
>>> for import_name, module in sorted(
... dffml.modules(root, package_name, skip=skip),
... key=lambda import_name_and_module: import_name_and_module[0],
... ):
... print(import_name, sorted(module.__dict__.keys())[0])
>>> for import_name, module in dffml.modules(root, package_name, skip=skip):
... print(import_name)
... break
...
xml.etree.ElementInclude ElementTree
xml.etree.ElementPath _SelectorContext
xml.etree.ElementTree Comment
xml.etree.cElementTree Comment
xml.parsers.expat EXPAT_VERSION
xml.sax._exceptions SAXException
xml.sax.expatreader AttributesImpl
xml.sax.handler ContentHandler
xml.sax.saxutils XMLFilterBase
xml.sax.xmlreader AttributesImpl
xml.sax.expatreader
"""
for path in pathlib.Path(root).rglob("*.py"):
# Figure out name
Expand Down

0 comments on commit e771132

Please sign in to comment.