Skip to content

Commit

Permalink
updated setup_linter fmt lint targets
Browse files Browse the repository at this point in the history
  • Loading branch information
zyxue authored and seldondev committed Feb 5, 2021
1 parent 1999147 commit 29e8515
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 6 deletions.
5 changes: 3 additions & 2 deletions operator/hack/create_graph_openapi_schema.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import argparse
import yaml
import sys
import copy
import sys

import yaml


def getOpts(cmd_line_args):
Expand Down
7 changes: 5 additions & 2 deletions operator/hack/csv_hack.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import yaml
import argparse
import sys

import yaml


def getOpts(cmd_line_args):
parser = argparse.ArgumentParser(
Expand All @@ -20,7 +21,9 @@ def remove_versions(csv):


def update_container_image(csv, version):
csv["metadata"]["annotations"]["containerImage"] = "seldonio/seldon-core-operator:"+version
csv["metadata"]["annotations"]["containerImage"] = (
"seldonio/seldon-core-operator:" + version
)
return csv


Expand Down
1 change: 1 addition & 0 deletions operator/helm/split_resources.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import argparse
import glob
import re

import yaml

parser = argparse.ArgumentParser()
Expand Down
10 changes: 8 additions & 2 deletions python/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -95,17 +95,23 @@ push_conda:
@echo "Alternatively use anaconda upload to publish on own channel"

setup_linter:
pip install black==20.8b1
pip install black==20.8b1 isort==5.7.0

fmt:
black \
./ ../testing ../operator/helm ../operator/hack \
--exclude "(testing/scripts/proto|seldon_core/proto/|.eggs|.tox)"
--exclude "(testing|scripts|proto|seldon_core/proto/|.eggs|.tox)"
isort \
./ ../testing ../operator/helm ../operator/hack \
--skip testing --skip scripts --skip proto --skip seldon_core/proto --skip .eggs --skip .tox

lint: licenses
black \
--check ./ ../testing \
--exclude "(testing/scripts/proto|seldon_core/proto/|.eggs|.tox)"
isort \
--check-only ./ ../testing \
--skip testing --skip scripts --skip proto --skip seldon_core/proto --skip .eggs --skip .tox
flake8
# Check if licenses have changed
git \
Expand Down
1 change: 1 addition & 0 deletions python/setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import os
from itertools import chain

from setuptools import find_packages, setup

# Extra dependencies, with special 'all' key
Expand Down

0 comments on commit 29e8515

Please sign in to comment.