Skip to content

Commit

Permalink
ci: update pylint and autoflake entry
Browse files Browse the repository at this point in the history
  • Loading branch information
pedrorrivero committed Jan 17, 2024
1 parent 0800144 commit e1687d8
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ repos:
name: pylint
description: "Static code analysis"
stages: [commit]
entry: pylint -rn -d import-error
entry: pylint --reports=no --disable=import-error
language: python
files: .*\.py
exclude: (tools|test|docs)/.*
Expand Down Expand Up @@ -84,5 +84,5 @@ repos:
hooks:
- id: gitlint
name: gitlint
description: "Enforce extra commiting rules"
description: "Enforce extra committing rules"
stages: [commit-msg]
4 changes: 3 additions & 1 deletion FILEMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@
- [`unit`](test/unit/) --
folder for [unit tests](https://en.wikipedia.org/wiki/Unit_testing).
- [`pyproject.toml`](pyproject.toml) --
file containing the [build and package configurations](https://packaging.python.org/en/latest/guides/writing-pyproject-toml/) for the python project. This file also contains configurations for [Black](https://black.readthedocs.io/), a tool for automatic code formatting.
file containing the [build and package configurations](https://packaging.python.org/en/latest/guides/writing-pyproject-toml/) for the python project. This file also contains configurations for:
- [Black](https://black.readthedocs.io/) -- a tool for automatic code formatting.
- [Autoflake](https://github.com/PyCQA/autoflake) -- a tool for removing unused imports and variables.


## CI/CD
Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,6 @@ name = "quantum_enablement"
line-length = 100
exclude = '\.ipynb$'
extend-exclude = '.*/qiskit/.*'

[tool.autoflake]
remove-all-unused-imports = true
6 changes: 3 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ commands =
flake8 quantum_enablement test docs
isort quantum_enablement test docs --check-only
black quantum_enablement test docs --check
pylint -rn quantum_enablement
pylint quantum_enablement
mypy -p quantum_enablement


Expand All @@ -59,7 +59,7 @@ basepython = python3.12
extras =
lint
commands =
autoflake -i --remove-all-unused-imports -r quantum_enablement test docs
autoflake -r quantum_enablement test docs --in-place
isort quantum_enablement test docs
black quantum_enablement test docs

Expand Down Expand Up @@ -101,6 +101,6 @@ extras =
notebook
lint
commands =
nbqa autoflake -i --remove-all-unused-imports -r docs
nbqa autoflake -r docs --in-place --remove-all-unused-imports
nbqa isort docs
nbqa black docs

0 comments on commit e1687d8

Please sign in to comment.