Skip to content

Commit

Permalink
ruff 化
Browse files Browse the repository at this point in the history
  • Loading branch information
voluntas committed Jan 23, 2024
1 parent cc3d0b9 commit 4619d76
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"editor.codeActionsOnSave": {
"source.organizeImports": "explicit"
},
"editor.defaultFormatter": "ms-python.autopep8"
"editor.defaultFormatter": "charliermarsh.ruff"
},
"[cpp]": {
"editor.formatOnSave": true
Expand Down
7 changes: 7 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,11 @@ dev-dependencies = [
"wheel~=0.40.0",
"auditwheel~=5.4.0",
"pytest~=7.3.2",
"ruff>=0.1.14",
]

[tool.ruff]
line-length = 100
indent-width = 4

exclude = [".venv", "run.py", "pypath.py", "setup.py"]
2 changes: 2 additions & 0 deletions requirements-dev.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# pre: false
# features: []
# all-features: false
# with-sources: false

-e file:.
auditwheel==5.4.0
Expand All @@ -17,6 +18,7 @@ pluggy==1.3.0
pyelftools==0.30
pyproject-hooks==1.0.0
pytest==7.3.2
ruff==0.1.14
tomli==2.0.1
wheel==0.40.0
# The following packages are considered to be unsafe in a requirements file:
Expand Down
1 change: 1 addition & 0 deletions requirements.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
# pre: false
# features: []
# all-features: false
# with-sources: false

-e file:.
4 changes: 2 additions & 2 deletions tests/test_recvonly.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@


def on_disconnect(error_code, message: str):
print(f'on_disconnect: error_code: {error_code}, message: {message}')
print(f"on_disconnect: error_code: {error_code}, message: {message}")


def test_sendonly():
Expand All @@ -15,7 +15,7 @@ def test_sendonly():
signaling_urls=[os.environ.get("TEST_SIGNALING_URL")],
role="recvonly",
channel_id=os.environ.get("TEST_CHANNEL_ID_PREFIX") + "sora-python-sdk-test",
metadata={"access_token": os.environ.get("TEST_SECRET_KEY")}
metadata={"access_token": os.environ.get("TEST_SECRET_KEY")},
)

conn.on_disconnect = on_disconnect
Expand Down

0 comments on commit 4619d76

Please sign in to comment.