Skip to content

Commit c6187b5

Browse files
committed
lint
1 parent 37edeec commit c6187b5

17 files changed

Lines changed: 1264 additions & 1269 deletions

.github/workflows/testing.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,8 @@ jobs:
105105
echo "DISPLAY=:99" >> $GITHUB_ENV
106106
107107
- name: Run lint
108+
env:
109+
PYLINT_EXTRA_ARGS: ${{ matrix.python-version == '3.8' && '--ignored-modules=mcp' || '' }}
108110
run: npm run lint
109111

110112
- name: Run unit tests

.pylintrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ max-returns=6
431431
max-statements=50
432432

433433
# Minimum number of public methods for a class (see R0903).
434-
min-public-methods=2
434+
min-public-methods=1
435435

436436

437437
[IMPORTS]

dash/mcp/primitives/tools/callback_adapter.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,8 @@ def output_id(self) -> str:
135135

136136
@property
137137
def tool_name(self) -> str:
138-
return get_app().mcp_callback_map._tool_names_map[self._output_id] # pylint: disable=protected-access
138+
# pylint: disable-next=protected-access
139+
return get_app().mcp_callback_map._tool_names_map[self._output_id]
139140

140141
@cached_property
141142
def prevents_initial_call(self) -> bool:

dash/mcp/primitives/tools/descriptions/description_docstring.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,14 @@ class DocstringDescription(ToolDescriptionSource):
2525
def describe(cls, callback: CallbackAdapter) -> list[str]:
2626
if not cls._is_exposed(callback):
2727
return []
28-
docstring = callback._docstring
28+
docstring = callback._docstring # pylint: disable=protected-access
2929
if docstring:
3030
return ["", docstring.strip()]
3131
return []
3232

3333
@classmethod
3434
def _is_exposed(cls, callback: CallbackAdapter) -> bool:
35+
# pylint: disable-next=protected-access
3536
per_callback = callback._cb_info.get("mcp_expose_docstring")
3637
if per_callback is not None:
3738
return per_callback

dash/mcp/primitives/tools/input_schemas/schema_callback_type_annotations.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def annotation_to_json_schema(annotation: type) -> dict[str, Any] | None:
3939

4040
try:
4141
return TypeAdapter(annotation).json_schema()
42-
except Exception:
42+
except Exception: # pylint: disable=broad-exception-caught
4343
return None
4444

4545

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"private::build.jupyterlab": "cd @plotly/dash-jupyterlab && jlpm install && jlpm build:pack",
1515
"private::lint.black": "black dash tests --exclude 'metadata_test.py|node_modules' --check",
1616
"private::lint.flake8": "flake8 dash tests",
17-
"private::lint.pylint-dash": "pylint dash setup.py --rcfile=.pylintrc",
17+
"private::lint.pylint-dash": "pylint dash setup.py --rcfile=.pylintrc ${PYLINT_EXTRA_ARGS:-}",
1818
"private::lint.pylint-tests": "pylint tests/unit tests/integration -d all -e C0410,C0413,W0109 --rcfile=.pylintrc",
1919
"private::lint.renderer": "cd dash/dash-renderer && npm run lint",
2020
"private::test.setup-components": "cd @plotly/dash-test-components && npm ci && npm run build",

tests/unit/mcp/tools/input_schemas/__init__.py

Whitespace-only changes.

tests/unit/mcp/tools/input_schemas/input_descriptions/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)