Skip to content

Fix 'Blinka library required' false-positives #85

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

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions adabot/lib/circuitpython_library_validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,19 @@
# full name on Github (like Adafruit_CircuitPython_Bundle).
BUNDLE_IGNORE_LIST = [BUNDLE_REPO_NAME]

LIBRARY_DOESNT_NEED_BLINKA = "Adafruit_CircuitPython_ImageLoad"
LIBRARIES_DONT_NEED_BLINKA = [
"Adafruit_CircuitPython_BusDevice",
"Adafruit_CircuitPython_CircuitPlayground",
"Adafruit_CircuitPython_FancyLED",
"Adafruit_CircuitPython_IRRemote",
"Adafruit_CircuitPython_ImageLoad",
"Adafruit_CircuitPython_MCP9808",
"Adafruit_CircuitPython_PCA9685",
"Adafruit_CircuitPython_PCF8523",
"Adafruit_CircuitPython_TLC59711",
"Adafruit_CircuitPython_Waveform",
"Adafruit_CircuitPython_miniQR",
]

# Cache CircuitPython's subprojects on ReadTheDocs so its not fetched every repo check.
rtd_subprojects = None
Expand Down Expand Up @@ -371,7 +383,7 @@ def _validate_requirements_txt(self, repo, file_info):
lines = contents.text.split("\n")
blinka_lines = [l for l in lines if re.match(r"[\s]*Adafruit-Blinka[\s]*", l)]

if not blinka_lines and repo["name"] not in LIBRARY_DOESNT_NEED_BLINKA:
if not blinka_lines and repo["name"] not in LIBRARIES_DONT_NEED_BLINKA:
errors.append(ERROR_MISSING_BLINKA)
return errors

Expand Down