Skip to content

Commit

Permalink
Merge pull request #19 from lsst-sqre/tickets/DM-47811
Browse files Browse the repository at this point in the history
DM-47811: Fix FAST001 and FAST002 ruff rules and update-deps
  • Loading branch information
stvoutsin authored Nov 27, 2024
2 parents 75449b2 + e0a466e commit c4e61fa
Show file tree
Hide file tree
Showing 10 changed files with 1,143 additions and 933 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.7.1
rev: v0.8.0
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ disallow_untyped_defs = true
disallow_incomplete_defs = true
ignore_missing_imports = true
local_partial_types = true
plugins = ["pydantic.mypy","pydantic_xml.mypy"]
#plugins = ["pydantic.mypy","pydantic_xml.mypy"]
plugins = ["pydantic.mypy"]
no_implicit_reexport = true
show_error_codes = true
strict_equality = true
Expand Down
646 changes: 325 additions & 321 deletions requirements/dev.txt

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion requirements/main.in
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,12 @@ google-cloud-storage
requests
jinja2
pydantic
pydantic-xml
pydantic-settings
safir>=5
numpy
astropy
vo-models
defusedxml
lsst-daf-butler[postgres, remote]
lsst-dax-obscore @ git+https://github.com/lsst-dm/dax_obscore@main#egg=lsst-dax-obscore
lsst-dax-obscore
1,354 changes: 780 additions & 574 deletions requirements/main.txt

Large diffs are not rendered by default.

56 changes: 28 additions & 28 deletions requirements/tox.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ filelock==3.16.1 \
# via
# tox
# virtualenv
packaging==24.1 \
--hash=sha256:026ed72c8ed3fcce5bf8950572258698927fd1dbda10a5e981cdf0ac37f4f002 \
--hash=sha256:5b8f2217dbdbd2f7f384c41c628544e6d52f2d0f53c6d0c3ea61aa5d1d7ff124
packaging==24.2 \
--hash=sha256:09abb1bccd265c01f4a3aa3f7a7db064b36514d2cba19a2f694fe6150451a759 \
--hash=sha256:c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f
# via
# -c requirements/dev.txt
# -c requirements/main.txt
Expand Down Expand Up @@ -56,31 +56,31 @@ tox==4.23.2 \
# via
# -r requirements/tox.in
# tox-uv
tox-uv==1.15.0 \
--hash=sha256:a5f08c80a3eabc47881e378700e5044b67ba94b03181ae38246627127f6a9183 \
--hash=sha256:dfe7e48274248458349b47780da7db815c0156bd3751b6486152bbf01d7672fb
tox-uv==1.16.0 \
--hash=sha256:71b2e2fa6c35c1360b91a302df1d65b3e5a1f656b321c5ebf7b84545804c9f01 \
--hash=sha256:e6f0b525a687e745ab878d07cbf5c7e85d582028d4a7c8935f95e84350651432
# via -r requirements/tox.in
uv==0.4.28 \
--hash=sha256:09a50416622b5df476be774739d1682db9079b7bc7493346c2085cf11b91706b \
--hash=sha256:22f6d4f95ceb4735a4c8f0555dda6761a57c8ee7fc1b6b7d7004d6a25a8aec38 \
--hash=sha256:274b5af065a1a3a37456e9f1a8c1c4e9b07825be1c4135d299e022fb0547de38 \
--hash=sha256:2c8c3a719d68181127fcf90c0e5d2a4b76bb405bf464e04c8bf5c6d356109cec \
--hash=sha256:2e82236e655c5af1905d7ca15c3c96c28a878f2d77a2e4f714d5254baad85b2e \
--hash=sha256:4ec1bf494dcf30984b5e6e8208d78a8a4e483855c45c3ea2b1d9e7201d8af00f \
--hash=sha256:524f38d996b51c27d1342af0d4e69c1524fbcfe57c8e036498811a5079fab070 \
--hash=sha256:6ea1fac8b9b8d785f66e2ab46296e6939a43ab85da538d3eea12a27dfefd84a6 \
--hash=sha256:7932026532a8294969777fa500dbd3c3a80aada14ac131d9696d596d31068550 \
--hash=sha256:8a32af23fc619e1e70923a498c097ec6eb120e764315ba164fa7ab8a65af9ba3 \
--hash=sha256:a3c59d5a11e0ddf550e20ea10b5d26ed06acab1192d3b70fe3993444cfe8fd41 \
--hash=sha256:bc33e318b676aeba2ea8bcd1e8f38623272b891200cefc54f9c420f4f4091434 \
--hash=sha256:be1ce25068d24b42273182729dc1917654438797346a5d470606949ec344fb22 \
--hash=sha256:d12b58c945e4805f06b954475642049d97f69796b9a4c5742a6e0a281de0db9c \
--hash=sha256:d9b8543712257678a5ab7e6865486bc71903c231d151ad1aff663b1c25596744 \
--hash=sha256:dea9d143e52cc295c9da9840530629196b0dc24c71b31a880f2f979fe3f1d62e \
--hash=sha256:e44e46aecf42e7d075d3428864c42598b3397fd4cdf5fbf198b38673870ac932 \
--hash=sha256:e680313c3b25eee9f9f521fab20746292cf6ef4e162e4f973e0758867702384f
uv==0.5.4 \
--hash=sha256:05b45c7eefb178dcdab0d49cd642fb7487377d00727102a8d6d306cc034c0d83 \
--hash=sha256:2118bb99cbc9787cb5e5cc4a507201e25a3fe88a9f389e8ffb84f242d96038c2 \
--hash=sha256:30ce031e36c54d4ba791d743d992d0a4fd8d70480db781d30a2f6f5125f39194 \
--hash=sha256:4432215deb8d5c1ccab17ee51cb80f5de1a20865ee02df47532f87442a3d6a58 \
--hash=sha256:493aedc3c758bbaede83ecc8d5f7e6a9279ebec151c7f756aa9ea898c73f8ddb \
--hash=sha256:69079e900bd26b0f65069ac6fa684c74662ed87121c076f2b1cbcf042539034c \
--hash=sha256:8d7a4a3df943a7c16cd032ccbaab8ed21ff64f4cb090b3a0a15a8b7502ccd876 \
--hash=sha256:928ed95fefe4e1338d0a7ad2f6b635de59e2ec92adaed4a267f7501a3b252263 \
--hash=sha256:a79a0885df364b897da44aae308e6ed9cca3a189d455cf1c205bd6f7b03daafa \
--hash=sha256:ca72e6a4c3c6b8b5605867e16a7f767f5c99b7f526de6bbb903c60eb44fd1e01 \
--hash=sha256:cd7a5a3a36f975a7678f27849a2d49bafe7272143d938e9b6f3bf28392a3ba00 \
--hash=sha256:dd2df2ba823e6684230ab4c581f2320be38d7f46de11ce21d2dbba631470d7b6 \
--hash=sha256:df3cb58b7da91f4fc647d09c3e96006cd6c7bd424a81ce2308a58593c6887c39 \
--hash=sha256:ed5659cde099f39995f4cb793fd939d2260b4a26e4e29412c91e7537f53d8d25 \
--hash=sha256:f07e5e0df40a09154007da41b76932671333f9fecb0735c698b19da25aa08927 \
--hash=sha256:f40c6c6c3a1b398b56d3a8b28f7b455ac1ce4cbb1469f8d35d3bbc804d83daa4 \
--hash=sha256:f511faf719b797ef0f14688f1abe20b3fd126209cf58512354d1813249745119 \
--hash=sha256:f806af0ee451a81099c449c4cff0e813056fdf7dd264f3d3a8fd321b17ff9efc
# via tox-uv
virtualenv==20.27.1 \
--hash=sha256:142c6be10212543b32c6c45d3d3893dff89112cc588b7d0879ae5a1ec03a47ba \
--hash=sha256:f11f1b8a29525562925f745563bfd48b189450f61fb34c4f9cc79dd5aa32a1f4
virtualenv==20.28.0 \
--hash=sha256:23eae1b4516ecd610481eda647f3a7c09aea295055337331bb4e6892ecce47b0 \
--hash=sha256:2c9c3262bb8e7b87ea801d715fae4495e6032450c71d2309be9550e7364049aa
# via tox
3 changes: 1 addition & 2 deletions src/sia/handlers/external.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
BASE_DIR = Path(__file__).resolve().parent.parent
_TEMPLATES = Jinja2Templates(directory=str(Path(BASE_DIR, "templates")))

__all__ = ["get_index", "external_router"]
__all__ = ["external_router", "get_index"]

external_router = APIRouter()
"""FastAPI router for all external handlers."""
Expand All @@ -39,7 +39,6 @@
"Document the top-level API here. By default it only returns metadata"
" about the application."
),
response_model=Index,
response_model_exclude_none=True,
summary="Application metadata",
)
Expand Down
1 change: 0 additions & 1 deletion src/sia/handlers/internal.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
" therefore cannot be used by external clients."
),
include_in_schema=False,
response_model=Metadata,
response_model_exclude_none=True,
summary="Application metadata",
)
Expand Down
2 changes: 1 addition & 1 deletion src/sia/middleware/ivoa.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class CaseInsensitiveFormMiddleware:
FastAPI to perform input validation on the POST parameters.
"""

def __init__(self, *, app: ASGIApp) -> None:
def __init__(self, app: ASGIApp) -> None:
"""Initialize the middleware with the ASGI application.
Parameters
Expand Down
6 changes: 3 additions & 3 deletions src/sia/models/sia_query_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@

__all__ = [
"BaseQueryParams",
"SIAQueryParams",
"Shape",
"CalibLevel",
"DPType",
"Polarization",
"CalibLevel",
"SIAQueryParams",
"Shape",
]

T = TypeVar("T", bound=Enum)
Expand Down

0 comments on commit c4e61fa

Please sign in to comment.