Anki/pylib/anki
RumovZ 9dc3cf216a
PEP8 for rest of pylib (#1451)
* PEP8 dbproxy.py

* PEP8 errors.py

* PEP8 httpclient.py

* PEP8 lang.py

* PEP8 latex.py

* Add decorator to deprectate key words

* Make replacement for deprecated attribute optional

* Use new helper `_print_replacement_warning()`

* PEP8 media.py

* PEP8 rsbackend.py

* PEP8 sound.py

* PEP8 stdmodels.py

* PEP8 storage.py

* PEP8 sync.py

* PEP8 tags.py

* PEP8 template.py

* PEP8 types.py

* Fix DeprecatedNamesMixinForModule

The class methods need to be overridden with instance methods, so every
module has its own dicts.

* Use `# pylint: disable=invalid-name` instead of id

* PEP8 utils.py

* Only decorate `__getattr__` with `@no_type_check`

* Fix mypy issue with snakecase

Importing it from `anki._vendor` raises attribute errors.

* Format

* Remove inheritance of DeprecatedNamesMixin

There's almost no shared code now and overriding classmethods with
instance methods raises mypy issues.

* Fix traceback frames of deprecation warnings

* remove fn/TimedLog (dae)

Neither Anki nor add-ons appear to have been using it

* fix some issues with stringcase use (dae)

- the wheel was depending on the PyPI version instead of our vendored
version
- _vendor:stringcase should not have been listed in the anki py_library.
We already include the sources in py_srcs, and need to refer to them
directly. By listing _vendor:stringcase as well, we were making a
top-level stringcase library available, which would have only worked for
distributing because the wheel definition was also incorrect.
- mypy errors are what caused me to mistakenly add the above - they
were because the type: ignore at the top of stringcase.py was causing
mypy to completely ignore the file, so it was not aware of any attributes
it contained.
2021-10-25 14:50:13 +10:00
..
_backend PEP8 for rest of pylib (#1451) 2021-10-25 14:50:13 +10:00
_vendor PEP8 for rest of pylib (#1451) 2021-10-25 14:50:13 +10:00
importing PEP8 for rest of pylib (#1451) 2021-10-25 14:50:13 +10:00
scheduler PEP8 for rest of pylib (#1451) 2021-10-25 14:50:13 +10:00
syncserver PEP8 for rest of pylib (#1451) 2021-10-25 14:50:13 +10:00
__init__.py PEP8 pylib (#1443) 2021-10-22 20:39:49 +10:00
_legacy.py PEP8 for rest of pylib (#1451) 2021-10-25 14:50:13 +10:00
backend_pb2.pyi refactor protobuf handling for split/import 2021-07-10 19:17:05 +10:00
browser.py PEP8 pylib (#1443) 2021-10-22 20:39:49 +10:00
BUILD.bazel PEP8 for rest of pylib (#1451) 2021-10-25 14:50:13 +10:00
buildinfo.py PEP8 pylib (#1443) 2021-10-22 20:39:49 +10:00
card_rendering_pb2.pyi split out remaining tags, stats, media and rendering 2021-07-10 23:16:18 +10:00
cards.py run pyupgrade over codebase [python upgrade required] 2021-10-04 15:05:48 +10:00
cards_pb2.pyi split out cards and collection 2021-07-10 19:52:31 +10:00
collection.py PEP8 for rest of pylib (#1451) 2021-10-25 14:50:13 +10:00
collection_pb2.pyi split out cards and collection 2021-07-10 19:52:31 +10:00
config.py PEP8 pylib (#1443) 2021-10-22 20:39:49 +10:00
config_pb2.pyi configs.proto plural workaround no longer necessary 2021-07-11 19:35:18 +10:00
consts.py PEP8 pylib (#1443) 2021-10-22 20:39:49 +10:00
db.py PEP8 pylib (#1443) 2021-10-22 20:39:49 +10:00
dbproxy.py PEP8 for rest of pylib (#1451) 2021-10-25 14:50:13 +10:00
deckconfig_pb2.pyi split out sync, search, scheduler & config 2021-07-10 21:33:12 +10:00
decks.py PEP8 for rest of pylib (#1451) 2021-10-25 14:50:13 +10:00
decks_pb2.pyi split out sync, search, scheduler & config 2021-07-10 21:33:12 +10:00
errors.py PEP8 for rest of pylib (#1451) 2021-10-25 14:50:13 +10:00
exporting.py PEP8 for rest of pylib (#1451) 2021-10-25 14:50:13 +10:00
find.py run pyupgrade over codebase [python upgrade required] 2021-10-04 15:05:48 +10:00
generic_pb2.pyi refactor protobuf handling for split/import 2021-07-10 19:17:05 +10:00
hooks.py run pyupgrade over codebase [python upgrade required] 2021-10-04 15:05:48 +10:00
hooks_gen.py symlink generated .py/.pyi into tree to fix Python code completion 2020-12-16 11:36:42 +10:00
httpclient.py PEP8 for rest of pylib (#1451) 2021-10-25 14:50:13 +10:00
i18n_pb2.pyi refactor protobuf handling for split/import 2021-07-10 19:17:05 +10:00
lang.py PEP8 for rest of pylib (#1451) 2021-10-25 14:50:13 +10:00
latex.py PEP8 for rest of pylib (#1451) 2021-10-25 14:50:13 +10:00
links_pb2.pyi fix broken links_pb2.pyi link 2021-10-01 22:52:15 +10:00
media.py PEP8 for rest of pylib (#1451) 2021-10-25 14:50:13 +10:00
media_pb2.pyi split out remaining tags, stats, media and rendering 2021-07-10 23:16:18 +10:00
models.py run pyupgrade over codebase [python upgrade required] 2021-10-04 15:05:48 +10:00
notes.py PEP8 for rest of pylib (#1451) 2021-10-25 14:50:13 +10:00
notes_pb2.pyi split out sync, search, scheduler & config 2021-07-10 21:33:12 +10:00
notetypes_pb2.pyi split out sync, search, scheduler & config 2021-07-10 21:33:12 +10:00
py.typed mark anki and aqt modules as having typing info 2020-01-13 13:03:37 +10:00
rsbackend.py PEP8 for rest of pylib (#1451) 2021-10-25 14:50:13 +10:00
scheduler_pb2.pyi split out sync, search, scheduler & config 2021-07-10 21:33:12 +10:00
search_pb2.pyi split out sync, search, scheduler & config 2021-07-10 21:33:12 +10:00
sound.py PEP8 for rest of pylib (#1451) 2021-10-25 14:50:13 +10:00
stats.py PEP8 pylib (#1443) 2021-10-22 20:39:49 +10:00
stats_pb2.pyi split out remaining tags, stats, media and rendering 2021-07-10 23:16:18 +10:00
statsbg.py tweaking the folder names again 2020-01-03 07:48:38 +10:00
stdmodels.py PEP8 for rest of pylib (#1451) 2021-10-25 14:50:13 +10:00
storage.py PEP8 for rest of pylib (#1451) 2021-10-25 14:50:13 +10:00
sync.py PEP8 for rest of pylib (#1451) 2021-10-25 14:50:13 +10:00
sync_pb2.pyi split out sync, search, scheduler & config 2021-07-10 21:33:12 +10:00
tags.py PEP8 for rest of pylib (#1451) 2021-10-25 14:50:13 +10:00
tags_pb2.pyi split out remaining tags, stats, media and rendering 2021-07-10 23:16:18 +10:00
template.py PEP8 for rest of pylib (#1451) 2021-10-25 14:50:13 +10:00
types.py PEP8 for rest of pylib (#1451) 2021-10-25 14:50:13 +10:00
utils.py PEP8 for rest of pylib (#1451) 2021-10-25 14:50:13 +10:00
wheel_description.txt move aqt_data into source folder; implement wheel building 2020-11-04 12:14:03 +10:00