Skip to content

Commit

Permalink
autoflake8 -> autoflake
Browse files Browse the repository at this point in the history
  • Loading branch information
skim0119 committed May 4, 2024
1 parent 52a77da commit 82b3060
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 46 deletions.
26 changes: 13 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#* Variables
PYTHON := python3
PYTHONPATH := `pwd`
AUTOFLAKE8_ARGS := -r --exclude '__init__.py' --keep-pass-after-docstring
AUTOFLAKE_ARGS := -r
#* Poetry
.PHONY: poetry-download
poetry-download:
Expand Down Expand Up @@ -43,23 +43,23 @@ black-check:
poetry run black --diff --check --config pyproject.toml elastica tests examples

.PHONY: flake8
flake8:
flake8:
poetry run flake8 --version
poetry run flake8 elastica tests

.PHONY: autoflake8-check
autoflake8-check:
poetry run autoflake8 --version
poetry run autoflake8 $(AUTOFLAKE8_ARGS) elastica tests examples
poetry run autoflake8 --check $(AUTOFLAKE8_ARGS) elastica tests examples
.PHONY: autoflake-check
autoflake-check:
poetry run autoflake --version
poetry run autoflake $(AUTOFLAKE_ARGS) elastica tests examples
poetry run autoflake --check $(AUTOFLAKE_ARGS) elastica tests examples

.PHONY: autoflake8-format
autoflake8-format:
poetry run autoflake8 --version
poetry run autoflake8 --in-place $(AUTOFLAKE8_ARGS) elastica tests examples
.PHONY: autoflake-format
autoflake-format:
poetry run autoflake --version
poetry run autoflake --in-place $(AUTOFLAKE_ARGS) elastica tests examples

.PHONY: format-codestyle
format-codestyle: black flake8
format-codestyle: black autoflake-format

.PHONY: mypy
mypy:
Expand All @@ -78,7 +78,7 @@ test_coverage_xml:
NUMBA_DISABLE_JIT=1 poetry run pytest --cov=elastica --cov-report=xml

.PHONY: check-codestyle
check-codestyle: black-check flake8 autoflake8-check
check-codestyle: black-check flake8 autoflake-check

.PHONY: formatting
formatting: format-codestyle
Expand Down
2 changes: 1 addition & 1 deletion elastica/timestepper/explicit_steppers.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
__doc__ = """Explicit timesteppers and concepts"""

from typing import Type, Any, Final
from typing import Any

import numpy as np
from copy import copy
Expand Down
2 changes: 1 addition & 1 deletion elastica/timestepper/protocol.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
__doc__ = "Time stepper interface"

from typing import Protocol, Callable, Literal, ClassVar, Type
from typing import Protocol

from elastica.typing import (
SystemType,
Expand Down
2 changes: 1 addition & 1 deletion elastica/timestepper/symplectic_steppers.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
__doc__ = """Symplectic time steppers and concepts for integrating the kinematic and dynamic equations of rod-like objects. """

from typing import Callable, Any, Final
from typing import Any, Final

from itertools import zip_longest

Expand Down
66 changes: 39 additions & 27 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 8 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ docutils = {version = "^0.18", optional = true}
cma = {version = "^3.2.2", optional = true}
mypy = "^1.10.0"
mypy-extensions = "^1.0.0"
flake8 = "^7.0.0"

[tool.poetry.dev-dependencies]
black = "24.3.0"
Expand All @@ -62,10 +63,9 @@ coverage = "^6.3.3"
pre-commit = "^2.19.0"
pytest-html = "^3.1.1"
pytest-cov = "^3.0.0"
flake8 = "^3.8"
codecov = "2.1.13"
click = "8.0.0"
autoflake8 = "^0.4"
autoflake = "^2.3.1"

[tool.poetry.extras]
docs = [
Expand Down Expand Up @@ -102,10 +102,15 @@ exclude = '''
)/
'''

[tool.autoflake]
ignore-init-module-imports = true
ignore-pass-statements = true
ignore-pass-after-docstring = true

[tool.pytest.ini_options]
# https://docs.pytest.org/en/6.2.x/customize.html#pyproject-toml
# Directories that are not visited by pytest collector:
norecursedirs =["hooks", "*.egg", ".eggs", "dist", "build", "docs", ".tox", ".git", "__pycache__"]
norecursedirs = ["hooks", "*.egg", ".eggs", "dist", "build", "docs", ".tox", ".git", "__pycache__"]

[tool.mypy]
# https://mypy.readthedocs.io/en/latest/config_file.html#using-a-pyproject-toml-file
Expand Down

0 comments on commit 82b3060

Please sign in to comment.