Skip to content
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

Format code with black #43

Merged
merged 2 commits into from
Feb 26, 2021
Merged

Conversation

flyte
Copy link
Collaborator

@flyte flyte commented Feb 25, 2021

Just an example of what would change, as mentioned in #37

I personally use a line length of 90, but it makes no difference to me to use a different one.

@frederikaalund
Copy link
Collaborator

Good idea. 👍

I think the default line length in black is 88, right? I can't remember the rationale for that specific number. Just to be pragmatic, I vote that we stick to the default of 88. Less potential future conflicts.

I personally use black for other projects as well. asyncio-mqtt is really not the best showcase of my usual Python code style preferences. :)) Have a look at this pyproject.toml for my preferred tools/defaults.

In a similar vein, we could also move to the poetry dependency manger, add isort, etc. I just never got around to "modernizing" asyncio-mqtt.

@frederikaalund frederikaalund mentioned this pull request Feb 26, 2021
@flyte flyte changed the title Format code with black -l 90 Format code with black Feb 26, 2021
@flyte
Copy link
Collaborator Author

flyte commented Feb 26, 2021

Yep, I've redone it as the default 88 (it only changed one line!).

I also use poetry generally, although I haven't delved as deeply into using the pyproject.toml file as you have! I like that everything's contained there.

@flyte flyte marked this pull request as ready for review February 26, 2021 09:31
@frederikaalund frederikaalund merged commit 81f7f53 into empicano:master Feb 26, 2021
@flyte
Copy link
Collaborator Author

flyte commented Feb 26, 2021

Phew, it's still just under 400 lines of code 😅

@flyte flyte deleted the feature/black branch February 26, 2021 09:38
@frederikaalund
Copy link
Collaborator

It used to be 300 lines of code. 😅 It keeps increasing as we add features and fix bugs. :) That's perfectly fine with me. The LoC count is just there to give an indication of: "This library is small and easy to improve/change/maintain. Jump right in!"

@JonathanPlasse JonathanPlasse mentioned this pull request Jan 21, 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.

2 participants