Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: adds fix to pre-commit hooks #66

Merged
merged 1 commit into from
Mar 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ repos:
name: format
entry: bash -c "make fmt"
language: system
- id: fix
name: fix
entry: bash -c "make fix"
language: system
- id: lint
name: lint
entry: bash -c "make lint"
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ PYTHON := python3
default
deps
fmt
fix
install
lint
test
Expand Down Expand Up @@ -45,6 +46,9 @@ deps:
fmt:
$(PYTHON) -m ruff format .

fix:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you added an enumeration of all of the Makefile commands to the CONTRIBUTING.md last week, should this be added there? (Alternatively, you could delete the list from CONTRIBUTING, seems like it is destined to get out of sync, and this Makefile isn't too hard to scan to see what it does.)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll edit the CONTRIBUTING to direct readers to look at the Makefile.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added to #68

$(PYTHON) -m ruff check --fix

install:
$(PIP) install -e .

Expand Down
2 changes: 1 addition & 1 deletion examples/connect/streamlit/sample-content.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
# Read the viewer's user session token from the streamlit ws header.
headers = _get_websocket_headers()
if headers:
USER_SESSION_TOKEN = headers.get("Posit-Connect-User-Session-Token")
USER_SESSION_TOKEN = headers.get("Posit-Connect-User-Session-Token")

credentials_provider = viewer_credentials_provider(
user_session_token=USER_SESSION_TOKEN
Expand Down
Loading