Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update consts.py #47

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Update consts.py #47

wants to merge 1 commit into from

Conversation

dluschan
Copy link

@dluschan dluschan commented Dec 4, 2023

check str attribute instead of an anki version

Description

Concisely describe what the pull request is trying to achieve. If pertinent, link to an existing issue report, or briefly explain the problem the PR is meant to solve. Feel free to attach screenshots or other media for UI-related changes.

Checklist:

Please replace the space inside the brackets with an x and fill out the ellipses if the following items apply:

  • I've read and understood the contribution guidelines
  • I've tested my changes against at least one of the following Anki builds:
    • Latest standard Anki 2.1 binary build [required for Anki-compatible 2.1 add-ons]
    • Latest alternative Anki 2.1 binary build
    • Latest Anki 2.0 binary build [required for Anki 2.0-compatible add-ons]
  • I've tested my changes on at least one of the following platforms:
    • Linux, version:
    • Windows, version:
    • macOS, version: 14.1
  • My changes potentially affect non-desktop platforms, of which I've tested:
    • AnkiMobile, version:
    • AnkiDroid, version:
    • AnkiWeb

check str attribute instead of an anki version
@@ -13,7 +13,7 @@
import os
from anki import version

anki21 = version.startswith("2.1.")
anki21 = not hasattr(str, 'decode')
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aha, this is smart!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants