mirror of
https://github.com/ultralytics/ultralytics
synced 2026-05-24 09:38:39 +00:00
Update docs.yml with RUF and FA ruff formatting (#22480)
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com> Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
This commit is contained in:
parent
e544db4383
commit
88438a86f7
2 changed files with 5 additions and 5 deletions
8
.github/workflows/docs.yml
vendored
8
.github/workflows/docs.yml
vendored
|
|
@ -57,9 +57,9 @@ jobs:
|
|||
ruff check \
|
||||
--fix \
|
||||
--unsafe-fixes \
|
||||
--extend-select F,I,D,UP \
|
||||
--extend-select F,I,D,UP,RUF,FA \
|
||||
--target-version py39 \
|
||||
--ignore D100,D104,D203,D205,D212,D213,D401,D406,D407,D413 \
|
||||
--ignore D100,D104,D203,D205,D212,D213,D401,D406,D407,D413,RUF001,RUF002,RUF012 \
|
||||
.
|
||||
- name: Update Docs Reference Section and Push Changes
|
||||
continue-on-error: true
|
||||
|
|
@ -80,9 +80,9 @@ jobs:
|
|||
- name: Ruff checks
|
||||
run: |
|
||||
ruff check \
|
||||
--extend-select F,I,D,UP \
|
||||
--extend-select F,I,D,UP,RUF,FA \
|
||||
--target-version py39 \
|
||||
--ignore D100,D104,D203,D205,D212,D213,D401,D406,D407,D413 \
|
||||
--ignore D100,D104,D203,D205,D212,D213,D401,D406,D407,D413,RUF001,RUF002,RUF012 \
|
||||
.
|
||||
- name: Build Docs and Check for Warnings
|
||||
run: |
|
||||
|
|
|
|||
|
|
@ -877,7 +877,7 @@ class Model(torch.nn.Module):
|
|||
>>> model = model._apply(lambda t: t.cuda()) # Move model to GPU
|
||||
"""
|
||||
self._check_is_pytorch_model()
|
||||
self = super()._apply(fn) # noqa
|
||||
self = super()._apply(fn)
|
||||
self.predictor = None # reset predictor as device may have changed
|
||||
self.overrides["device"] = self.device # was str(self.device) i.e. device(type='cuda', index=0) -> 'cuda:0'
|
||||
return self
|
||||
|
|
|
|||
Loading…
Reference in a new issue