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

[CI] Format Python code with Black #21975

Merged
merged 12 commits into from
Jan 30, 2022
Prev Previous commit
Next Next commit
Appease F401 errors
  • Loading branch information
bveeramani committed Jan 29, 2022
commit d6831c07237f023fc6d7cd769435c3082f0f50a3
4 changes: 2 additions & 2 deletions python/ray/tune/utils/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
import psutil

from ray.util.ml_utils.json import SafeFallbackEncoder # noqa
from ray.util.ml_utils.dict import (
from ray.util.ml_utils.dict import ( # noqa: F401
merge_dicts,
deep_update,
flatten_dict,
unflatten_dict,
unflatten_list_dict,
unflattened_lookup,
) # noqa
)

logger = logging.getLogger(__name__)

Expand Down
4 changes: 2 additions & 2 deletions rllib/agents/bandit/tests/test_bandits.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ def try_import_linucb():
)

def try_import_anything():
from ray.rllib.contrib.bandits.some_crazy_module import (
from ray.rllib.contrib.bandits.some_crazy_module import ( # noqa: F401
SomeCrazyClass,
) # noqa
)

self.assertRaisesRegex(
DeprecationWarning, "has been deprecated. Use", try_import_anything
Expand Down
4 changes: 2 additions & 2 deletions rllib/env/wrappers/recsim_wrapper.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Deprecated module: Use ray.rllib.env.wrappers.recsim instead!
from ray.rllib.env.wrappers.recsim import (
from ray.rllib.env.wrappers.recsim import ( # noqa: F401
make_recsim_env,
MultiDiscreteToDiscreteActionWrapper,
RecSimObservationSpaceWrapper,
RecSimResetWrapper,
) # noqa
)
from ray.rllib.utils.deprecation import deprecation_warning

deprecation_warning(
Expand Down
4 changes: 2 additions & 2 deletions rllib/execution/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from ray.util.iter_metrics import MetricsContext

# Backward compatibility.
from ray.rllib.utils.metrics import (
from ray.rllib.utils.metrics import ( # noqa: F401
LAST_TARGET_UPDATE_TS,
NUM_TARGET_UPDATES,
APPLY_GRADS_TIMER,
Expand All @@ -14,7 +14,7 @@
SAMPLE_TIMER,
LEARN_ON_BATCH_TIMER,
LOAD_BATCH_TIMER,
) # noqa
)

STEPS_SAMPLED_COUNTER = "num_steps_sampled"
AGENT_STEPS_SAMPLED_COUNTER = "num_agent_steps_sampled"
Expand Down