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

Commitfe426d4

Browse files
committed
Minor Flake8 fixes.
Latest version of it is required to show the issues travis shows as well
1 parent756b7ad commitfe426d4

File tree

4 files changed

+13
-9
lines changed

4 files changed

+13
-9
lines changed

‎git/index/fun.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010
S_IFREG,
1111
)
1212

13-
S_IFGITLINK=S_IFLNK|S_IFDIR# a submodule
14-
1513
fromioimportBytesIO
1614
importos
1715
importsubprocess
@@ -33,7 +31,6 @@
3331
CE_NAMEMASK,
3432
CE_STAGESHIFT
3533
)
36-
CE_NAMEMASK_INV=~CE_NAMEMASK
3734

3835
from .utilimport (
3936
pack,
@@ -47,6 +44,9 @@
4744
force_text
4845
)
4946

47+
S_IFGITLINK=S_IFLNK|S_IFDIR# a submodule
48+
CE_NAMEMASK_INV=~CE_NAMEMASK
49+
5050
__all__= ('write_cache','read_cache','write_tree_from_cache','entry_key',
5151
'stat_mode_to_index_mode','S_IFGITLINK','run_commit_hook','hook_path')
5252

‎git/test/lib/helper.py‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@
1515
fromgitimportRepo,Remote,GitCommandError,Git
1616
fromgit.compatimportstring_types
1717

18-
GIT_REPO=os.environ.get("GIT_PYTHON_TEST_GIT_REPO_BASE",os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(__file__)))))
18+
osp=os.path.dirname
19+
20+
GIT_REPO=os.environ.get("GIT_PYTHON_TEST_GIT_REPO_BASE",osp(osp(osp(osp(__file__)))))
1921

2022
__all__= (
2123
'fixture_path','fixture','absolute_project_path','StringProcessAdapter',
@@ -26,7 +28,7 @@
2628

2729

2830
deffixture_path(name):
29-
test_dir=os.path.dirname(os.path.dirname(__file__))
31+
test_dir=osp(osp(__file__))
3032
returnos.path.join(test_dir,"fixtures",name)
3133

3234

@@ -35,7 +37,7 @@ def fixture(name):
3537

3638

3739
defabsolute_project_path():
38-
returnos.path.abspath(os.path.join(os.path.dirname(__file__),"..",".."))
40+
returnos.path.abspath(os.path.join(osp(__file__),"..",".."))
3941

4042
#} END routines
4143

@@ -195,7 +197,7 @@ def remote_repo_creator(self):
195197

196198
d_remote.config_writer.set('url',remote_repo_url)
197199

198-
temp_dir=os.path.dirname(_mktemp())
200+
temp_dir=osp(_mktemp())
199201
# On windows, this will fail ... we deal with failures anyway and default to telling the user to do it
200202
try:
201203
gd=Git().daemon(temp_dir,enable='receive-pack',as_process=True)

‎git/test/test_base.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ def test_add_unicode(self, rw_repo):
120120

121121
# verify first that we could encode file name in this environment
122122
try:
123-
_=file_path.encode(sys.getfilesystemencoding())
123+
file_path.encode(sys.getfilesystemencoding())
124124
exceptUnicodeEncodeError:
125125
fromnoseimportSkipTest
126126
raiseSkipTest("Environment doesn't support unicode filenames")

‎tox.ini‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ commands = {posargs}
1818
[flake8]
1919
#show-source = True
2020
# E265 = comment blocks like @{ section, which it can't handle
21+
# E266 = too many leading '#' for block comment
22+
# E731 = do not assign a lambda expression, use a def
2123
# W293 = Blank line contains whitespace
22-
ignore = E265,W293
24+
ignore = E265,W293,E266,E731
2325
max-line-length = 120
2426
exclude = .tox,.venv,build,dist,doc,git/ext/

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp