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

Uniformize imports #352

Open
YannBerthelot opened this issue Jul 24, 2023 · 0 comments
Open

Uniformize imports #352

YannBerthelot opened this issue Jul 24, 2023 · 0 comments
Labels
good first issue Good for newcomers style This is a code style issue

Comments

@YannBerthelot
Copy link
Collaborator

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).

@YannBerthelot YannBerthelot added good first issue Good for newcomers style This is a code style issue labels Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers style This is a code style issue
Projects
None yet
Development

No branches or pull requests

1 participant