Skip to content

Commit 4cfe0b1

Browse files
authored
Standardize robot.py styling for copyright header (#93)
1 parent 411d9b0 commit 4cfe0b1

File tree

123 files changed

+690
-107
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

123 files changed

+690
-107
lines changed

.github/workflows/test.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,17 @@ jobs:
1616
- uses: actions/checkout@v4
1717
- uses: psf/black@stable
1818

19+
check-file-headers:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@v4
23+
- uses: actions/setup-python@v4
24+
with:
25+
python-version: 3.12
26+
- name: Check header
27+
run: python ./check_header.py
28+
shell: bash
29+
1930
test:
2031
runs-on: ${{ matrix.os }}
2132
strategy:

addressableled/robot.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
#!/usr/bin/env python3
2+
#
3+
# Copyright (c) FIRST and other WPILib contributors.
4+
# Open Source Software; you can modify and/or share it under the terms of
5+
# the WPILib BSD license file in the root directory of this project.
6+
#
7+
18
import wpilib
29

310
kLEDBuffer = 60

arcade-drive-xbox-controller/robot.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
11
#!/usr/bin/env python3
2-
"""
3-
This is a demo program showing the use of the DifferentialDrive class.
4-
Runs the motors with split arcade steering and an Xbox controller.
5-
"""
2+
#
3+
# Copyright (c) FIRST and other WPILib contributors.
4+
# Open Source Software; you can modify and/or share it under the terms of
5+
# the WPILib BSD license file in the root directory of this project.
6+
#
67

78
import wpilib
89
import wpilib.drive
910

1011

1112
class MyRobot(wpilib.TimedRobot):
13+
"""
14+
This is a demo program showing the use of the DifferentialDrive class.
15+
Runs the motors with split arcade steering and an Xbox controller.
16+
"""
17+
1218
def robotInit(self):
1319
"""Robot initialization function"""
1420

arcade-drive/robot.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
11
#!/usr/bin/env python3
2-
"""
3-
This is a demo program showing the use of the DifferentialDrive class.
4-
Runs the motors with arcade steering.
5-
"""
2+
#
3+
# Copyright (c) FIRST and other WPILib contributors.
4+
# Open Source Software; you can modify and/or share it under the terms of
5+
# the WPILib BSD license file in the root directory of this project.
6+
#
67

78
import wpilib
89
import wpilib.drive
910

1011

1112
class MyRobot(wpilib.TimedRobot):
13+
"""
14+
This is a demo program showing the use of the DifferentialDrive class.
15+
Runs the motors with arcade steering.
16+
"""
17+
1218
def robotInit(self):
1319
"""Robot initialization function"""
1420

arm-simulation/constants.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
#
12
# Copyright (c) FIRST and other WPILib contributors.
23
# Open Source Software; you can modify and/or share it under the terms of
34
# the WPILib BSD license file in the root directory of this project.
5+
#
46

57
import math
68

arm-simulation/physics.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
#
2+
# Copyright (c) FIRST and other WPILib contributors.
3+
# Open Source Software; you can modify and/or share it under the terms of
4+
# the WPILib BSD license file in the root directory of this project.
5+
#
6+
17
#
28
# See the documentation for more details on how this works
39
#

arm-simulation/robot.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
# Copyright (c) FIRST and other WPILib contributors.
44
# Open Source Software; you can modify and/or share it under the terms of
55
# the WPILib BSD license file in the root directory of this project.
6+
#
67

78
import wpilib
89

arm-simulation/subsytems/arm.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
#
12
# Copyright (c) FIRST and other WPILib contributors.
23
# Open Source Software; you can modify and/or share it under the terms of
34
# the WPILib BSD license file in the root directory of this project.
5+
#
46

57
import wpilib
68

armbot/constants.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
#
12
# Copyright (c) FIRST and other WPILib contributors.
23
# Open Source Software; you can modify and/or share it under the terms of
34
# the WPILib BSD license file in the root directory of this project.
5+
#
46

57
"""
68
The constants module is a convenience place for teams to hold robot-wide

armbot/robot.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
#!usr/bin/env python3
2-
1+
#!/usr/bin/env python3
2+
#
33
# Copyright (c) FIRST and other WPILib contributors.
44
# Open Source Software; you can modify and/or share it under the terms of
55
# the WPILib BSD license file in the root directory of this project.
6+
#
67

78
import wpilib
89
import commands2

0 commit comments

Comments
 (0)