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

Refactoring - Sorting imports with isort and linting with black #141

Merged
merged 1 commit into from
Aug 3, 2022
Merged

Refactoring - Sorting imports with isort and linting with black #141

merged 1 commit into from
Aug 3, 2022

Conversation

paulosgf
Copy link
Collaborator

@paulosgf paulosgf commented Aug 3, 2022

New adjustment.

Description

Refactoring - Sorting imports with isort and linting with black

How Has This Been Tested?

Tested on local fork with several plugins

Additional context

Add any other context or screenshots about the pull request here.

Checklist

  • [ x] I have read, understood and followed our Contributing Guide
  • [ x] My code follows the code style of this project
  • [ x] I have updated the documentation accordingly
  • [ x] I added my country flag to the README.md

Code of Conduct

By submitting this issue, you agree to follow our Code of Conduct

  • I agree to follow this project's Code of Conduct

@paulosgf paulosgf merged commit 11d2efe into pyhoneybot:master Aug 3, 2022
@paulosgf paulosgf deleted the isortlint branch August 3, 2022 19:19
Copy link
Member

@MrTanoshii MrTanoshii left a comment

Choose a reason for hiding this comment

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

Is the move from "flake8" to "black" without retaining the properties of https://github.com/pyhoneybot/honeybot/blob/master/setup.cfg intentional?

@@ -39,8 +39,7 @@ def run(self, incoming, methods, info, bot_info):
+ "Instead, they played piano music."
"Amelia Earhart and Eleanor Roosevelt once sneaked out of a White"
+ "House event, commandeered an airplane, and went on a joyride to Baltimore."
"The 100 folds in a chef's toque are said to represent 100 ways "
Copy link
Member

Choose a reason for hiding this comment

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

There's no need to use + if it is a single string

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

There's no need to use + if it is a single string

These "+" was to obey the 100 char limit. I guess that new lint pass modified the original flake8 style

@@ -38,8 +38,7 @@ def run(self, incoming, methods, info, bot_info):
if "errors" in flight: # check for api error
methods["send"](
info["address"],
"Invalid input! Callsign "
+ "should not be more than 10 characters!",
"Invalid input! Callsign " + "should not be more than 10 characters!",
Copy link
Member

Choose a reason for hiding this comment

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

There's no need to use + if it is a single string

@@ -42,16 +42,13 @@ def joke(self):
"What do you call a fake noodle? An Impasta.",
"Did you hear about the restaurant on the moon?"
+ " It had great food but no atmosphere.",
"Why do the put fences around grave yards?"
+ " Because people are dying to get in.",
"Why do the put fences around grave yards?" + " Because people are dying to get in.",
Copy link
Member

Choose a reason for hiding this comment

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

There's no need to use + if it is a single string

MAX_INDEX = len(
msgs
) # gets max index to know the max indexing value
MAX_INDEX = len(msgs) # gets max index to know the max indexing value
Copy link
Member

Choose a reason for hiding this comment

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

Comment is redundant

@@ -45,14 +45,12 @@ def quote(self):
"He that falls in love with himself will have no rivals.",
"Nothing is impossible, the word itself says 'I'm possible'!",
"It is hard to fail, but it is worse never to have tried to succeed.",
"Don't judge each day by the harvest you reap "
+ "but by the seeds that you plant.",
"Don't judge each day by the harvest you reap " + "but by the seeds that you plant.",
Copy link
Member

Choose a reason for hiding this comment

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

There's no need to use + if it is a single string

@@ -64,13 +62,11 @@ def __init__(self):
"What has a head, a tail, is brown, and has no legs?": "a penny",
"What English word has three consecutive double letters?": "ookkeeper",
"I know a word of letters three. Add two, and fewer there will be!": "few",
"Two in a corner, 1 in a room, 0 in a house,"
+ " but 1 in a shelter. What am I?": "r",
"Two in a corner, 1 in a room, 0 in a house," + " but 1 in a shelter. What am I?": "r",
Copy link
Member

Choose a reason for hiding this comment

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

There's no need to use + if it is a single string

+ "better known by what name?", # Tintoretto
"In what town was FDR's "
+ '"Little White House" located?', # Warm Springs, Georgia
"Venetian painter Jacopo Robusti was " + "better known by what name?", # Tintoretto
Copy link
Member

Choose a reason for hiding this comment

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

There's no need to use + if it is a single string

@paulosgf
Copy link
Collaborator Author

paulosgf commented Aug 4, 2022

Is the move from "flake8" to "black" without retaining the properties of https://github.com/pyhoneybot/honeybot/blob/master/setup.cfg intentional?

@MrTanoshii, I based on the project's original configs made by @Abdur-rahmaanJ, here: https://github.com/pyhoneybot/honeybot/blob/master/.pep8speaks.yml
There is a 100 char per line length limit.

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