Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jul 1, 2024
1 parent c1867aa commit 86d908d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
1 change: 0 additions & 1 deletion tools/wikiapiary/wikiapiary_family.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
# The MediaWiki family
# user-config.py: usernames['wikiapiary']['wikiapiary'] = 'User name'
class Family(family.WikimediaFamily):

"""Family module for WikiApiary wiki."""

def __init__(self):
Expand Down
16 changes: 10 additions & 6 deletions tools/xml2titles.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,11 @@ def characters(self, content, not_parse_tags=["?"]):
if self.inId:
self.cjoin("id", content) if "id" not in not_parse_tags else None
if self.inRevision:
self.cjoin(
"revision", content
) if "revision" not in not_parse_tags else None
(
self.cjoin("revision", content)
if "revision" not in not_parse_tags
else None
)

def endDocument(self):
if self.depth != 0:
Expand Down Expand Up @@ -207,9 +209,11 @@ def endElement(self, name):
if name == "page":
if self.page["title"] is not None:
if self.page["title"] in self.set_titles:
print(
"Duplicate title found: %s" % self.page["title"]
) if not self.silent else None
(
print("Duplicate title found: %s" % self.page["title"])
if not self.silent
else None
)
else:
self.set_titles.add(self.page["title"])
self.list_titles.append(self.page["title"]) # unique
Expand Down
1 change: 0 additions & 1 deletion wikiteam/uploader.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@

import requests
from internetarchive import get_item

from wikiteam3.dumpgenerator.config import Config
from wikiteam3.utils import domain2prefix, getUserAgent

Expand Down

0 comments on commit 86d908d

Please sign in to comment.