Skip to content

Commit

Permalink
Merge pull request #44 from NREL/pp/linter_action_fix
Browse files Browse the repository at this point in the history
Linter action fix
  • Loading branch information
ppinchuk committed Feb 23, 2024
2 parents 51d6927 + 7aff1bf commit bbdaec4
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 9 deletions.
29 changes: 21 additions & 8 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,38 @@ jobs:
lint:
name: Lint Code Base
runs-on: ubuntu-latest

permissions:
contents: read
packages: read
# To report GitHub Actions status checks
statuses: write

steps:
- name: Checkout Code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
# super-linter needs the full git history to get the
# list of files that changed across commits
fetch-depth: 0

- name: Lint Code Base
uses: github/super-linter/slim@v4
uses: super-linter/super-linter/slim@v6.2.0
env:
VALIDATE_ALL_CODEBASE: false
VALIDATE_PYTHON_ISORT: false
VALIDATE_PYTHON_FLAKE8: false
VALIDATE_PYTHON_MYPY: false
VALIDATE_CHECKOV: false
VALIDATE_CSS: false
VALIDATE_GITHUB_ACTIONS: false
VALIDATE_DOCKERFILE_HADOLINT: false
VALIDATE_JSCPD: false
VALIDATE_JSON: false
VALIDATE_MARKDOWN: false
VALIDATE_PYTHON_ISORT: false
VALIDATE_PYTHON_FLAKE8: false
VALIDATE_PYTHON_MYPY: false
VALIDATE_YAML: false
DEFAULT_BRANCH: main
DEFAULT_BRANCH: origin/main
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
LINTER_RULES_PATH: /
PYTHON_PYLINT_CONFIG_FILE: .pylintrc
FILTER_REGEX_EXCLUDE: .github/*
FILTER_REGEX_INCLUDE: gaps/*
1 change: 1 addition & 0 deletions gaps/batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,7 @@ def _enumerated_product(args):
return list(zip(product(*(range(len(x)) for x in args)), product(*args)))


# pylint: disable=too-many-locals
def _parse_config(config):
"""Parse batch config object for useful data."""

Expand Down
2 changes: 1 addition & 1 deletion gaps/cli/documentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -772,6 +772,6 @@ def _uniform_space_strip(input_strs):

input_strs = [x.rstrip() for x in input_strs]
num_spaces_skip = min(
[len(x) - len(x.lstrip()) if x else float("inf") for x in input_strs]
len(x) - len(x.lstrip()) if x else float("inf") for x in input_strs
)
return [x[num_spaces_skip:] if x else x for x in input_strs]

0 comments on commit bbdaec4

Please sign in to comment.