Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
Andreas Kluge Svendsrud authored and Andreas Kluge Svendsrud committed Sep 20, 2024
1 parent 326d8b1 commit 8b77f1a
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/flake8-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: flake8 Lint
on:
pull_request:
workflow_run:
workflows: ["Run autopep8 Formatter"]
workflows: ["Run black Formatter"]
types:
- completed
jobs:
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/pep8-formatter.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Run autopep8 Formatter
name: Run black Formatter

on: [push, pull_request]

Expand All @@ -10,25 +10,25 @@ jobs:
# Step 1: Checkout the repository
- uses: actions/checkout@v3

# Step 2: Set up Python environment (since autopep8 is a Python tool)
# Step 2: Set up Python environment
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'

# Step 3: Install autopep8
- name: Install autopep8
run: pip install autopep8
# Step 3: Install black
- name: Install black
run: pip install black

# Step 4: Run autopep8 formatter with aggressive mode on all files recursively
- name: Run autopep8
run: autopep8 --in-place --recursive --aggressive --aggressive .
# Step 4: Run black formatter
- name: Run black
run: black .

# Step 5: Commit changes made by autopep8
# Step 5: Commit changes made by black
- uses: EndBug/add-and-commit@v4
with:
author_name: 'Autopep8 Robot'
author_name: 'Black Formatter Robot'
author_email: 'robot@example.com'
message: 'Committing autopep8 formatting changes'
message: 'Committing black formatting changes'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ def warning_timer_callback(self):
# Check if Pressure is abnormaly to high, if so print a warning
if (self.pressure > self.pressureCriticalLevel):
self.logger.fatal(
f"WARNING: Internal pressure to HIGH: {
self.pressure} hPa! Drone might be LEAKING!")
f"WARNING: Internal pressure to HIGH: {self.pressure} hPa! Drone might be LEAKING!")


def main(args=None):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ def warning_timer_callback(self):
# Check if Temperature is abnormal and if so print a warning
if (self.temperature > self.temperatureCriticalLevel):
self.logger.fatal(
f"WARNING: Temperature inside the Drone to HIGH: {
self.temperature} *C! Drone might be overheating!")
f"WARNING: Temperature inside the Drone to HIGH: {self.temperature} *C! Drone might be overheating!")


def main(args=None):
Expand Down

0 comments on commit 8b77f1a

Please sign in to comment.