8000 Apply black and isort formatting and modernize config files by taldcroft · Pull Request #124 · sot/xija · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Apply black and isort formatting and modernize config files #124

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

Merged
merged 6 commits into from
Apr 5, 2023

Conversation

taldcroft
Copy link
Member
@taldcroft taldcroft commented Sep 5, 2022

Description

This does the following:

  • Apply Black formatting in a few steps
  • Apply isort to sort imports
  • Add pyproject.toml to configure black and isort behavior
  • Add .pre-commit-config.yaml to allow pre-commit hooks to be installed
  • Remove pytest.ini. There is a new paradigm where we will use a single global definition of that file, as provided by the ska_testr repo. This new pytest.ini should be placed in a directory above all your Ska git repos (e.g. ~/git).

Interface impacts

None

Testing

Unit tests

  • Mac

Independent check of unit tests by [REVIEWER NAME]

  • [PLATFORM]:

Functional tests

Confirmed that the pre-commit hooks work as expected.

Copy link
Collaborator
@jzuhone jzuhone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

totally support this.

@matthewdahmer
Copy link
Contributor

@taldcroft I support this. The only hangup I have is the use of double quotes by default; I find the use of single quotes makes code look better, but this isn't really that big of a deal for me. I generally find the code formatting by black to be quite pleasant to read. I didn't see a way in the black api to ignore specific lines that are intentionally formatted in such a way that would otherwise be re-formatted, is this an option?

Base automatically changed from faster-bad-times to master September 8, 2022 09:33
@taldcroft
Copy link
Member Author

OK, I'll re-do this PR after #127 and #125 get merged. I will also put in a pre-commit hook config to make it easier to not forget.

After a little while I got used to the double quotes and now they look better. One thing is that I almost always type a single quote and then when I'm done with a section of code I have black fix it with option-shift-f in VS code.

@taldcroft taldcroft self-assigned this Jan 24, 2023
@taldcroft taldcroft changed the title Apply black formatting Apply black and isort formatting and modernize config files Apr 5, 2023
@taldcroft taldcroft merged commit 10a7ce5 into master Apr 5, 2023
@taldcroft taldcroft deleted the blacken branch April 5, 2023 12:44
This was referenced Jun 1, 2023
@javierggt javierggt mentioned this pull request Jul 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0