Skip to content

Commit b5d42d9

Browse files
committed
fix: Add argument for fix/check to makefile command
1 parent da5ccb1 commit b5d42d9

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

Makefile

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,16 @@ generateProto: linkPythonGRPC
3838

3939
pythonEnv: .sdk_env_touchfile
4040

41+
# Commands for isort, linting, and formatting
4142
lintAndFormat: pythonEnv
42-
$(PYTHON) -m ruff check --select I --fix && \
43-
$(PYTHON) -m ruff format
43+
@if [ "$(checkOnly)" = "true" ]; then \
44+
$(PYTHON) -m ruff check && \
45+
$(PYTHON) -m ruff format --check; \
46+
else \
47+
$(PYTHON) -m ruff check --select I --fix && \
48+
$(PYTHON) -m ruff check && \
49+
$(PYTHON) -m ruff format; \
50+
fi
4451

4552
clean:
4653
rm -f .sdk_env_touchfile

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ To make it, run a command `python3.<minor version> -m venv .sdk_env` in the `tam
1616
Formatting and linting on pull requests are enforced via Github CI.
1717

1818
To run formatting and linting locally and fix any auto-fixable issues, run `make lintAndFormat` in the `tamr-cloud-sdk-python` directory.
19+
To run linting without any auto-fixing, run `make lintAndFormat checkOnly=true`.

tamr_sdk/jobs/jobs_client.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,5 @@ def create_job(self, job_definition):
7575
result of request to start a job
7676
"""
7777
request = jobs.CreateJobRequest(job=job_definition)
78+
7879
return self.stub.CreateJob(request, metadata=self.metadata)

0 commit comments

Comments
 (0)