Skip to content

Commit 0265e0c

Browse files
committed
Formatting works again. Format the whole codebase
1 parent 51ce658 commit 0265e0c

File tree

74 files changed

+1625
-871
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+1625
-871
lines changed
Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,67 @@
1+
import atexit
2+
import shutil
3+
import sys
4+
import tempfile
5+
16
from setuptools import setup
27
from setuptools.command.build import build
38
from setuptools.command.build_ext import build_ext
49
from setuptools.command.build_py import build_py
510
from setuptools.command.egg_info import egg_info
6-
import tempfile
7-
import atexit
8-
import shutil
9-
import sys
1011

1112
# Create a single temp directory for all build operations
1213
_TEMP_BUILD_DIR = None
1314

15+
1416
def get_temp_build_dir(pkg_name):
1517
global _TEMP_BUILD_DIR
1618
if _TEMP_BUILD_DIR is None:
17-
_TEMP_BUILD_DIR = tempfile.mkdtemp(prefix=f'{pkg_name}_build_')
19+
_TEMP_BUILD_DIR = tempfile.mkdtemp(prefix=f"{pkg_name}_build_")
1820
atexit.register(lambda: shutil.rmtree(_TEMP_BUILD_DIR, ignore_errors=True))
1921
return _TEMP_BUILD_DIR
2022

23+
2124
class TempDirBuildMixin:
2225
def initialize_options(self):
2326
super().initialize_options()
2427
temp_dir = get_temp_build_dir(self.distribution.get_name())
2528
self.build_base = temp_dir
2629

30+
2731
class TempDirEggInfoMixin:
2832
def initialize_options(self):
2933
super().initialize_options()
3034
temp_dir = get_temp_build_dir(self.distribution.get_name())
3135
self.egg_base = temp_dir
3236

37+
3338
class CustomBuild(TempDirBuildMixin, build):
3439
pass
3540

41+
3642
class CustomBuildPy(TempDirBuildMixin, build_py):
3743
pass
3844

45+
3946
class CustomBuildExt(TempDirBuildMixin, build_ext):
4047
pass
4148

49+
4250
class CustomEggInfo(TempDirEggInfoMixin, egg_info):
4351
def initialize_options(self):
4452
# Don't use temp dir for editable installs
45-
if '--editable' in sys.argv or '-e' in sys.argv:
53+
if "--editable" in sys.argv or "-e" in sys.argv:
4654
egg_info.initialize_options(self)
4755
else:
4856
super().initialize_options()
4957

58+
5059
setup(
5160
name="fine_python_ast",
5261
cmdclass={
53-
'build': CustomBuild,
54-
'build_py': CustomBuildPy,
55-
'build_ext': CustomBuildExt,
56-
'egg_info': CustomEggInfo,
57-
}
58-
)
62+
"build": CustomBuild,
63+
"build_py": CustomBuildPy,
64+
"build_ext": CustomBuildExt,
65+
"egg_info": CustomEggInfo,
66+
},
67+
)
Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,67 @@
1+
import atexit
2+
import shutil
3+
import sys
4+
import tempfile
5+
16
from setuptools import setup
27
from setuptools.command.build import build
38
from setuptools.command.build_ext import build_ext
49
from setuptools.command.build_py import build_py
510
from setuptools.command.egg_info import egg_info
6-
import tempfile
7-
import atexit
8-
import shutil
9-
import sys
1011

1112
# Create a single temp directory for all build operations
1213
_TEMP_BUILD_DIR = None
1314

15+
1416
def get_temp_build_dir(pkg_name):
1517
global _TEMP_BUILD_DIR
1618
if _TEMP_BUILD_DIR is None:
17-
_TEMP_BUILD_DIR = tempfile.mkdtemp(prefix=f'{pkg_name}_build_')
19+
_TEMP_BUILD_DIR = tempfile.mkdtemp(prefix=f"{pkg_name}_build_")
1820
atexit.register(lambda: shutil.rmtree(_TEMP_BUILD_DIR, ignore_errors=True))
1921
return _TEMP_BUILD_DIR
2022

23+
2124
class TempDirBuildMixin:
2225
def initialize_options(self):
2326
super().initialize_options()
2427
temp_dir = get_temp_build_dir(self.distribution.get_name())
2528
self.build_base = temp_dir
2629

30+
2731
class TempDirEggInfoMixin:
2832
def initialize_options(self):
2933
super().initialize_options()
3034
temp_dir = get_temp_build_dir(self.distribution.get_name())
3135
self.egg_base = temp_dir
3236

37+
3338
class CustomBuild(TempDirBuildMixin, build):
3439
pass
3540

41+
3642
class CustomBuildPy(TempDirBuildMixin, build_py):
3743
pass
3844

45+
3946
class CustomBuildExt(TempDirBuildMixin, build_ext):
4047
pass
4148

49+
4250
class CustomEggInfo(TempDirEggInfoMixin, egg_info):
4351
def initialize_options(self):
4452
# Don't use temp dir for editable installs
45-
if '--editable' in sys.argv or '-e' in sys.argv:
53+
if "--editable" in sys.argv or "-e" in sys.argv:
4654
egg_info.initialize_options(self)
4755
else:
4856
super().initialize_options()
4957

58+
5059
setup(
5160
name="fine_python_black",
5261
cmdclass={
53-
'build': CustomBuild,
54-
'build_py': CustomBuildPy,
55-
'build_ext': CustomBuildExt,
56-
'egg_info': CustomEggInfo,
57-
}
58-
)
62+
"build": CustomBuild,
63+
"build_py": CustomBuildPy,
64+
"build_ext": CustomBuildExt,
65+
"egg_info": CustomEggInfo,
66+
},
67+
)
Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,67 @@
1+
import atexit
2+
import shutil
3+
import sys
4+
import tempfile
5+
16
from setuptools import setup
27
from setuptools.command.build import build
38
from setuptools.command.build_ext import build_ext
49
from setuptools.command.build_py import build_py
510
from setuptools.command.egg_info import egg_info
6-
import tempfile
7-
import atexit
8-
import shutil
9-
import sys
1011

1112
# Create a single temp directory for all build operations
1213
_TEMP_BUILD_DIR = None
1314

15+
1416
def get_temp_build_dir(pkg_name):
1517
global _TEMP_BUILD_DIR
1618
if _TEMP_BUILD_DIR is None:
17-
_TEMP_BUILD_DIR = tempfile.mkdtemp(prefix=f'{pkg_name}_build_')
19+
_TEMP_BUILD_DIR = tempfile.mkdtemp(prefix=f"{pkg_name}_build_")
1820
atexit.register(lambda: shutil.rmtree(_TEMP_BUILD_DIR, ignore_errors=True))
1921
return _TEMP_BUILD_DIR
2022

23+
2124
class TempDirBuildMixin:
2225
def initialize_options(self):
2326
super().initialize_options()
2427
temp_dir = get_temp_build_dir(self.distribution.get_name())
2528
self.build_base = temp_dir
2629

30+
2731
class TempDirEggInfoMixin:
2832
def initialize_options(self):
2933
super().initialize_options()
3034
temp_dir = get_temp_build_dir(self.distribution.get_name())
3135
self.egg_base = temp_dir
3236

37+
3338
class CustomBuild(TempDirBuildMixin, build):
3439
pass
3540

41+
3642
class CustomBuildPy(TempDirBuildMixin, build_py):
3743
pass
3844

45+
3946
class CustomBuildExt(TempDirBuildMixin, build_ext):
4047
pass
4148

49+
4250
class CustomEggInfo(TempDirEggInfoMixin, egg_info):
4351
def initialize_options(self):
4452
# Don't use temp dir for editable installs
45-
if '--editable' in sys.argv or '-e' in sys.argv:
53+
if "--editable" in sys.argv or "-e" in sys.argv:
4654
egg_info.initialize_options(self)
4755
else:
4856
super().initialize_options()
4957

58+
5059
setup(
5160
name="fine_python_flake8",
5261
cmdclass={
53-
'build': CustomBuild,
54-
'build_py': CustomBuildPy,
55-
'build_ext': CustomBuildExt,
56-
'egg_info': CustomEggInfo,
57-
}
58-
)
62+
"build": CustomBuild,
63+
"build_py": CustomBuildPy,
64+
"build_ext": CustomBuildExt,
65+
"egg_info": CustomEggInfo,
66+
},
67+
)
Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,67 @@
1+
import atexit
2+
import shutil
3+
import sys
4+
import tempfile
5+
16
from setuptools import setup
27
from setuptools.command.build import build
38
from setuptools.command.build_ext import build_ext
49
from setuptools.command.build_py import build_py
510
from setuptools.command.egg_info import egg_info
6-
import tempfile
7-
import atexit
8-
import shutil
9-
import sys
1011

1112
# Create a single temp directory for all build operations
1213
_TEMP_BUILD_DIR = None
1314

15+
1416
def get_temp_build_dir(pkg_name):
1517
global _TEMP_BUILD_DIR
1618
if _TEMP_BUILD_DIR is None:
17-
_TEMP_BUILD_DIR = tempfile.mkdtemp(prefix=f'{pkg_name}_build_')
19+
_TEMP_BUILD_DIR = tempfile.mkdtemp(prefix=f"{pkg_name}_build_")
1820
atexit.register(lambda: shutil.rmtree(_TEMP_BUILD_DIR, ignore_errors=True))
1921
return _TEMP_BUILD_DIR
2022

23+
2124
class TempDirBuildMixin:
2225
def initialize_options(self):
2326
super().initialize_options()
2427
temp_dir = get_temp_build_dir(self.distribution.get_name())
2528
self.build_base = temp_dir
2629

30+
2731
class TempDirEggInfoMixin:
2832
def initialize_options(self):
2933
super().initialize_options()
3034
temp_dir = get_temp_build_dir(self.distribution.get_name())
3135
self.egg_base = temp_dir
3236

37+
3338
class CustomBuild(TempDirBuildMixin, build):
3439
pass
3540

41+
3642
class CustomBuildPy(TempDirBuildMixin, build_py):
3743
pass
3844

45+
3946
class CustomBuildExt(TempDirBuildMixin, build_ext):
4047
pass
4148

49+
4250
class CustomEggInfo(TempDirEggInfoMixin, egg_info):
4351
def initialize_options(self):
4452
# Don't use temp dir for editable installs
45-
if '--editable' in sys.argv or '-e' in sys.argv:
53+
if "--editable" in sys.argv or "-e" in sys.argv:
4654
egg_info.initialize_options(self)
4755
else:
4856
super().initialize_options()
4957

58+
5059
setup(
5160
name="fine_python_isort",
5261
cmdclass={
53-
'build': CustomBuild,
54-
'build_py': CustomBuildPy,
55-
'build_ext': CustomBuildExt,
56-
'egg_info': CustomEggInfo,
57-
}
58-
)
62+
"build": CustomBuild,
63+
"build_py": CustomBuildPy,
64+
"build_ext": CustomBuildExt,
65+
"egg_info": CustomEggInfo,
66+
},
67+
)

0 commit comments

Comments
 (0)