Skip to content

Commit dc414d1

Browse files
authored
Merge pull request #36 from Unstructured-IO/jj/suggest_url_if_401
chore: add 'make lint' command and address linting error
2 parents 031d4d3 + 5f68cf1 commit dc414d1

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

Diff for: Makefile

+7
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,14 @@ ARCH := $(shell uname -m)
77
###########
88

99
.PHONY: install-test
10+
install-test:
1011
pip install pytest
1112
pip install requests_mock
1213

1314
.PHONY: install-dev
15+
install-dev:
1416
pip install jupyter
17+
pip install pylint
1518

1619
## install: installs all test, dev, and experimental requirements
1720
.PHONY: install
@@ -26,6 +29,10 @@ test:
2629
PYTHONPATH=. pytest \
2730
_test_unstructured_client
2831

32+
.PHONY: lint
33+
lint:
34+
pylint --rcfile=pylintrc src
35+
2936
###########
3037
# Jupyter #
3138
###########

Diff for: src/unstructured_client/utils/_decorators.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414

1515
_P = ParamSpec("_P")
16+
SERVER_URL_ARG_IDX = 3
1617

1718

1819
def clean_server_url(func: Callable[_P, None]) -> Callable[_P, None]:
@@ -25,7 +26,6 @@ def clean_server_url(func: Callable[_P, None]) -> Callable[_P, None]:
2526

2627
@functools.wraps(func)
2728
def wrapper(*args: _P.args, **kwargs: _P.kwargs) -> None:
28-
SERVER_URL_ARG_IDX = 3
2929
url_is_in_kwargs = True
3030

3131
server_url: Optional[str] = cast(Optional[str], kwargs.get("server_url"))

0 commit comments

Comments
 (0)