Conform class name case conventions
This commit is contained in:
		| @@ -5,7 +5,7 @@ Enables referring to keys by `'NAME'` rather than `KC.NAME`. | |||||||
| For example: | For example: | ||||||
|  |  | ||||||
| ```python | ```python | ||||||
| from kmk.extensions.stringy_keymaps import Stringy_keymaps | from kmk.extensions.stringy_keymaps import StringyKeymaps | ||||||
|  |  | ||||||
| # Normal | # Normal | ||||||
| # keyboard.keymap = [[ KC.A, KC.B, KC.RESET ]] | # keyboard.keymap = [[ KC.A, KC.B, KC.RESET ]] | ||||||
| @@ -16,13 +16,13 @@ from kmk.extensions.stringy_keymaps import Stringy_keymaps | |||||||
| # String names | # String names | ||||||
| keyboard.keymap = [[ 'A' , 'B', 'RESET' ]] | keyboard.keymap = [[ 'A' , 'B', 'RESET' ]] | ||||||
|  |  | ||||||
| stringy_keymaps = Stringy_keymaps() | stringyKeymaps = StringyKeymaps() | ||||||
|  |  | ||||||
| # Enabling debug will show each replacement or failure. | # Enabling debug will show each replacement or failure. | ||||||
| # This is recommended during the initial development of a keyboard. | # This is recommended during the initial development of a keyboard. | ||||||
| # stringy_keymaps.debug_enable = True | # stringyKeymaps.debug_enable = True | ||||||
|  |  | ||||||
| keyboard.extensions.append(stringy_keymaps) | keyboard.extensions.append(stringyKeymaps) | ||||||
| ``` | ``` | ||||||
|  |  | ||||||
| It should be noted that these are **not** ASCII. The string is **not** what | It should be noted that these are **not** ASCII. The string is **not** what | ||||||
|   | |||||||
| @@ -16,4 +16,4 @@ extensions are | |||||||
| - [RGB](rgb.md): RGB lighting for underglow. Will work on most matrix RGB as will | - [RGB](rgb.md): RGB lighting for underglow. Will work on most matrix RGB as will | ||||||
|   be treated the same as underglow. |   be treated the same as underglow. | ||||||
| - [Status LED](extension_statusled.md): Indicates which layer you are on with an array of single leds. | - [Status LED](extension_statusled.md): Indicates which layer you are on with an array of single leds. | ||||||
| - [Stringy Keymaps](extension_stringy_keymaps): Enables referring to keys by 'NAME' rather than KC.NAME | - [Stringy Keymaps](extension_stringy_keymaps): Enables referring to keys by `'NAME'` rather than `KC.NAME` | ||||||
|   | |||||||
| @@ -2,7 +2,7 @@ from kmk.extensions import Extension | |||||||
| from kmk.keys import KC | from kmk.keys import KC | ||||||
|  |  | ||||||
|  |  | ||||||
| class Stringy_keymaps(Extension): | class StringyKeymaps(Extension): | ||||||
|     ##### |     ##### | ||||||
|     # User-configurable |     # User-configurable | ||||||
|     debug_enabled = False |     debug_enabled = False | ||||||
|   | |||||||
| @@ -1,6 +1,6 @@ | |||||||
| import unittest | import unittest | ||||||
|  |  | ||||||
| from kmk.extensions.stringy_keymaps import Stringy_keymaps | from kmk.extensions.stringy_keymaps import StringyKeymaps | ||||||
| from kmk.keys import KC | from kmk.keys import KC | ||||||
| from tests.keyboard_test import KeyboardTest | from tests.keyboard_test import KeyboardTest | ||||||
|  |  | ||||||
| @@ -8,14 +8,14 @@ from tests.keyboard_test import KeyboardTest | |||||||
| class Test_extension_stringy_keymaps(unittest.TestCase): | class Test_extension_stringy_keymaps(unittest.TestCase): | ||||||
|     def test_basic_kmk_keyboard_replace_string_primary_name(self): |     def test_basic_kmk_keyboard_replace_string_primary_name(self): | ||||||
|         keyboard = KeyboardTest( |         keyboard = KeyboardTest( | ||||||
|             [], [['1', '2', '3', '4']], extensions={Stringy_keymaps()} |             [], [['1', '2', '3', '4']], extensions={StringyKeymaps()} | ||||||
|         ) |         ) | ||||||
|  |  | ||||||
|         keyboard.test('Simple key press', [(0, True), (0, False)], [{KC.N1}, {}]) |         keyboard.test('Simple key press', [(0, True), (0, False)], [{KC.N1}, {}]) | ||||||
|  |  | ||||||
|     def test_basic_kmk_keyboard_replace_string_secondary_name(self): |     def test_basic_kmk_keyboard_replace_string_secondary_name(self): | ||||||
|         keyboard = KeyboardTest( |         keyboard = KeyboardTest( | ||||||
|             [], [['N1', 'N2', 'N3', 'N4']], extensions={Stringy_keymaps()} |             [], [['N1', 'N2', 'N3', 'N4']], extensions={StringyKeymaps()} | ||||||
|         ) |         ) | ||||||
|  |  | ||||||
|         keyboard.test('Simple key press', [(0, True), (0, False)], [{KC.N1}, {}]) |         keyboard.test('Simple key press', [(0, True), (0, False)], [{KC.N1}, {}]) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user