sigopt / sigoptlite

Optimize with SigOpt with this standalone SigOpt client driver.
Apache License 2.0
8 stars 1 forks source link

Use Set Literals Instead of Sets from Lists #41

Closed pixeebot[bot] closed 8 months ago

pixeebot[bot] commented 8 months ago

This codemod converts Python set constructions using literal list arguments into more efficient and readable set literals. It simplifies expressions like set([1, 2, 3]) to {1, 2, 3}, enhancing both performance and code clarity.

Our changes look like this:

-x = set([1, 2, 3])
+x = {1, 2, 3}

I have additional improvements ready for this repo! If you want to see them, leave the comment:

@pixeebot next

... and I will open a new PR right away!

Powered by: pixeebot (codemod ID: pixee:python/use-set-literal)