diff --git a/.github/workflows/flake8-linter.yml b/.github/workflows/flake8-linter.yml index 0af429c01..a235fbff4 100644 --- a/.github/workflows/flake8-linter.yml +++ b/.github/workflows/flake8-linter.yml @@ -3,7 +3,7 @@ name: flake8 Lint on: pull_request: workflow_run: - workflows: ["Run autopep8 Formatter"] + workflows: ["Run black Formatter"] types: - completed jobs: diff --git a/.github/workflows/pep8-formatter.yml b/.github/workflows/pep8-formatter.yml index 4b2282596..9865b2262 100644 --- a/.github/workflows/pep8-formatter.yml +++ b/.github/workflows/pep8-formatter.yml @@ -1,4 +1,4 @@ -name: Run autopep8 Formatter +name: Run black Formatter on: [push, pull_request] @@ -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 }} diff --git a/mission/internal_status_auv/internal_status_auv/pressure_sensor_node.py b/mission/internal_status_auv/internal_status_auv/pressure_sensor_node.py index f204c609a..d88d5ec56 100755 --- a/mission/internal_status_auv/internal_status_auv/pressure_sensor_node.py +++ b/mission/internal_status_auv/internal_status_auv/pressure_sensor_node.py @@ -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): diff --git a/mission/internal_status_auv/internal_status_auv/temperature_sensor_node.py b/mission/internal_status_auv/internal_status_auv/temperature_sensor_node.py index df2292fdf..8db45cd80 100755 --- a/mission/internal_status_auv/internal_status_auv/temperature_sensor_node.py +++ b/mission/internal_status_auv/internal_status_auv/temperature_sensor_node.py @@ -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):