db and checks : Add check for trailing comma. Format and fix db.
This commit is contained in:
parent
edcff12fc9
commit
446b2d9c7b
3 changed files with 5 additions and 1 deletions
|
@ -84,6 +84,7 @@ You may now send a Pull Request. Tests are automatically run on Pull Requests, s
|
|||
- Buttons conform to supported values.
|
||||
- Hats aren't 0 or diagonals.
|
||||
- No upstream official mappings are modified.
|
||||
- All mappings end with a comma.
|
||||
|
||||
### Formatting
|
||||
- The database is sorted by platform, then by name.
|
||||
|
|
3
check.py
3
check.py
|
@ -73,6 +73,9 @@ class Mapping:
|
|||
}
|
||||
|
||||
def __init__(self, mapping_string, line_number, add_missing_platform = False):
|
||||
if not mapping_string.endswith(",\n") and not mapping_string.endswith(","):
|
||||
raise ValueError("Mapping should end with comma (,)")
|
||||
|
||||
self.guid = ""
|
||||
self.name = ""
|
||||
self.platform = ""
|
||||
|
|
|
@ -170,7 +170,7 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
|
|||
030000008f0e00001330000011010000,HuiJia SNES Controller,a:b4,b:b2,back:b16,dpdown:+a2,dpleft:-a0,dpright:+a0,dpup:-a2,leftshoulder:b12,rightshoulder:b14,start:b18,x:b6,y:b0,platform:Mac OS X,
|
||||
03000000830500006020000000010000,iBuffalo SNES Controller,a:b1,b:b0,back:b6,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b5,start:b7,x:b3,y:b2,platform:Mac OS X,
|
||||
03000000830500006020000000000000,iBuffalo USB 2-axis 8-button Gamepad,a:b1,b:b0,back:b6,leftshoulder:b4,leftx:a0,lefty:a1,rightshoulder:b5,start:b7,x:b3,y:b2,platform:Mac OS X,
|
||||
030000007e0500000620000001000000,Joy-Con (L),a:b0,b:b1,x:b2,y:b3,start:b8,leftstick:b10,leftshoulder:b4,rightshoulder:b5,-leftx:h0.8,+leftx:h0.2,-lefty:h0.1,+lefty:h0.4,platform:Mac OS X
|
||||
030000007e0500000620000001000000,Joy-Con (L),+leftx:h0.2,+lefty:h0.4,-leftx:h0.8,-lefty:h0.1,a:b0,b:b1,leftshoulder:b4,leftstick:b10,rightshoulder:b5,start:b8,x:b2,y:b3,platform:Mac OS X,
|
||||
030000006d04000016c2000000020000,Logitech Dual Action,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X,
|
||||
030000006d04000016c2000000030000,Logitech Dual Action,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X,
|
||||
030000006d04000016c2000014040000,Logitech Dual Action,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue