Skip to content

Commit c34940e

Browse files
thatchfacebook-github-bot
authored andcommitted
apply import merging for fbcode/pytorch (1 of 1)
Summary: Applies new import merging and sorting from µsort v1.0. When merging imports, µsort will make a best-effort to move associated comments to match merged elements, but there are known limitations due to the diynamic nature of Python and developer tooling. These changes should not produce any dangerous runtime changes, but may require touch-ups to satisfy linters and other tooling. Note that µsort uses case-insensitive, lexicographical sorting, which results in a different ordering compared to isort. This provides a more consistent sorting order, matching the case-insensitive order used when sorting import statements by module name, and ensures that "frog", "FROG", and "Frog" always sort next to each other. For details on µsort's sorting and merging semantics, see the user guide: https://usort.readthedocs.io/en/stable/guide.html#sorting Reviewed By: lisroach Differential Revision: D35553054 fbshipit-source-id: ba62de647aee121347cb75176f78fed6dad1b524
1 parent 95fe8a3 commit c34940e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
import sys
77

88
import torch
9-
from setuptools import setup, find_packages
9+
from setuptools import find_packages, setup
1010
from torch.utils.cpp_extension import (
1111
BuildExtension,
1212
CppExtension,
13-
CUDAExtension,
1413
CUDA_HOME,
14+
CUDAExtension,
1515
)
1616

1717
version = open("version.txt", "r").read().strip()

torchcsprng/__init__.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# This source code is licensed under the BSD-style license found in the
44
# LICENSE file in the root directory of this source tree.
55

6-
from torch import Tensor, Generator
6+
from torch import Generator, Tensor
77

88
def supports_cuda() -> bool: ...
99
def create_random_device_generator(token: str = "") -> Generator: ...

0 commit comments

Comments
 (0)