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

Use latest version of black fo fix lint check #5548

Merged
merged 2 commits into from Mar 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/statsmodels/train.py
Expand Up @@ -28,7 +28,7 @@ def main():
np.random.seed(9876789)
nsamples = 100
x = np.linspace(0, 10, 100)
X = np.column_stack((x, x ** 2))
X = np.column_stack((x, x**2))
beta = np.array([1, 0.1, 10])
e = np.random.normal(size=nsamples)
X = sm.add_constant(X)
Expand Down
1 change: 0 additions & 1 deletion mlflow/pytorch/_pytorch_autolog.py
Expand Up @@ -273,7 +273,6 @@ def on_test_end(self, trainer, pl_module):
def _get_step_metrics(trainer):
return trainer.callback_metrics


else:

def _get_step_metrics(trainer):
Expand Down
2 changes: 1 addition & 1 deletion mlflow/store/db/utils.py
Expand Up @@ -161,7 +161,7 @@ def create_sqlalchemy_engine_with_retry(db_uri):
return engine
except Exception as e:
if attempts < MAX_RETRY_COUNT:
sleep_duration = 0.1 * ((2 ** attempts) - 1)
sleep_duration = 0.1 * ((2**attempts) - 1)
_logger.warning(
"SQLAlchemy engine could not be created. The following exception is caught.\n"
"%s\nOperation will be retried in %.1f seconds",
Expand Down
2 changes: 1 addition & 1 deletion requirements/lint-requirements.txt
@@ -1,3 +1,3 @@
pylint==2.11.1
rstcheck==3.2
black==21.10b0
black==22.3.0
2 changes: 1 addition & 1 deletion tests/examples/test_examples.py
Expand Up @@ -34,7 +34,7 @@ def remove_conda_env(env_name):

def get_free_disk_space():
# https://stackoverflow.com/a/48929832/6943581
return shutil.disk_usage("/")[-1] / (2 ** 30)
return shutil.disk_usage("/")[-1] / (2**30)


def is_conda_yaml(path):
Expand Down
2 changes: 1 addition & 1 deletion tests/generate_ui_test_data.py
Expand Up @@ -72,7 +72,7 @@ def rand_str(max_len=40):
parameters = {
"this is a pretty long parameter name": "NA10921-test_file_2018-08-10.txt",
}
metrics = {"grower": [i ** 1.2 for i in range(10)]}
metrics = {"grower": [i**1.2 for i in range(10)]}
log_params(parameters)
log_metrics(metrics)

Expand Down
2 changes: 1 addition & 1 deletion tests/pylint_plugins/utils.py
Expand Up @@ -8,4 +8,4 @@ def get_pylint_msg_ids():
res = subprocess.run(["pylint", "--list-msgs"], stdout=subprocess.PIPE, check=True)
stdout = res.stdout.decode("utf-8")
letters = "".join(MSG_TYPES.keys())
return set(re.findall(fr"\(([{letters}][0-9]{{4}})\)", stdout))
return set(re.findall(rf"\(([{letters}][0-9]{{4}})\)", stdout))
4 changes: 2 additions & 2 deletions tests/statsmodels/model_fixtures.py
Expand Up @@ -21,7 +21,7 @@ def ols_model(**kwargs):
np.random.seed(9876789)
nsamples = 100
x = np.linspace(0, 10, 100)
X = np.column_stack((x, x ** 2))
X = np.column_stack((x, x**2))
beta = np.array([1, 0.1, 10])
e = np.random.normal(size=nsamples)
X = sm.add_constant(X)
Expand Down Expand Up @@ -65,7 +65,7 @@ def gls_model():
res_fit = sm.OLS(ols_resid[1:], ols_resid[:-1]).fit()
rho = res_fit.params
order = toeplitz(np.arange(16))
sigma = rho ** order
sigma = rho**order
gls = sm.GLS(data.endog, data.exog, sigma=sigma)
model = gls.fit()

Expand Down