mirror of
https://github.com/evennia/evennia.git
synced 2026-03-29 20:17:16 +02:00
Format code imports
This commit is contained in:
parent
1165532260
commit
7d2d8aaa49
361 changed files with 1019 additions and 754 deletions
|
|
@ -5,8 +5,9 @@ Remap autodoc API rst files to md files and wrap their contents.
|
|||
"""
|
||||
|
||||
from glob import glob
|
||||
from os.path import abspath, join as pathjoin, dirname
|
||||
from os import rename
|
||||
from os.path import abspath, dirname
|
||||
from os.path import join as pathjoin
|
||||
|
||||
|
||||
def _rst2md(filename_rst):
|
||||
|
|
|
|||
|
|
@ -5,11 +5,14 @@
|
|||
Builds a lunr static search index for optimized search
|
||||
|
||||
"""
|
||||
import os
|
||||
import json
|
||||
import glob
|
||||
import json
|
||||
import os
|
||||
from argparse import ArgumentParser
|
||||
from os.path import sep, abspath, dirname, join as joinpath
|
||||
from os.path import abspath, dirname
|
||||
from os.path import join as joinpath
|
||||
from os.path import sep
|
||||
|
||||
from lunr import lunr
|
||||
|
||||
_DOCS_PATH = dirname(dirname(abspath(__file__)))
|
||||
|
|
|
|||
|
|
@ -4,8 +4,10 @@ an index.
|
|||
|
||||
"""
|
||||
from collections import defaultdict
|
||||
from os.path import abspath, dirname, join as pathjoin, sep
|
||||
from glob import glob
|
||||
from os.path import abspath, dirname
|
||||
from os.path import join as pathjoin
|
||||
from os.path import sep
|
||||
|
||||
_EVENNIA_PATH = pathjoin(dirname(dirname(dirname(abspath(__file__)))))
|
||||
_DOCS_PATH = pathjoin(_EVENNIA_PATH, "docs")
|
||||
|
|
|
|||
|
|
@ -13,9 +13,9 @@ We also need to build the toc-tree and should do so automatically for now.
|
|||
|
||||
"""
|
||||
|
||||
import datetime
|
||||
import glob
|
||||
import re
|
||||
import datetime
|
||||
|
||||
_RE_MD_LINK = re.compile(r"\[(?P<txt>[\w -\[\]]+?)\]\((?P<url>.+?)\)", re.I + re.S + re.U)
|
||||
_RE_REF_LINK = re.compile(r"\[[\w -\[\]]*?\]\(.+?\)", re.I + re.S + re.U)
|
||||
|
|
|
|||
|
|
@ -8,9 +8,9 @@ Usage:
|
|||
python fmtwidth.py --width 79 ../source/**.md
|
||||
|
||||
"""
|
||||
import argparse
|
||||
import glob
|
||||
import textwrap
|
||||
import argparse
|
||||
|
||||
_DEFAULT_WIDTH = 100
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,8 @@ To test - import this from a Django-aware shell, then call run_update.
|
|||
from os.path import abspath, dirname
|
||||
from os.path import join as pathjoin
|
||||
|
||||
from evennia.utils.utils import callables_from_module, mod_import, variable_from_module
|
||||
from evennia.utils.utils import (callables_from_module, mod_import,
|
||||
variable_from_module)
|
||||
|
||||
__all__ = "run_update"
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,8 @@ Update dynamically generated doc pages based on github sources.
|
|||
|
||||
"""
|
||||
|
||||
from os.path import dirname, abspath, join as pathjoin
|
||||
from os.path import abspath, dirname
|
||||
from os.path import join as pathjoin
|
||||
|
||||
ROOTDIR = dirname(dirname(dirname(abspath(__file__))))
|
||||
DOCDIR = pathjoin(ROOTDIR, "docs")
|
||||
|
|
|
|||
|
|
@ -5,13 +5,12 @@
|
|||
# https://www.sphinx-doc.org/en/master/usage/configuration.html
|
||||
|
||||
import os
|
||||
import sys
|
||||
import re
|
||||
import sys
|
||||
|
||||
# from recommonmark.transform import AutoStructify
|
||||
from sphinx.util.osutil import cd
|
||||
|
||||
|
||||
# -- Project information -----------------------------------------------------
|
||||
|
||||
project = "Evennia"
|
||||
|
|
@ -349,12 +348,8 @@ def setup(app):
|
|||
|
||||
# build toctree file
|
||||
sys.path.insert(1, os.path.dirname(os.path.dirname(os.path.dirname(__file__))))
|
||||
from docs.pylib import (
|
||||
auto_link_remapper,
|
||||
update_default_cmd_index,
|
||||
contrib_readmes2docs,
|
||||
update_dynamic_pages,
|
||||
)
|
||||
from docs.pylib import (auto_link_remapper, contrib_readmes2docs,
|
||||
update_default_cmd_index, update_dynamic_pages)
|
||||
|
||||
_no_autodoc = os.environ.get("NOAUTODOC")
|
||||
update_default_cmd_index.run_update(no_autodoc=_no_autodoc)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue