Isort: Discrepancies on running isort in local vs Github Action

Created on 14 Aug 2020  路  5Comments  路  Source: PyCQA/isort

In reference to the following build, the issue I am facing with isort is that when run locally using the same config a different behaviour is shown as compared to when run on a Github Action context. Given that I have pinned the dependency and using the same version in both settings I am unable to figure out what is leading to a different result. Here is the screenshot of a local run.
isort

documentation

All 5 comments

Apparently cd'ing into the directory in the action did work. Still not sure why though :confused:

Hi @onlinejudge95,

Sorry this behaviour caused confusion! isort, like many CLI tools, uses the current working directory as an input to determine the project location. If you want to make sure the behaviour is explicit you can pass in a --settings-path or change the directory before running the command.

I'm glad you resolved your issue, and I hope the additional information is helpful!

~Timothy

I think it would be better to document this feature if not done yet.

Agreed! This is something I've been meaning to document better as it's a pretty central interaction. I'm going to reopen this issue, just to make sure it doesn't fall off the radar as a documentation task.

Thanks!

~Timothy

This interaction has now been clarified in the documentation here: This interaction is now documented here: https://pycqa.github.io/isort/docs/configuration/config_files/

Was this page helpful?
0 / 5 - 0 ratings

Related issues

AlexandreYang picture AlexandreYang  路  3Comments

lee-kagiso picture lee-kagiso  路  4Comments

kevindaum picture kevindaum  路  4Comments

johnthagen picture johnthagen  路  3Comments

donjar picture donjar  路  3Comments