Skip to content
This repository has been archived by the owner on Aug 3, 2023. It is now read-only.

Better implement for using Enum #106

Merged
merged 1 commit into from
Mar 5, 2023

Conversation

Harry-Jing
Copy link
Contributor

Also format code by using black

Already tested on my computer

@Harry-Jing
Copy link
Contributor Author

I explained why at #100

@danparizher
Copy link
Contributor

Since this is a reformatting PR using Black, it makes sense to reorder imports using isort according to PEP8 standards:

import argparse
import asyncio
import json
import os
import random
import sys
import uuid
from enum import Enum
from typing import Generator, Literal, Optional, Union

import requests
import websockets.client as websockets

Feel free to add to your PR if you agree

@Harry-Jing
Copy link
Contributor Author

I did not find the relevant criteria in pep8, The elements related to the import order are the following.


  • Imports are always put at the top of the file, just after any module comments and docstrings, and before module globals and constants.
    Imports should be grouped in the following order:

    1. Standard library imports.
    2. Related third party imports.
    3. Local application/library specific imports.

    You should put a blank line between each group of imports


Sorting by word length first, then alphabetically is my personal habit.

@BeautyyuYanli
Copy link
Contributor

BeautyyuYanli commented Mar 4, 2023

#100 (comment)

No need to support str as the argument. It can be verbose. str is just for cli command input, not sdk functions.

@acheong08
Copy link
Owner

I'll merge this and then format with pre-commit

@acheong08 acheong08 merged commit da7eaeb into acheong08:master Mar 5, 2023
@acheong08
Copy link
Owner

working well.

@Harry-Jing Harry-Jing deleted the FeatureConversationStyle branch March 5, 2023 12:47
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants