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

Speed improvements to qmk find. #24385

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

Conversation

tzarc
Copy link
Member

@tzarc tzarc commented Sep 10, 2024

Description

As discussed on discord.

Types of Changes

  • Core
  • Bugfix
  • New feature
  • Enhancement/optimization
  • Keyboard (addition or update)
  • Keymap/layout/userspace (addition or update)
  • Documentation

Checklist

  • My code follows the code style of this project: C, Python
  • I have read the PR Checklist document and have made the appropriate changes.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • I have tested the changes and verified that they work and don't break anything (as well as I can manage).

@tzarc tzarc requested a review from a team September 10, 2024 13:38
@github-actions github-actions bot added python cli qmk cli command labels Sep 10, 2024
@@ -20,6 +21,7 @@
def find(cli):
"""Search through all keyboards and keymaps for a given search criteria.
"""
os.environ['SKIP_SCHEMA_VALIDATION'] = '1'
Copy link
Contributor

Choose a reason for hiding this comment

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

Should perhaps use .setdefault('SKIP_SCHEMA_VALIDATION', '1') here, to allow users to override the value. Not that I can think about a good use case to do that, must say.

But also, with the current implementation, a value of '0' would not even override.

if not os.environ.get('SKIP_SCHEMA_VALIDATION', None)
# if not '0'
# if not bool('0')

Non-empty string evaluates to True... even though it was meant as "do not skip"

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

Successfully merging this pull request may close these issues.

2 participants