Skip to content

Commit 79d5568

Browse files
committed
fix ruff style
1 parent 0455936 commit 79d5568

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

segmentation_models_pytorch/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@
2626

2727
# Suppress the specific SyntaxWarning for `pretrainedmodels`
2828
warnings.filterwarnings("ignore", message="is with a literal", category=SyntaxWarning)
29-
warnings.filterwarnings("ignore", message=r'"is" with \'str\' literal.*', category=SyntaxWarning) # for python >= 3.12
29+
warnings.filterwarnings(
30+
"ignore", message=r'"is" with \'str\' literal.*', category=SyntaxWarning
31+
) # for python >= 3.12
3032

3133

3234
def create_model(

segmentation_models_pytorch/decoders/deeplabv3/model.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class DeepLabV3(SegmentationModel):
4343
- dropout (float): Dropout factor in [0, 1)
4444
- activation (str): An activation function to apply "sigmoid"/"softmax"
4545
(could be **None** to return logits)
46-
kwargs: Arguments passed to the encoder class ``__init__()`` function. Applies only to ``timm`` models.
46+
kwargs: Arguments passed to the encoder class ``__init__()`` function. Applies only to ``timm`` models.
4747
Keys with ``None`` values are pruned before passing.
4848
4949
Returns:
@@ -79,7 +79,7 @@ def __init__(
7979
encoder_output_stride
8080
)
8181
)
82-
82+
8383
self.encoder = get_encoder(
8484
encoder_name,
8585
in_channels=in_channels,
@@ -91,7 +91,7 @@ def __init__(
9191

9292
if upsampling is None:
9393
if encoder_depth <= 3:
94-
scale_factor = 2 ** encoder_depth
94+
scale_factor = 2**encoder_depth
9595
else:
9696
scale_factor = encoder_output_stride
9797
else:
@@ -153,7 +153,7 @@ class DeepLabV3Plus(SegmentationModel):
153153
- dropout (float): Dropout factor in [0, 1)
154154
- activation (str): An activation function to apply "sigmoid"/"softmax"
155155
(could be **None** to return logits)
156-
kwargs: Arguments passed to the encoder class ``__init__()`` function. Applies only to ``timm`` models.
156+
kwargs: Arguments passed to the encoder class ``__init__()`` function. Applies only to ``timm`` models.
157157
Keys with ``None`` values are pruned before passing.
158158
159159
Returns:

0 commit comments

Comments
 (0)