Skip to content

Commit

Permalink
Lint fixes and exclusions for docs with ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
eccabay committed Aug 21, 2024
1 parent 051284b commit 527de53
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 12 deletions.
8 changes: 5 additions & 3 deletions docs/source/user_guide/automl.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -266,9 +266,6 @@
"metadata": {},
"outputs": [],
"source": [
"from evalml.pipelines import MulticlassClassificationPipeline\n",
"\n",
"\n",
"automl_custom = evalml.automl.AutoMLSearch(\n",
" X_train=X_train,\n",
" y_train=y_train,\n",
Expand Down Expand Up @@ -368,6 +365,11 @@
"metadata": {},
"outputs": [],
"source": [
"import logging\n",
"\n",
"logger = logging.getLogger(__name__)\n",
"\n",
"\n",
"# error_callback example; this is implemented in the evalml library\n",
"def raise_error_callback(exception, traceback, automl, **kwargs):\n",
" \"\"\"Raises the exception thrown by the AutoMLSearch object. Also logs the exception as an error.\"\"\"\n",
Expand Down
1 change: 0 additions & 1 deletion docs/source/user_guide/data_check_actions.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
"outputs": [],
"source": [
"import woodwork as ww\n",
"import pandas as pd\n",
"from evalml import AutoMLSearch\n",
"from evalml.demos import load_fraud\n",
"from evalml.preprocessing import split_data"
Expand Down
2 changes: 1 addition & 1 deletion docs/source/user_guide/data_checks.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,7 @@
"metadata": {},
"outputs": [],
"source": [
"from evalml.data_checks import NoVarianceDataCheck, DataCheckWarning\n",
"from evalml.data_checks import NoVarianceDataCheck, DataCheckError\n",
"\n",
"X = pd.DataFrame(\n",
" {\n",
Expand Down
2 changes: 0 additions & 2 deletions docs/source/user_guide/model_understanding.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -928,8 +928,6 @@
"metadata": {},
"outputs": [],
"source": [
"import shap\n",
"\n",
"from evalml.model_understanding.force_plots import graph_force_plot\n",
"\n",
"rows_to_explain = [0] # Should be a list of integer indices of the rows to explain.\n",
Expand Down
2 changes: 0 additions & 2 deletions docs/source/user_guide/pipelines.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -586,9 +586,7 @@
"source": [
"from evalml.pipelines.utils import generate_pipeline_code\n",
"from evalml.pipelines import BinaryClassificationPipeline\n",
"import pandas as pd\n",
"from evalml.utils import infer_feature_types\n",
"from skopt.space import Integer\n",
"\n",
"\n",
"class MyDropNullColumns(Transformer):\n",
Expand Down
2 changes: 1 addition & 1 deletion docs/source/user_guide/timeseries.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@
"outputs": [],
"source": [
"stl = STLDecomposer()\n",
"assert stl.period == None\n",
"assert stl.period is None\n",
"stl.fit(X_stl, y_stl)\n",
"print(stl.period)"
]
Expand Down
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ dependencies = [
"lime >= 0.2.0.1",
"tomli >= 2.0.1",
"packaging >= 23.0",
"black[jupyter] >= 22.3.0",
"holidays >= 0.13"
]

Expand Down Expand Up @@ -171,7 +170,7 @@ src = ["evalml"]
"evalml/tests/**" = ["D"]
"evalml/utils/**" = ["D"]
".github/**" = ["D"]
"docs/**" = ["D"]
"docs/**" = ["D", "I001", "E402", "F811", "F401"]

[tool.ruff.lint.isort]
known-first-party = ["evalml"]
Expand Down

0 comments on commit 527de53

Please sign in to comment.