Skip to content
This repository has been archived by the owner on Apr 30, 2023. It is now read-only.

Commit

Permalink
Use autoflake with pre-commit (#162)
Browse files Browse the repository at this point in the history
* Add autoflake

* Update LICENSE

* Update setup.cfg
  • Loading branch information
bieniu authored Dec 12, 2022
1 parent 0d66af5 commit 03347b6
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 9 deletions.
24 changes: 17 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,29 @@
repos:
- repo: https://github.com/asottile/pyupgrade
rev: v2.37.3
rev: v3.3.1
hooks:
- id: pyupgrade
args: [--py38-plus]
args: [--py39-plus]
- repo: https://github.com/PyCQA/autoflake
rev: v2.0.0
hooks:
- id: autoflake
args:
- --in-place
- --remove-duplicate-keys
- --ignore-init-module-imports
- --remove-all-unused-imports
- --remove-unused-variables
- repo: https://github.com/psf/black
rev: 22.6.0
rev: 22.12.0
hooks:
- id: black
args:
- --safe
- --quiet
files: ^((custom_components/zadnego_ale)/.+)?[^/]+\.py$
- repo: https://github.com/codespell-project/codespell
rev: v2.1.0
rev: v2.2.2
hooks:
- id: codespell
args:
Expand All @@ -23,7 +33,7 @@ repos:
exclude_types: [csv, json]
exclude: ^tests/fixtures/
- repo: https://github.com/PyCQA/flake8
rev: 5.0.4
rev: 6.0.0
hooks:
- id: flake8
additional_dependencies:
Expand All @@ -46,13 +56,13 @@ repos:
hooks:
- id: isort
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
rev: v4.4.0
hooks:
- id: no-commit-to-branch
args:
- --branch=master
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.27.1
rev: v1.28.0
hooks:
- id: yamllint
- repo: https://github.com/prettier/prettier
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2021 Maciej Bieniek
Copyright 2022 Maciej Bieniek

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ forced_separate = tests
combine_as_imports = true

[mypy]
python_version = 3.8
python_version = 3.9
show_error_codes = true
follow_imports = silent
ignore_missing_imports = true
Expand Down

0 comments on commit 03347b6

Please sign in to comment.