Geography: run Black

This commit is contained in:
Valentin Lorentz 2021-11-09 20:40:35 +01:00
parent 849acb21f4
commit 1a72a7d6d0
6 changed files with 13 additions and 8 deletions

View File

@ -47,10 +47,11 @@ __author__ = supybot.authors.unknown
__contributors__ = {}
# This is a url where the most recent plugin package can be downloaded.
__url__ = ''
__url__ = ""
from . import config
from . import plugin
if sys.version_info >= (3, 4):
from importlib import reload
else:

View File

@ -30,7 +30,8 @@
from supybot import conf, registry
from supybot.i18n import PluginInternationalization
_ = PluginInternationalization('Geography')
_ = PluginInternationalization("Geography")
def configure(advanced):
@ -39,10 +40,11 @@ def configure(advanced):
# user or not. You should effect your configuration by manipulating the
# registry as appropriate.
from supybot.questions import expect, anything, something, yn
conf.registerPlugin('Geography', True)
conf.registerPlugin("Geography", True)
Geography = conf.registerPlugin('Geography')
Geography = conf.registerPlugin("Geography")
# This is where your configuration variables (if any) should go. For example:
# conf.registerGlobalValue(Geography, 'someConfigVariableName',
# registry.Boolean(False, _("""Help for someConfigVariableName.""")))

View File

@ -32,11 +32,12 @@ from supybot import utils, plugins, ircutils, callbacks
from supybot.commands import *
from supybot.i18n import PluginInternationalization
_ = PluginInternationalization('Geography')
_ = PluginInternationalization("Geography")
class Geography(callbacks.Plugin):
"""Provides geography facts, such as timezones."""
threaded = True

View File

@ -37,7 +37,7 @@ from supybot import utils
from . import wikidata
class GeographyTestCase(PluginTestCase):
plugins = ('Geography',)
plugins = ("Geography",)
class GeographyWikidataTestCase(SupyTestCase):

View File

@ -37,7 +37,8 @@ import supybot.utils as utils
SPARQL_URL = "https://query.wikidata.org/sparql"
TIMEZONE_QUERY = string.Template("""
TIMEZONE_QUERY = string.Template(
"""
SELECT ?item ?itemLabel ?rank ?endtime ?appliestopart ?utcoffset ?tzid (MIN(?area) AS ?min_area) WHERE {
# find all ?item entities that the subject is part of, recursively;

View File

@ -5,4 +5,4 @@ build-backend = "setuptools.build_meta"
[tool.black]
line-length = 79
include = 'plugins/(Autocomplete|Fediverse|Poll)/.*\.pyi?$'
include = 'plugins/(Autocomplete|Fediverse|Geography|Poll)/.*\.pyi?$'