Skip to content

Commit

Permalink
Merge pull request #2 from thedropbears/pre-commit
Browse files Browse the repository at this point in the history
Add pre-commit to dev-requirements, run on existing files.
  • Loading branch information
auscompgeek authored Jan 6, 2024
2 parents d035e90 + b730d60 commit ecd9f0a
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .deploy_cfg
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[auth]
hostname = 4774
hostname = 4774
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,4 @@ dmypy.json
### WPILib ###
networktables.json
simgui*.json
*.wpilog
*.wpilog
2 changes: 1 addition & 1 deletion .installer_config
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[auth]
hostname = 4774
hostname = 4774
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,15 @@ pip install -r requirements-dev.txt
```

### Setup pre-commit
Pre-commit is setup to automatically run formatters and linters when you commit. It is suggested to install pre-commit via pipx to keep it seperate from robot code dependencies. First [install pipx](https://pipx.pypa.io/stable/installation/).

Pre-commit is setup to automatically run formatters and linters when you commit.

Install pre-commit with pipx:
```
pipx install pre-commit
```

Setup the pre-commit hooks to run on commit:
```
pre-commit install
```
Expand Down
1 change: 1 addition & 0 deletions ids.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ class TalonIds(enum.IntEnum):
drive_4 = 4
steer_4 = 8


@enum.unique
class CancoderIds(enum.IntEnum):
swerve_1 = 1
Expand Down
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
hypothesis
pytest
-r requirements.txt
-r requirements.txt

0 comments on commit ecd9f0a

Please sign in to comment.