Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
diffusers
Commits
3c138a4d
Unverified
Commit
3c138a4d
authored
Sep 01, 2022
by
Anton Lozhkov
Committed by
GitHub
Sep 01, 2022
Browse files
Fix flake8 F401 imported but unused (#317)
* Fix flake8 F401 '...' imported but unused * One more F403
parent
2fa44765
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
4 additions
and
22 deletions
+4
-22
setup.cfg
setup.cfg
+1
-0
src/diffusers/__init__.py
src/diffusers/__init__.py
+2
-5
src/diffusers/models/__init__.py
src/diffusers/models/__init__.py
+0
-4
src/diffusers/pipelines/__init__.py
src/diffusers/pipelines/__init__.py
+0
-4
src/diffusers/schedulers/__init__.py
src/diffusers/schedulers/__init__.py
+1
-5
src/diffusers/utils/__init__.py
src/diffusers/utils/__init__.py
+0
-4
No files found.
setup.cfg
View file @
3c138a4d
...
@@ -17,3 +17,4 @@ use_parentheses = True
...
@@ -17,3 +17,4 @@ use_parentheses = True
[flake8]
[flake8]
ignore = E203, E722, E501, E741, W503, W605
ignore = E203, E722, E501, E741, W503, W605
max-line-length = 119
max-line-length = 119
per-file-ignores = __init__.py:F401
src/diffusers/__init__.py
View file @
3c138a4d
# flake8: noqa
# There's no way to ignore "F401 '...' imported but unused" warnings in this
# module, but to preserve other warnings. So, don't check this module at all.
from
.utils
import
is_inflect_available
,
is_scipy_available
,
is_transformers_available
,
is_unidecode_available
from
.utils
import
is_inflect_available
,
is_scipy_available
,
is_transformers_available
,
is_unidecode_available
...
@@ -32,7 +29,7 @@ from .schedulers import (
...
@@ -32,7 +29,7 @@ from .schedulers import (
if
is_scipy_available
():
if
is_scipy_available
():
from
.schedulers
import
LMSDiscreteScheduler
from
.schedulers
import
LMSDiscreteScheduler
else
:
else
:
from
.utils.dummy_scipy_objects
import
*
from
.utils.dummy_scipy_objects
import
*
# noqa F403
from
.training_utils
import
EMAModel
from
.training_utils
import
EMAModel
...
@@ -45,4 +42,4 @@ if is_transformers_available():
...
@@ -45,4 +42,4 @@ if is_transformers_available():
StableDiffusionPipeline
,
StableDiffusionPipeline
,
)
)
else
:
else
:
from
.utils.dummy_transformers_objects
import
*
from
.utils.dummy_transformers_objects
import
*
# noqa F403
src/diffusers/models/__init__.py
View file @
3c138a4d
# flake8: noqa
# There's no way to ignore "F401 '...' imported but unused" warnings in this
# module, but to preserve other warnings. So, don't check this module at all.
# Copyright 2022 The HuggingFace Team. All rights reserved.
# Copyright 2022 The HuggingFace Team. All rights reserved.
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# Licensed under the Apache License, Version 2.0 (the "License");
...
...
src/diffusers/pipelines/__init__.py
View file @
3c138a4d
# flake8: noqa
# There's no way to ignore "F401 '...' imported but unused" warnings in this
# module, but to preserve other warnings. So, don't check this module at all.
from
..utils
import
is_transformers_available
from
..utils
import
is_transformers_available
from
.ddim
import
DDIMPipeline
from
.ddim
import
DDIMPipeline
from
.ddpm
import
DDPMPipeline
from
.ddpm
import
DDPMPipeline
...
...
src/diffusers/schedulers/__init__.py
View file @
3c138a4d
# flake8: noqa
# There's no way to ignore "F401 '...' imported but unused" warnings in this
# module, but to preserve other warnings. So, don't check this module at all.
# Copyright 2022 The HuggingFace Team. All rights reserved.
# Copyright 2022 The HuggingFace Team. All rights reserved.
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# Licensed under the Apache License, Version 2.0 (the "License");
...
@@ -29,4 +25,4 @@ from .scheduling_utils import SchedulerMixin
...
@@ -29,4 +25,4 @@ from .scheduling_utils import SchedulerMixin
if
is_scipy_available
():
if
is_scipy_available
():
from
.scheduling_lms_discrete
import
LMSDiscreteScheduler
from
.scheduling_lms_discrete
import
LMSDiscreteScheduler
else
:
else
:
from
..utils.dummy_scipy_objects
import
*
from
..utils.dummy_scipy_objects
import
*
# noqa F403
src/diffusers/utils/__init__.py
View file @
3c138a4d
# flake8: noqa
# There's no way to ignore "F401 '...' imported but unused" warnings in this
# module, but to preserve other warnings. So, don't check this module at all.
# Copyright 2022 The HuggingFace Inc. team. All rights reserved.
# Copyright 2022 The HuggingFace Inc. team. All rights reserved.
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# Licensed under the Apache License, Version 2.0 (the "License");
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment