Stream: general
Topic: pangeobench
Haiying Xu (Apr 01 2020 at 23:00):
I have pangeobench, the first three line are:
#!/usr/bin/env python3
import click
from benchmarks.utils import Runner
This cannot pass the isort test. After I removed the first line and the following bland line, it passed the isort test. How can I have the first line and still pass the isort test?
Kevin Paul (Apr 01 2020 at 23:08):
This post should go in the #python-dev Stream, not in #general.
As for the question you posed, if you are referring to the file here:
https://github.com/pangeo-data/benchmarking/blob/master/pangeobench
Then it passes the isort test for me. What is your isort configuration?
Haiying Xu (Apr 02 2020 at 00:31):
But click is third party, benchmarks is belong to benchmarking package. So should be import click placed before from benchmarks?
Here is isort configuration:
[isort]
known_first_party=benchmarking
known_third_party=dask,distributed,numpy,pandas,pkg_resources,setuptools,xarray
multi_line_output=3
include_trailing_comma=True
force_grid_wrap=0
combine_as_imports=True
line_length=100
skip=
setup.py
Kevin Paul (Apr 02 2020 at 12:51):
Yes. I’m sorry. After you reorder those lines and separate them by a blank line, it should pass isort.
Haiying Xu (Apr 02 2020 at 16:39):
The order that I showed can pass isort from pre-commit-config, but it cannot pass the actions that I setup in main.yaml.
Kevin Paul (Apr 02 2020 at 16:40):
Let's move this to a private conversation...
Last updated: Jan 30 2022 at 12:01 UTC