]> Repositories - hackapet/Adafruit_Blinka_Displayio.git/blobdiff - displayio/__init__.py
run pre-commit
[hackapet/Adafruit_Blinka_Displayio.git] / displayio / __init__.py
index c3b04accd88901acf24e5069366a3b760c81994f..7489966bfd46ed22caad69a5200b65982f549aed 100644 (file)
@@ -1,24 +1,6 @@
-# The MIT License (MIT)
+# SPDX-FileCopyrightText: 2020 Melissa LeBlanc-Williams for Adafruit Industries
 #
 #
-# Copyright (c) 2020 Melissa LeBlanc-Williams for Adafruit Industries
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
+# SPDX-License-Identifier: MIT
 
 """
 `displayio`
 
 """
 `displayio`
@@ -41,7 +23,11 @@ from displayio.display import Display
 from displayio.epaperdisplay import EPaperDisplay
 from displayio.fourwire import FourWire
 from displayio.group import Group
 from displayio.epaperdisplay import EPaperDisplay
 from displayio.fourwire import FourWire
 from displayio.group import Group
-from displayio.i2cdisplay import I2CDisplay
+
+try:
+    from displayio.i2cdisplay import I2CDisplay
+except NotImplementedError:
+    print("WARNING: I2CDisplay is not supported on this device.")
 from displayio.ondiskbitmap import OnDiskBitmap
 from displayio.palette import Palette
 from displayio.parallelbus import ParallelBus
 from displayio.ondiskbitmap import OnDiskBitmap
 from displayio.palette import Palette
 from displayio.parallelbus import ParallelBus