Skip to content

Commit 66dbf31

Browse files
committed
Fixes ruff check
1 parent fb95628 commit 66dbf31

File tree

4 files changed

+11
-5
lines changed

4 files changed

+11
-5
lines changed

.github/workflows/pythonpackage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
# stop the build if there are Python syntax errors or undefined names
4040
pipenv run ruff . --select=E9,F63,F7,F82 --show-source
4141
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
42-
pipenv run ruff . --exit-zero --max-complexity=10 --line-length=127
42+
pipenv run ruff . --exit-zero
4343
- name: Test with pytest
4444
run: |
4545
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/

mygeotab/api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ def call(self, method, **parameters):
132132
else:
133133
raise AuthenticationException(
134134
self.credentials.username, self.credentials.database, self.credentials.server
135-
)
135+
) from exception
136136
raise
137137

138138
def multi_call(self, calls):

mygeotab/api_async.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ async def call_async(self, method, **parameters):
8282
else:
8383
raise AuthenticationException(
8484
self.credentials.username, self.credentials.database, self.credentials.server
85-
)
85+
) from exception
8686
raise
8787

8888
async def multi_call_async(self, calls):

pyproject.toml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,11 @@ exclude = '''
2020
'''
2121

2222
[tool.ruff]
23-
line-length = 120
24-
select = ["E", "F", "B"]
23+
line-length = 127
24+
select = ["E", "F", "B"]
25+
exclude = [
26+
"docs"
27+
]
28+
29+
[tool.ruff.mccabe]
30+
max-complexity = 10

0 commit comments

Comments
 (0)