Closed brucearctor closed 7 months ago
Now the GH action passes, but when I run ruff locally, it triggers an I001
error:
% poetry run ruff --select=I document_segmentation/model/page_sequence_tagger.py
warning: `ruff <path>` is deprecated. Use `ruff check <path>` instead.
document_segmentation/model/page_sequence_tagger.py:1:1: I001 [*] Import block is un-sorted or un-formatted
Found 1 error.
[*] 1 fixable with the `--fix` option.
I am on the right branch:
% git rev-parse --abbrev-ref HEAD
ruff-demo
And on the latest Ruff version:
% poetry run ruff --version
ruff 0.3.3
When I run ruff --fix
locally, it applies the previous sorting again:
import csv
import logging
import sys
from typing import Any, Optional, TextIO
import torch
import torch.nn as nn
from torch import optim
from torcheval.metrics import (
Metric,
MulticlassAccuracy,
MulticlassF1Score,
MulticlassPrecision,
MulticlassRecall,
)
from tqdm import tqdm
import wandb # <---------------------------
from ..pagexml.datamodel.label import Label
from ..settings import PAGE_SEQUENCE_TAGGER_RNN_CONFIG
from .dataset import DocumentDataset, PageDataset
from .device_module import DeviceModule
from .page_embedding import PageEmbedding
I still cannot see the difference in the local call and the GH action call to ruff
.
Closes #49