Skip to content

Sourcery refactored master branch#1

Open
sourcery-ai[bot] wants to merge 1 commit intomasterfrom
sourcery/master
Open

Sourcery refactored master branch#1
sourcery-ai[bot] wants to merge 1 commit intomasterfrom
sourcery/master

Conversation

@sourcery-ai
Copy link

@sourcery-ai sourcery-ai bot commented Mar 22, 2020

Branch master refactored by Sourcery.

If you're happy with these changes, merge this Pull Request using the Squash and merge strategy.

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

  git fetch origin sourcery/master
  git cherry-pick FETCH_HEAD
  git reset HEAD^

See our documentation for configuring or disabling Sourcery.

@@ -65,9 +65,7 @@ def values_in_col(cursor, table_name, print_out=True):
"""
cursor.execute('PRAGMA TABLE_INFO({})'.format(table_name))
info = cursor.fetchall()
Copy link
Author

Choose a reason for hiding this comment

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

Function values_in_col refactored with the following changes:

  • Replace dict() with {}
  • Convert for loop into dictionary comprehension

@@ -6,11 +6,7 @@
import os

def find_files(substring, path):
Copy link
Author

Choose a reason for hiding this comment

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

Function find_files refactored with the following changes:

  • Convert for loop into list comprehension
  • Inline variable that is only used once

@@ -16,11 +16,7 @@ def likelihood_poisson(x, lam):
Poisson distribution

"""
Copy link
Author

Choose a reason for hiding this comment

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

Function likelihood_poisson refactored with the following changes:

  • Replace if statement with if expression
  • Inline variable that is only used once

@@ -6,8 +6,7 @@ def comp_theta_mle(d):
dataset for a Rayleigh distribution.

"""
Copy link
Author

Choose a reason for hiding this comment

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

Function comp_theta_mle refactored with the following changes:

  • Inline variable that is only used once
  • Replace unneeded comprehension with generator

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