mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
Enable invalid-name globally in pylib (#1454)
This commit is contained in:
parent
9dc3cf216a
commit
a765ab95ec
41 changed files with 14 additions and 67 deletions
|
@ -26,7 +26,6 @@ output-format=colorized
|
|||
[MESSAGES CONTROL]
|
||||
disable=
|
||||
R,
|
||||
invalid-name,
|
||||
line-too-long,
|
||||
too-many-lines,
|
||||
missing-function-docstring,
|
||||
|
|
|
@ -1,4 +1,2 @@
|
|||
# Copyright: Ankitects Pty Ltd and contributors
|
||||
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||
|
||||
# pylint: enable=invalid-name
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
# Copyright: Ankitects Pty Ltd and contributors
|
||||
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||
|
||||
# pylint: enable=invalid-name
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import sys
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
# Copyright: Ankitects Pty Ltd and contributors
|
||||
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||
|
||||
# pylint: enable=invalid-name
|
||||
|
||||
import os
|
||||
import re
|
||||
import sys
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
# Copyright: Ankitects Pty Ltd and contributors
|
||||
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||
|
||||
# pylint: enable=invalid-name
|
||||
|
||||
import json
|
||||
import sys
|
||||
from typing import List, Literal, TypedDict
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
# Copyright: Ankitects Pty Ltd and contributors
|
||||
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||
|
||||
# pylint: enable=invalid-name
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import functools
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
# Copyright: Ankitects Pty Ltd and contributors
|
||||
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||
|
||||
# pylint: enable=invalid-name
|
||||
|
||||
|
||||
class BrowserConfig:
|
||||
ACTIVE_CARD_COLUMNS_KEY = "activeCols"
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
# Copyright: Ankitects Pty Ltd and contributors
|
||||
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||
|
||||
# pylint: enable=invalid-name
|
||||
|
||||
from importlib.resources import open_text
|
||||
|
||||
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
# Copyright: Ankitects Pty Ltd and contributors
|
||||
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||
|
||||
# pylint: enable=invalid-name
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import pprint
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
# Copyright: Ankitects Pty Ltd and contributors
|
||||
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||
|
||||
# pylint: enable=invalid-name
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any, Generator, Literal, Sequence, Union, cast
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
# Copyright: Ankitects Pty Ltd and contributors
|
||||
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||
|
||||
# pylint: enable=invalid-name
|
||||
|
||||
"""
|
||||
Config handling
|
||||
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
# Copyright: Ankitects Pty Ltd and contributors
|
||||
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||
|
||||
# pylint: enable=invalid-name
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import sys
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
# Copyright: Ankitects Pty Ltd and contributors
|
||||
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||
|
||||
# pylint: enable=invalid-name
|
||||
|
||||
"""
|
||||
A convenience wrapper over pysqlite.
|
||||
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
# Copyright: Ankitects Pty Ltd and contributors
|
||||
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||
|
||||
# pylint: enable=invalid-name
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import re
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
# Copyright: Ankitects Pty Ltd and contributors
|
||||
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||
|
||||
# pylint: enable=invalid-name
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import copy
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
# Copyright: Ankitects Pty Ltd and contributors
|
||||
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||
|
||||
# pylint: enable=invalid-name
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from enum import Enum
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
# Copyright: Ankitects Pty Ltd and contributors
|
||||
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||
|
||||
# pylint: disable=invalid-name
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
# Copyright: Ankitects Pty Ltd and contributors
|
||||
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||
|
||||
# pylint: disable=invalid-name
|
||||
|
||||
"""
|
||||
Tools for extending Anki.
|
||||
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
# Copyright: Ankitects Pty Ltd and contributors
|
||||
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||
|
||||
# pylint: enable=invalid-name
|
||||
|
||||
"""
|
||||
Wrapper for requests that adds a callback for tracking upload/download progress.
|
||||
"""
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
# Copyright: Ankitects Pty Ltd and contributors
|
||||
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||
|
||||
# pylint: disable=invalid-name
|
||||
|
||||
from typing import Any, Optional
|
||||
|
||||
from anki.collection import Collection
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
# Copyright: Ankitects Pty Ltd and contributors
|
||||
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||
|
||||
# pylint: disable=invalid-name
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import csv
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
# Copyright: Andreas Klauer <Andreas.Klauer@metamorpher.de>
|
||||
# License: BSD-3
|
||||
|
||||
# pylint: disable=invalid-name
|
||||
|
||||
import gzip
|
||||
import html
|
||||
import math
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
# Copyright: Ankitects Pty Ltd and contributors
|
||||
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||
|
||||
# pylint: enable=invalid-name
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import locale
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
# Copyright: Ankitects Pty Ltd and contributors
|
||||
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||
|
||||
# pylint: enable=invalid-name
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import html
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
# Copyright: Ankitects Pty Ltd and contributors
|
||||
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||
|
||||
# pylint: enable=invalid-name
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import os
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
# Copyright: Ankitects Pty Ltd and contributors
|
||||
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||
|
||||
# pylint: enable=invalid-name
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import copy
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
# Copyright: Ankitects Pty Ltd and contributors
|
||||
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||
|
||||
# pylint: enable=invalid-name
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import copy
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
# Copyright: Ankitects Pty Ltd and contributors
|
||||
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||
|
||||
# pylint: enable=invalid-name
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import sys
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
# Copyright: Ankitects Pty Ltd and contributors
|
||||
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||
|
||||
# pylint: enable=invalid-name
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import anki
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
# Copyright: Ankitects Pty Ltd and contributors
|
||||
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||
|
||||
# pylint: disable=invalid-name
|
||||
|
||||
"""
|
||||
This file contains experimental scheduler changes:
|
||||
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
# Copyright: Ankitects Pty Ltd and contributors
|
||||
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||
|
||||
# pylint: enable=invalid-name
|
||||
|
||||
"""
|
||||
Sound/TTS references extracted from card text.
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# pylint: disable=invalid-name
|
||||
|
||||
# from subtlepatterns.com; CC BY-SA 3.0.
|
||||
# by Daniel Beaton
|
||||
# https://www.toptal.com/designers/subtlepatterns/fancy-deboss/
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
# Copyright: Ankitects Pty Ltd and contributors
|
||||
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||
|
||||
# pylint: enable=invalid-name
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any, Callable, no_type_check
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
# Copyright: Ankitects Pty Ltd and contributors
|
||||
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||
|
||||
# pylint: enable=invalid-name
|
||||
|
||||
# Legacy code expects to find Collection in this module.
|
||||
|
||||
from anki.collection import Collection
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
# Copyright: Ankitects Pty Ltd and contributors
|
||||
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||
|
||||
# pylint: enable=invalid-name
|
||||
|
||||
from anki import sync_pb2
|
||||
|
||||
# public exports
|
||||
|
|
|
@ -4,8 +4,6 @@
|
|||
# Please see /docs/syncserver.md
|
||||
#
|
||||
|
||||
# pylint: enable=invalid-name
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import gzip
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
# Copyright: Ankitects Pty Ltd and contributors
|
||||
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||
|
||||
# pylint: enable=invalid-name
|
||||
|
||||
from anki.syncserver import serve
|
||||
|
||||
serve()
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
# Copyright: Ankitects Pty Ltd and contributors
|
||||
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||
|
||||
# pylint: enable=invalid-name
|
||||
|
||||
"""
|
||||
Anki maintains a cache of used tags so it can quickly present a list of tags
|
||||
for autocomplete and in the browser. For efficiency, deletions are not
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
# Copyright: Ankitects Pty Ltd and contributors
|
||||
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||
|
||||
# pylint: enable=invalid-name
|
||||
|
||||
"""
|
||||
This file contains the Python portion of the template rendering code.
|
||||
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
# Copyright: Ankitects Pty Ltd and contributors
|
||||
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||
|
||||
# pylint: enable=invalid-name
|
||||
|
||||
from typing import NoReturn
|
||||
|
||||
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
# Copyright: Ankitects Pty Ltd and contributors
|
||||
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||
|
||||
# pylint: enable=invalid-name
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import json as _json
|
||||
|
|
Loading…
Reference in a new issue