-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Read configuration from pyproject.toml #58
Conversation
I'm drafting a blog post about using |
@Carreau, are you interested to review this? (I still can't assign you as a reviewer in the GitHub UI since you haven't accepted the invitation to join as a collaborator. Do you want me to cancel the invitation?) |
Sorry I missed the invitation, it has expired now. |
did a quick read through, look good to me. I'll look at the blog post. |
On the blog post, maybe extend to why one might not want to run darker on that full code base at once. Also add that with darker enabled the codebase will thus slowly converge to a point where all code is comformant in the limit of all lines having changed. |
Also dumps configuration on terminal if debug level logging is enabled with the `-vv` or `--verbose --verbose` command line option.
Also: - clean lru_cache from the `black.find_project_root()` function in unit tests - add unit test for handling of positional command line arguments defined in configuration
Fails to build wheels for - `regex` - `typed-ast` - `wrapt` - `lazy-object-proxy`
@Carreau I did some major fixes after your review. Do you have time to review again, or would you prefer other contributors to join? |
I'll try to do that now. |
Looks good, one suggestion about |
The tests broke with the Darker 20.8 update because of the changed formatting rules and the fact that we generated test data using Black. The test data is now hard-coded.
Only if no paths are given on the command line, try to load `pyproject.toml` in the Git root above current working directory, and use the `src =` option from there if available.
Ok @Mystic-Mirage now the build in this branch succeeds. We have mixed Black 19.10/20.8 formatting in the code base, and CI only requires Black 20.8 formatting for lines modified in merge requests. In a way, Darker is now eating its own dogfood 🐶 Could we merge this instead of #62 in your opinion? |
Sourcery refactoring – shorter code
Sourcery Code Quality Report (beta)❌ Merging this PR will decrease code quality in the affected files by 0.08 out of 10.
Here are some functions in these files that still need a tune-up:
Please see our documentation here for details on how these metrics are calculated. We are actively working on this report - lots more documentation and extra metrics to come! Let us know what you think of it by mentioning @sourcery-ai in a comment. |
@Carreau, I continued the blog post draft – what do you think about it now? |
I've now published the blog post Improving Python code incrementally on dev.to. |
Also dumps configuration on terminal if debug level logging is enabled with the
-vv
or--verbose --verbose
command line option.