Skip to content

Commit

Permalink
Added project wide flake8 config file, some more lint corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
jasmeet0915 committed Feb 8, 2024
1 parent cca44dd commit eb879b7
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 6 deletions.
6 changes: 6 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[flake8]
extend-ignore = B902,C816,D100,D101,D102,D103,D104,D105,D106,D107,D203,D212,D404,I202,Q000
import-order-style = google
max-line-length = 125
show-source = true
statistics = true
2 changes: 1 addition & 1 deletion .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
distribution: humble
linter: flake8
package-name: "*"
arguments: '--config=${{ github.workspace }}/object_detection/setup.cfg'
arguments: '--config=${{ github.workspace }}/.flake8'
- name: Ament PEP257 Lint
uses: ros-tooling/action-ros-lint@master
with:
Expand Down
4 changes: 2 additions & 2 deletions object_detection/object_detection/DetectorBase.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import numpy as np

from abc import ABC, abstractmethod

import numpy as np


class DetectorBase(ABC):

Expand Down
1 change: 1 addition & 0 deletions object_detection/object_detection/Detectors/YOLOv8.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import os

from ultralytics import YOLO

from ..DetectorBase import DetectorBase


Expand Down
3 changes: 1 addition & 2 deletions object_detection/setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import os

from glob import glob
import os

from setuptools import setup

Expand Down
2 changes: 1 addition & 1 deletion object_detection/test/test_flake8.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
@pytest.mark.flake8
@pytest.mark.linter
def test_flake8():
config_file = join(dirname(dirname(abspath(__file__))), "setup.cfg")
config_file = join(dirname(dirname(dirname(abspath(__file__)))), ".flake8")
args = [
"--config={}".format(config_file)
]
Expand Down

0 comments on commit eb879b7

Please sign in to comment.