Skip to content

Uniformize imports #352

Description

@YannBerthelot

Imports are sorted differently from file to file.
Sometimes we have native package imported after rl berry :

import multiprocessing

from rlberry.network.interface import ResourceItem
from rlberry.network.server import BerryServer
from rlberry.agents import ValueIterationAgent
from rlberry.agents.torch import REINFORCEAgent
from rlberry.envs import GridWorld, gym_make
from rlberry.utils.writers import DefaultWriter

import sys

sometimes mixed,

import numpy as np
from rlberry.agents import AgentWithSimplePolicy

import pickle
from typing import Any, Union
from typing_extensions import Self
from rlberry.envs.bandits.bandit_base import Bandit
from pathlib import Path

import rlberry

I suggest to use a tool like isort to automatically sort the imports for clearer and harmonized files (as well as satisfying the linters requirements).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueGood for newcomersstyleThis is a code style issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions