Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7824811

Browse files
authored
Merge pull request#1463 from JohnVillalovos/jlvillal/isort
chore: add isort as a checker
2 parents1508eb7 +f3afd34 commit7824811

File tree

96 files changed

+96
-143
lines changed

Some content is hidden

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

96 files changed

+96
-143
lines changed

‎.github/workflows/lint.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,5 @@ jobs:
3232
run:tox -e pep8
3333
-name:Run mypy static typing checker (http://mypy-lang.org/)
3434
run:tox -e mypy
35+
-name:Run isort import order checker (https://pycqa.github.io/isort/)
36+
run:tox -e isort -- --check

‎gitlab/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,4 @@
3131
fromgitlab.constimport*# noqa: F401,F403
3232
fromgitlab.exceptionsimport*# noqa: F401,F403
3333

34-
3534
warnings.filterwarnings("default",category=DeprecationWarning,module="^gitlab")

‎gitlab/__main__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
importgitlab.cli
22

3-
43
if__name__=="__main__":
54
gitlab.cli.main()

‎gitlab/base.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,10 @@
1919
fromtypesimportModuleType
2020
fromtypingimportAny,Dict,Iterable,NamedTuple,Optional,Tuple,Type
2121

22-
from .clientimportGitlab,GitlabList
2322
fromgitlabimporttypesasg_types
2423

24+
from .clientimportGitlab,GitlabList
25+
2526
__all__= [
2627
"RequiredOptional",
2728
"RESTObject",

‎gitlab/cli.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
importgitlab.config
2929
fromgitlab.baseimportRESTObject
3030

31-
3231
# This regex is based on:
3332
# https://github.com/jpvanhal/inflection/blob/master/inflection/__init__.py
3433
camel_upperlower_regex=re.compile(r"([A-Z]+)([A-Z][a-z])")

‎gitlab/client.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,16 @@
1717
"""Wrapper for the GitLab API."""
1818

1919
importtime
20-
fromtypingimportcast,Any,Dict,List,Optional,Tuple,TYPE_CHECKING,Union
20+
fromtypingimportAny,cast,Dict,List,Optional,Tuple,TYPE_CHECKING,Union
2121

2222
importrequests
2323
importrequests.utils
24+
fromrequests_toolbelt.multipart.encoderimportMultipartEncoder# type: ignore
2425

2526
importgitlab.config
2627
importgitlab.const
2728
importgitlab.exceptions
2829
fromgitlabimportutils
29-
fromrequests_toolbelt.multipart.encoderimportMultipartEncoder# type: ignore
30-
3130

3231
REDIRECT_MSG= (
3332
"python-gitlab detected an http to https redirection. You "
@@ -385,7 +384,6 @@ def _set_auth_info(self) -> None:
385384

386385
defenable_debug(self)->None:
387386
importlogging
388-
389387
fromhttp.clientimportHTTPConnection# noqa
390388

391389
HTTPConnection.debuglevel=1# type: ignore

‎gitlab/config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@
1515
# You should have received a copy of the GNU Lesser General Public License
1616
# along with this program. If not, see <http://www.gnu.org/licenses/>.
1717

18-
importos
1918
importconfigparser
19+
importos
2020
importshlex
2121
importsubprocess
22-
fromtypingimportList,Optional,Union
2322
fromos.pathimportexpanduser,expandvars
23+
fromtypingimportList,Optional,Union
2424

2525
fromgitlab.constimportUSER_AGENT
2626

‎gitlab/const.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818
fromgitlab.__version__import__title__,__version__
1919

20-
2120
NO_ACCESS:int=0
2221
MINIMAL_ACCESS:int=5
2322
GUEST_ACCESS:int=10

‎gitlab/exceptions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# along with this program. If not, see <http://www.gnu.org/licenses/>.
1717

1818
importfunctools
19-
fromtypingimportAny,Callable,cast,Optional,Type,TypeVar,TYPE_CHECKING,Union
19+
fromtypingimportAny,Callable,cast,Optional,Type,TYPE_CHECKING,TypeVar,Union
2020

2121

2222
classGitlabError(Exception):

‎gitlab/mixins.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
# You should have received a copy of the GNU Lesser General Public License
1616
# along with this program. If not, see <http://www.gnu.org/licenses/>.
1717

18+
importwarnings
1819
fromtypesimportModuleType
1920
fromtypingimport (
2021
Any,
@@ -31,12 +32,10 @@
3132
importrequests
3233

3334
importgitlab
34-
fromgitlabimportbase
35-
fromgitlabimportcli
35+
fromgitlabimportbase,cli
3636
fromgitlabimportexceptionsasexc
3737
fromgitlabimporttypesasg_types
3838
fromgitlabimportutils
39-
importwarnings
4039

4140
__all__= [
4241
"GetMixin",

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp