Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
#
# import os
# import sys
# sys.path.insert(0, os.path.abspath('.'))
# -- Project information -----------------------------------------------------
from jishaku.meta import __version__
project = 'jishaku'
copyright = '2020, Gorialis'
author = 'Gorialis'
# The short X.Y version
version = __version__
# The full version, including alpha/beta/rc tags
release = version
# -- General configuration ---------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
#
# needs_sphinx = '1.0'
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.coverage',
async def jsk(self, ctx: commands.Context):
"""
The Jishaku debug and diagnostic commands.
This command on its own gives a status brief.
All other functionality is within its subcommands.
"""
summary = [
f"Jishaku v{__version__}, discord.py `{package_version('discord.py')}`, "
f"`Python {sys.version}` on `{sys.platform}`".replace("\n", ""),
f"Module was loaded {humanize.naturaltime(self.load_time)}, "
f"cog was loaded {humanize.naturaltime(self.start_time)}.",
""
]
if sys.version_info < (3, 7, 0):
summary.extend([
"Jishaku no longer has primary support for Python 3.6. While the cog will still work, some "
"features and bugfixes may be unavailable on this version.",
"It is recommended that you update to Python 3.7+ when possible so Jishaku can properly "
"leverage new language features.",
""
])
if psutil:
async def jsk(self, ctx: commands.Context):
"""
The Jishaku debug and diagnostic commands.
This command on its own gives a status brief.
All other functionality is within its subcommands.
"""
summary = [
f"Jishaku v{__version__}, discord.py `{package_version('discord.py')}`, "
f"`Python {sys.version}` on `{sys.platform}`".replace("\n", ""),
f"Module was loaded {humanize.naturaltime(self.load_time)}, "
f"cog was loaded {humanize.naturaltime(self.start_time)}.",
""
]
if psutil:
proc = psutil.Process()
with proc.oneshot():
mem = proc.memory_full_info()
summary.append(f"Using {humanize.naturalsize(mem.rss)} physical memory and "
f"{humanize.naturalsize(mem.vms)} virtual memory, "
f"{humanize.naturalsize(mem.uss)} of which unique to this process.")
name = proc.name()