mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-22 18:39:31 +01:00
Geography: run Black
This commit is contained in:
parent
849acb21f4
commit
1a72a7d6d0
@ -47,10 +47,11 @@ __author__ = supybot.authors.unknown
|
|||||||
__contributors__ = {}
|
__contributors__ = {}
|
||||||
|
|
||||||
# This is a url where the most recent plugin package can be downloaded.
|
# This is a url where the most recent plugin package can be downloaded.
|
||||||
__url__ = ''
|
__url__ = ""
|
||||||
|
|
||||||
from . import config
|
from . import config
|
||||||
from . import plugin
|
from . import plugin
|
||||||
|
|
||||||
if sys.version_info >= (3, 4):
|
if sys.version_info >= (3, 4):
|
||||||
from importlib import reload
|
from importlib import reload
|
||||||
else:
|
else:
|
||||||
|
@ -30,7 +30,8 @@
|
|||||||
|
|
||||||
from supybot import conf, registry
|
from supybot import conf, registry
|
||||||
from supybot.i18n import PluginInternationalization
|
from supybot.i18n import PluginInternationalization
|
||||||
_ = PluginInternationalization('Geography')
|
|
||||||
|
_ = PluginInternationalization("Geography")
|
||||||
|
|
||||||
|
|
||||||
def configure(advanced):
|
def configure(advanced):
|
||||||
@ -39,10 +40,11 @@ def configure(advanced):
|
|||||||
# user or not. You should effect your configuration by manipulating the
|
# user or not. You should effect your configuration by manipulating the
|
||||||
# registry as appropriate.
|
# registry as appropriate.
|
||||||
from supybot.questions import expect, anything, something, yn
|
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:
|
# This is where your configuration variables (if any) should go. For example:
|
||||||
# conf.registerGlobalValue(Geography, 'someConfigVariableName',
|
# conf.registerGlobalValue(Geography, 'someConfigVariableName',
|
||||||
# registry.Boolean(False, _("""Help for someConfigVariableName.""")))
|
# registry.Boolean(False, _("""Help for someConfigVariableName.""")))
|
||||||
|
@ -32,11 +32,12 @@ from supybot import utils, plugins, ircutils, callbacks
|
|||||||
from supybot.commands import *
|
from supybot.commands import *
|
||||||
from supybot.i18n import PluginInternationalization
|
from supybot.i18n import PluginInternationalization
|
||||||
|
|
||||||
_ = PluginInternationalization('Geography')
|
_ = PluginInternationalization("Geography")
|
||||||
|
|
||||||
|
|
||||||
class Geography(callbacks.Plugin):
|
class Geography(callbacks.Plugin):
|
||||||
"""Provides geography facts, such as timezones."""
|
"""Provides geography facts, such as timezones."""
|
||||||
|
|
||||||
threaded = True
|
threaded = True
|
||||||
|
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ from supybot import utils
|
|||||||
from . import wikidata
|
from . import wikidata
|
||||||
|
|
||||||
class GeographyTestCase(PluginTestCase):
|
class GeographyTestCase(PluginTestCase):
|
||||||
plugins = ('Geography',)
|
plugins = ("Geography",)
|
||||||
|
|
||||||
|
|
||||||
class GeographyWikidataTestCase(SupyTestCase):
|
class GeographyWikidataTestCase(SupyTestCase):
|
||||||
|
@ -37,7 +37,8 @@ import supybot.utils as utils
|
|||||||
|
|
||||||
SPARQL_URL = "https://query.wikidata.org/sparql"
|
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 {
|
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;
|
# find all ?item entities that the subject is part of, recursively;
|
||||||
|
@ -5,4 +5,4 @@ build-backend = "setuptools.build_meta"
|
|||||||
[tool.black]
|
[tool.black]
|
||||||
line-length = 79
|
line-length = 79
|
||||||
|
|
||||||
include = 'plugins/(Autocomplete|Fediverse|Poll)/.*\.pyi?$'
|
include = 'plugins/(Autocomplete|Fediverse|Geography|Poll)/.*\.pyi?$'
|
||||||
|
Loading…
Reference in New Issue
Block a user