From 21ec529987d10e0010badd37f8da3274167d436f Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Wed, 18 May 2022 07:43:53 +0800 Subject: Run everything through 'black' That way people who use it won't be deterred, while it unifies style everywhere. --- git/objects/__init__.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'git/objects/__init__.py') diff --git a/git/objects/__init__.py b/git/objects/__init__.py index 1d0bb7a5..d2e1e53a 100644 --- a/git/objects/__init__.py +++ b/git/objects/__init__.py @@ -12,13 +12,17 @@ from .submodule.base import * from .submodule.root import * from .tag import * from .tree import * + # Fix import dependency - add IndexObject to the util module, so that it can be # imported by the submodule.base smutil.IndexObject = IndexObject # type: ignore[attr-defined] smutil.Object = Object # type: ignore[attr-defined] -del(smutil) +del smutil # must come after submodule was made available -__all__ = [name for name, obj in locals().items() - if not (name.startswith('_') or inspect.ismodule(obj))] +__all__ = [ + name + for name, obj in locals().items() + if not (name.startswith("_") or inspect.ismodule(obj)) +] -- cgit v1.2.1 From a7c5d887e943aa51f2270e517954c024a8c01500 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Wed, 18 May 2022 07:52:20 +0800 Subject: Remove flake8 linting in favor of `black` formatting `flake8` seems to dislike the formatting of black. --- git/objects/__init__.py | 1 - 1 file changed, 1 deletion(-) (limited to 'git/objects/__init__.py') diff --git a/git/objects/__init__.py b/git/objects/__init__.py index d2e1e53a..01a6395b 100644 --- a/git/objects/__init__.py +++ b/git/objects/__init__.py @@ -1,7 +1,6 @@ """ Import all submodules main classes into the package space """ -# flake8: noqa import inspect from .base import * -- cgit v1.2.1 From b4b238057e7913c93245b484bdd50131dafd71f3 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Wed, 18 May 2022 07:53:43 +0800 Subject: Revert "Remove flake8 linting in favor of `black` formatting" This reverts commit a7c5d887e943aa51f2270e517954c024a8c01500. --- git/objects/__init__.py | 1 + 1 file changed, 1 insertion(+) (limited to 'git/objects/__init__.py') diff --git a/git/objects/__init__.py b/git/objects/__init__.py index 01a6395b..d2e1e53a 100644 --- a/git/objects/__init__.py +++ b/git/objects/__init__.py @@ -1,6 +1,7 @@ """ Import all submodules main classes into the package space """ +# flake8: noqa import inspect from .base import * -- cgit v1.2.1 From e530544546b2a4e5f00e8d9458bf1b895573ec41 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Wed, 18 May 2022 08:01:38 +0800 Subject: reformat according to 'black' configuration file. --- git/objects/__init__.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'git/objects/__init__.py') diff --git a/git/objects/__init__.py b/git/objects/__init__.py index d2e1e53a..5910ac58 100644 --- a/git/objects/__init__.py +++ b/git/objects/__init__.py @@ -21,8 +21,4 @@ del smutil # must come after submodule was made available -__all__ = [ - name - for name, obj in locals().items() - if not (name.startswith("_") or inspect.ismodule(obj)) -] +__all__ = [name for name, obj in locals().items() if not (name.startswith("_") or inspect.ismodule(obj))] -- cgit v1.2.1