Skip to content

Commit

Permalink
Upgrade pre commit hooks (#2154)
Browse files Browse the repository at this point in the history
* Upgrade pre commit hooks

* fix lint
  • Loading branch information
MeowZheng authored Oct 8, 2022
1 parent f87c053 commit b732fae
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
repos:
- repo: https://gitlab.com/pycqa/flake8.git
rev: 3.8.3
rev: 5.0.4
hooks:
- id: flake8
- repo: https://github.com/PyCQA/isort
rev: 5.10.1
hooks:
- id: isort
- repo: https://github.com/pre-commit/mirrors-yapf
rev: v0.30.0
rev: v0.32.0
hooks:
- id: yapf
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.1.0
rev: v4.3.0
hooks:
- id: trailing-whitespace
- id: check-yaml
Expand All @@ -34,7 +34,7 @@ repos:
- mdformat_frontmatter
- linkify-it-py
- repo: https://github.com/codespell-project/codespell
rev: v2.1.0
rev: v2.2.1
hooks:
- id: codespell
- repo: https://github.com/myint/docformatter
Expand All @@ -53,7 +53,7 @@ repos:
files: ^configs/.*\.md$
require_serial: true
- repo: https://github.com/asottile/pyupgrade
rev: v2.32.1
rev: v3.0.0
hooks:
- id: pyupgrade
args: ["--py36-plus"]
Expand Down
2 changes: 1 addition & 1 deletion docs/en/get_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ We recommend that users follow our best practices to install MMSegmentation. How
```shell
pip install -U openmim
mim install 'mmcv>=2.0.0rc1'
mim install mmmenigne
mim install mmenigne
```

**Step 1.** Install MMSegmentation.
Expand Down
2 changes: 1 addition & 1 deletion docs/en/user_guides/visualization.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ wget https://user-images.githubusercontent.com/24582831/189833109-eddad58f-f777-
wget https://user-images.githubusercontent.com/24582831/189833143-15f60f8a-4d1e-4cbb-a6e7-5e2233869fac.png --output-document aachen_000000_000019_gtFine_labelTrainIds.png
```

Then you can find their local path and use the scrips below to visualize:
Then you can find their local path and use the scripts below to visualize:

```python
import mmcv
Expand Down
2 changes: 1 addition & 1 deletion mmseg/models/backbones/vit.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ def init_weights(self):
constant_init(m, val=1.0, bias=0.)

def _pos_embeding(self, patched_img, hw_shape, pos_embed):
"""Positiong embeding method.
"""Positioning embeding method.
Resize the pos_embed, if the input image size doesn't match
the training size.
Expand Down
2 changes: 1 addition & 1 deletion mmseg/models/losses/focal_loss.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def sigmoid_focal_loss(pred,
valid_mask=None,
reduction='mean',
avg_factor=None):
r"""A warpper of cuda version `Focal Loss
r"""A wrapper of cuda version `Focal Loss
<https://arxiv.org/abs/1708.02002>`_.
Args:
pred (torch.Tensor): The prediction with shape (N, C), C is the number
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ default_section = THIRDPARTY
skip = *.po,*.ts,*.ipynb
count =
quiet-level = 3
ignore-words-list = formating,sur,hist,dota
ignore-words-list = formating,sur,hist,dota,warmup

0 comments on commit b732fae

Please sign in to comment.