Skip to content
Merged

Ruff #1375

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 0 additions & 17 deletions .flake8

This file was deleted.

82 changes: 0 additions & 82 deletions .github/workflows/flake8.yml

This file was deleted.

18 changes: 18 additions & 0 deletions .github/workflows/ruff.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Ruff

on:
pull_request:
branches: [main, next]

jobs:
lint:
name: Lint and format check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/ruff-action@v3
with:
args: check --output-format=github
- uses: astral-sh/ruff-action@v3
with:
args: format --check --diff
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,4 @@ docs/_build/
/.spyproject
.spyproject
hailort.log
.ruff_cache/
21 changes: 5 additions & 16 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
repos:
- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
hooks:
- id: flake8
additional_dependencies: [
'astroid==2.12.14',
'pylint==2.15.10',
'flake8-bugbear>=22.10.27',
'flake8-comprehensions>=3.10',
'flake8-debugger',
'flake8-docstrings>=1.6.0',
'flake8-isort>=5.0',
'flake8-pylint',
'flake8-rst-docstrings',
'flake8-string-format'
]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.11.4
hooks:
- id: ruff
- id: ruff-format
5 changes: 0 additions & 5 deletions .pylintrc

This file was deleted.

3 changes: 1 addition & 2 deletions apps/app_capture2.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
# when the capture, that is running asynchronously, is finished.

from PyQt5 import QtCore
from PyQt5.QtWidgets import (QApplication, QHBoxLayout, QLabel, QPushButton,
QVBoxLayout, QWidget)
from PyQt5.QtWidgets import QApplication, QHBoxLayout, QLabel, QPushButton, QVBoxLayout, QWidget

from picamera2 import Picamera2
from picamera2.previews.qt import QGlPicamera2
Expand Down
3 changes: 1 addition & 2 deletions apps/app_capture_af.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
from libcamera import controls
from PyQt5 import QtCore
from PyQt5.QtGui import QPalette
from PyQt5.QtWidgets import (QApplication, QCheckBox, QHBoxLayout, QLabel,
QPushButton, QVBoxLayout, QWidget)
from PyQt5.QtWidgets import QApplication, QCheckBox, QHBoxLayout, QLabel, QPushButton, QVBoxLayout, QWidget

from picamera2 import Picamera2
from picamera2.previews.qt import QGlPicamera2
Expand Down
3 changes: 1 addition & 2 deletions apps/app_capture_overlay.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

import numpy as np
from PyQt5 import QtCore
from PyQt5.QtWidgets import (QApplication, QCheckBox, QHBoxLayout, QLabel,
QPushButton, QVBoxLayout, QWidget)
from PyQt5.QtWidgets import QApplication, QCheckBox, QHBoxLayout, QLabel, QPushButton, QVBoxLayout, QWidget

from picamera2 import Picamera2
from picamera2.previews.qt import QGlPicamera2
Expand Down
3 changes: 1 addition & 2 deletions apps/app_capture_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
# async_result field.

from PyQt5 import QtCore
from PyQt5.QtWidgets import (QApplication, QHBoxLayout, QLabel, QPushButton,
QVBoxLayout, QWidget)
from PyQt5.QtWidgets import QApplication, QHBoxLayout, QLabel, QPushButton, QVBoxLayout, QWidget

from picamera2 import Picamera2
from picamera2.previews.qt import QPicamera2
Expand Down
Loading
Loading