Skip to content

Commit

Permalink
Fixes ruff check
Browse files Browse the repository at this point in the history
  • Loading branch information
aaront-geotab committed Apr 12, 2023
1 parent fb95628 commit 66dbf31
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
# stop the build if there are Python syntax errors or undefined names
pipenv run ruff . --select=E9,F63,F7,F82 --show-source
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
pipenv run ruff . --exit-zero --max-complexity=10 --line-length=127
pipenv run ruff . --exit-zero
- name: Test with pytest
run: |
pipenv run py.test --cov-config .coveragerc --cov-report xml:output/coverage.xml --cov mygeotab --junitxml output/python${{ matrix.python-version }}-test-results.xml --benchmark-min-rounds=3 --benchmark-storage=file://output/ --benchmark-autosave tests/
Expand Down
2 changes: 1 addition & 1 deletion mygeotab/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def call(self, method, **parameters):
else:
raise AuthenticationException(
self.credentials.username, self.credentials.database, self.credentials.server
)
) from exception
raise

def multi_call(self, calls):
Expand Down
2 changes: 1 addition & 1 deletion mygeotab/api_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ async def call_async(self, method, **parameters):
else:
raise AuthenticationException(
self.credentials.username, self.credentials.database, self.credentials.server
)
) from exception
raise

async def multi_call_async(self, calls):
Expand Down
10 changes: 8 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,11 @@ exclude = '''
'''

[tool.ruff]
line-length = 120
select = ["E", "F", "B"]
line-length = 127
select = ["E", "F", "B"]
exclude = [
"docs"
]

[tool.ruff.mccabe]
max-complexity = 10

0 comments on commit 66dbf31

Please sign in to comment.