Jayich-Lab / tray-launcher

A launcher for Windows that resides in the taskbar for managing .bat scripts.
MIT License
7 stars 1 forks source link

Failed nox Session (automated black formating) #12

Closed jayich closed 2 years ago

jayich commented 2 years ago

See: https://github.com/Jayich-Lab/tray-launcher/issues/10#issuecomment-1013741486

danhuaxu commented 2 years ago

https://github.com/Jayich-Lab/bones/commit/b03bdf62efe5858df356b9715f69e2fe83b51139

https://github.com/Jayich-Lab/bones/pull/26

danhuaxu commented 2 years ago

See comments on Zulip - run nox -rs fmt

danhuaxu commented 2 years ago

@gschaffner When I ran nox in the tray_launcher directory, I saw the following error messages. Is nox malfunctioning, or is there a step I forgot to take beforehand? pip install nox was executed earlier. IMG-1539 IMG-1540

gschaffner commented 2 years ago

I don't think it is malfunctioning. The lint session is just failing because the linter wants you to change things. Most of those are isort warnings. Isort warnings in particular are pretty repetitive unfortunately but they should all go away if you run autoformatting with nox -rs fmt.

danhuaxu commented 2 years ago

I don't think it is malfunctioning. The lint session is just failing because the linter wants you to change things. Most of those are isort warnings. Isort warnings in particular are pretty repetitive unfortunately but they should all go away if you run autoformatting with nox -rs fmt.

Ah, I thought you said that nox is a shortcut for both. Apparently I was making things up: you said nox -rs fmt lint does both. Thanks a lot, it works perfectly.

gschaffner commented 2 years ago

Sure! BTW, if you would prefer it to be a shortcut to both you can add "fmt" into the default sessions list here:

https://github.com/Jayich-Lab/tray-launcher/blob/2f349e0851284c4410aa9b79c9910fb94e695bbe/noxfile.py#L5

danhuaxu commented 2 years ago

Sure! BTW, if you would prefer it to be a shortcut to both you can add "fmt" into the default sessions list here:

https://github.com/Jayich-Lab/tray-launcher/blob/2f349e0851284c4410aa9b79c9910fb94e695bbe/noxfile.py#L5

something like nox.options.sessions = ("fmt", "lint",)? Sounds good.