Skip to content

Commit

Permalink
fix: restrict black-jupyter to pyi and jupyter
Browse files Browse the repository at this point in the history
  • Loading branch information
gadomski committed Jan 30, 2024
1 parent 30bcc07 commit 0d98d0b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ repos:
entry: black
language: python
require_serial: true
types_or: [python, pyi, jupyter]
types_or: [pyi, jupyter]
additional_dependencies: ["black[jupyter]"]

- id: codespell
Expand Down
20 changes: 11 additions & 9 deletions docs/tutorials/creating-a-landsat-stac.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,9 @@
"source": [
"def get_metadata(xml_url: str) -> Dict[str, Any]:\n",
" result = XmlDictConfig(ElementTree.XML(stac_io.read_text(pc.sign(xml_url))))\n",
" result[\n",
" \"ORIGINAL_URL\"\n",
" ] = xml_url # Include the original URL in the metadata for use later\n",
" result[\"ORIGINAL_URL\"] = (\n",
" xml_url # Include the original URL in the metadata for use later\n",
" )\n",
" return result"
]
},
Expand Down Expand Up @@ -1176,9 +1176,11 @@
" [\n",
" (\"not_set\", \"No confidence level set\"),\n",
" (\"low\", f\"Low confidence {label}\"),\n",
" (\"medium\", f\"Medium confidence {label}\")\n",
" if use_medium\n",
" else (\"reserved\", \"Reserved - value not used\"),\n",
" (\n",
" (\"medium\", f\"Medium confidence {label}\")\n",
" if use_medium\n",
" else (\"reserved\", \"Reserved - value not used\")\n",
" ),\n",
" (\"high\", f\"High confidence {label}\"),\n",
" ],\n",
" )"
Expand Down Expand Up @@ -1652,9 +1654,9 @@
" elif isinstance(ext_data, RasterBand):\n",
" RasterExtension.ext(asset, add_if_missing=True).bands = [ext_data]\n",
" elif isinstance(ext_data, list):\n",
" ClassificationExtension.ext(\n",
" asset, add_if_missing=True\n",
" ).bitfields = ext_data\n",
" ClassificationExtension.ext(asset, add_if_missing=True).bitfields = (\n",
" ext_data\n",
" )\n",
" item.add_asset(band[\"name\"], asset)"
]
},
Expand Down

0 comments on commit 0d98d0b

Please sign in to comment.