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

Appearance settings

Commit a2d8a51

Browse filesBrowse files
mohi7solankiByron
authored andcommitted
Fix #889: Add DeepSource config and fix some major issues
1 parent 0765792 commit a2d8a51
Copy full SHA for a2d8a51

6 files changed

+29-13Lines changed: 29 additions & 13 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎.deepsource.toml‎

Copy file name to clipboard
+15Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
version = 1
2+
3+
test_patterns = [
4+
'git/test/**/test_*.py'
5+
]
6+
7+
exclude_patterns = [
8+
'doc/**',
9+
'etc/sublime-text'
10+
]
11+
12+
[[analyzers]]
13+
name = 'python'
14+
enabled = true
15+
runtime_version = '2.x.x'
Collapse file

‎git/objects/submodule/base.py‎

Copy file name to clipboardExpand all lines: git/objects/submodule/base.py
+2-3Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -864,9 +864,8 @@ def remove(self, module=True, force=False, configuration=True, dry_run=False):
864864
rmtree(wtd)
865865
except Exception as ex:
866866
if HIDE_WINDOWS_KNOWN_ERRORS:
867-
raise SkipTest("FIXME: fails with: PermissionError\n %s", ex)
868-
else:
869-
raise
867+
raise SkipTest("FIXME: fails with: PermissionError\n {}".format(ex))
868+
raise
870869
# END delete tree if possible
871870
# END handle force
872871

Collapse file

‎git/test/test_config.py‎

Copy file name to clipboardExpand all lines: git/test/test_config.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def setUp(self):
3838
def tearDown(self):
3939
for lfp in glob.glob(_tc_lock_fpaths):
4040
if osp.isfile(lfp):
41-
raise AssertionError('Previous TC left hanging git-lock file: %s', lfp)
41+
raise AssertionError('Previous TC left hanging git-lock file: {}'.format(lfp))
4242

4343
def _to_memcache(self, file_path):
4444
with open(file_path, "rb") as fp:
Collapse file

‎git/test/test_git.py‎

Copy file name to clipboardExpand all lines: git/test/test_git.py
+8-5Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -134,15 +134,18 @@ def test_it_accepts_environment_variables(self):
134134

135135
def test_persistent_cat_file_command(self):
136136
# read header only
137-
import subprocess as sp
138137
hexsha = "b2339455342180c7cc1e9bba3e9f181f7baa5167"
139-
g = self.git.cat_file(batch_check=True, istream=sp.PIPE, as_process=True)
138+
g = self.git.cat_file(
139+
batch_check=True, istream=subprocess.PIPE, as_process=True
140+
)
140141
g.stdin.write(b"b2339455342180c7cc1e9bba3e9f181f7baa5167\n")
141142
g.stdin.flush()
142143
obj_info = g.stdout.readline()
143144

144145
# read header + data
145-
g = self.git.cat_file(batch=True, istream=sp.PIPE, as_process=True)
146+
g = self.git.cat_file(
147+
batch=True, istream=subprocess.PIPE, as_process=True
148+
)
146149
g.stdin.write(b"b2339455342180c7cc1e9bba3e9f181f7baa5167\n")
147150
g.stdin.flush()
148151
obj_info_two = g.stdout.readline()
@@ -160,7 +163,7 @@ def test_persistent_cat_file_command(self):
160163

161164
# same can be achieved using the respective command functions
162165
hexsha, typename, size = self.git.get_object_header(hexsha)
163-
hexsha, typename_two, size_two, data = self.git.get_object_data(hexsha) # @UnusedVariable
166+
hexsha, typename_two, size_two, _ = self.git.get_object_data(hexsha)
164167
self.assertEqual(typename, typename_two)
165168
self.assertEqual(size, size_two)
166169

@@ -264,7 +267,7 @@ def test_environment(self, rw_dir):
264267
remote.fetch()
265268
except GitCommandError as err:
266269
if sys.version_info[0] < 3 and is_darwin:
267-
self.assertIn('ssh-orig, ' in str(err))
270+
self.assertIn('ssh-orig', str(err))
268271
self.assertEqual(err.status, 128)
269272
else:
270273
self.assertIn('FOO', str(err))
Collapse file

‎git/test/test_repo.py‎

Copy file name to clipboardExpand all lines: git/test/test_repo.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def setUp(self):
9090
def tearDown(self):
9191
for lfp in glob.glob(_tc_lock_fpaths):
9292
if osp.isfile(lfp):
93-
raise AssertionError('Previous TC left hanging git-lock file: %s', lfp)
93+
raise AssertionError('Previous TC left hanging git-lock file: {}'.format(lfp))
9494
import gc
9595
gc.collect()
9696

Collapse file

‎git/util.py‎

Copy file name to clipboardExpand all lines: git/util.py
+2-3Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,8 @@ def onerror(func, path, exc_info):
9898
func(path) # Will scream if still not possible to delete.
9999
except Exception as ex:
100100
if HIDE_WINDOWS_KNOWN_ERRORS:
101-
raise SkipTest("FIXME: fails with: PermissionError\n %s", ex)
102-
else:
103-
raise
101+
raise SkipTest("FIXME: fails with: PermissionError\n {}".format(ex))
102+
raise
104103

105104
return shutil.rmtree(path, False, onerror)
106105

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.