Skip to content

Sourcery Starbot ⭐ refactored RusherRG/OpenAI-Gyms#1

Open
SourceryAI wants to merge 1 commit into
RusherRG:masterfrom
SourceryAI:master
Open

Sourcery Starbot ⭐ refactored RusherRG/OpenAI-Gyms#1
SourceryAI wants to merge 1 commit into
RusherRG:masterfrom
SourceryAI:master

Conversation

@SourceryAI

Copy link
Copy Markdown

Thanks for starring sourcery-ai/sourcery ✨ 🌟 ✨

Here's your pull request refactoring your most popular Python repo.

If you want Sourcery to refactor all your Python repos and incoming pull requests install our bot.

Review changes via command line

To manually merge these changes, make sure you're on the master branch, then run:

git fetch https://github.com/sourcery-ai-bot/OpenAI-Gyms master
git merge --ff-only FETCH_HEAD
git reset HEAD^

Comment thread DDPG/main.py
args = argparser.parse_args()

return args
return argparser.parse_args()

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Function Agent.parser refactored with the following changes:

  • Inline variable that is immediately returned (inline-immediately-returned-variable)

Comment thread DDPG/main.py
Comment on lines -142 to +140
model = None
return model
return None

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Function Agent.load_model refactored with the following changes:

  • Inline variable that is immediately returned (inline-immediately-returned-variable)

Comment thread DQN/q_learning.py
args = argparser.parse_args()

return args
return argparser.parse_args()

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Function Agent.parser refactored with the following changes:

  • Inline variable that is immediately returned (inline-immediately-returned-variable)

Comment thread GenericNN/cartpole.py

def neural_network_model():
model = tf.keras.Sequential([
return tf.keras.Sequential([

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Function neural_network_model refactored with the following changes:

  • Inline variable that is immediately returned (inline-immediately-returned-variable)

Comment thread GenericNN/cartpole.py
Comment on lines -135 to +134
model = tf.keras.models.load_model(name)
return model
return tf.keras.models.load_model(name)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Function loadmodel refactored with the following changes:

  • Inline variable that is immediately returned (inline-immediately-returned-variable)

Comment thread GenericNN/cartpole.py
Comment on lines -154 to +152
for episode in range(5):
for _ in range(5):

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Function some_random_games_first refactored with the following changes:

  • Replace unused for index with underscore (for-index-underscore)

Comment thread GenericNN/cartpole.py
Comment on lines -166 to +164
for i_episode in range(20):
for _ in range(20):

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Function env_test refactored with the following changes:

  • Replace unused for index with underscore (for-index-underscore)

Comment thread Q-table/q_learning.py
args = argparser.parse_args()

return args
return argparser.parse_args()

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Function QLearning.parser refactored with the following changes:

  • Inline variable that is immediately returned (inline-immediately-returned-variable)

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.

1 participant