mirror of
https://github.com/wassname/jaxtyping.git
synced 2026-09-09 11:24:55 +08:00
Switched to ruff
This commit is contained in:
@@ -1,4 +0,0 @@
|
||||
[flake8]
|
||||
max-line-length = 88
|
||||
ignore = W291,W293,W503,W504,E123,E126,E203,E402,E701,E731,F722
|
||||
per-file-ignores = __init__.py: F401
|
||||
@@ -1,7 +0,0 @@
|
||||
[settings]
|
||||
force_alphabetical_sort_within_sections=true
|
||||
lines_after_imports=2
|
||||
profile=black
|
||||
combine_as_imports=True
|
||||
treat_comments_as_code=true
|
||||
extra_standard_library=typing_extensions
|
||||
+3
-13
@@ -22,17 +22,7 @@ repos:
|
||||
rev: 22.3.0
|
||||
hooks:
|
||||
- id: black
|
||||
- repo: https://github.com/nbQA-dev/nbQA
|
||||
rev: 1.6.3
|
||||
- repo: https://github.com/charliermarsh/ruff-pre-commit
|
||||
rev: 'v0.0.255'
|
||||
hooks:
|
||||
- id: nbqa-black
|
||||
- id: nbqa-isort
|
||||
- id: nbqa-flake8
|
||||
- repo: https://github.com/PyCQA/isort
|
||||
rev: 5.12.0
|
||||
hooks:
|
||||
- id: isort
|
||||
- repo: https://github.com/pycqa/flake8
|
||||
rev: 4.0.1
|
||||
hooks:
|
||||
- id: flake8
|
||||
- id: ruff
|
||||
|
||||
@@ -110,7 +110,7 @@ if typing.TYPE_CHECKING:
|
||||
# anything. (I believe this is sometimes called `Unknown`.) Thus, this odd-looking
|
||||
# annotation, which static type checkers aren't smart enough to resolve.
|
||||
elif has_jax:
|
||||
from .pytree_type import PyTree
|
||||
from .pytree_type import PyTree as PyTree # noqa: F401
|
||||
|
||||
del has_jax
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
[tool.ruff]
|
||||
select = ["E", "F", "I001"]
|
||||
ignore = ["E721", "E731", "F722"]
|
||||
ignore-init-module-imports = true
|
||||
|
||||
[tool.ruff.isort]
|
||||
combine-as-imports = true
|
||||
lines-after-imports = 2
|
||||
extra-standard-library = ["typing_extensions"]
|
||||
order-by-type = false
|
||||
@@ -17,4 +17,4 @@
|
||||
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
from . import another_file
|
||||
from . import another_file # noqa: F401
|
||||
|
||||
Reference in New Issue
Block a user