File: 0010-Fix-latest-flake8-errors.patch

package info (click to toggle)
ycmd 0%2B20240823%2Bgit8b61f19%2Bds-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 7,464 kB
  • sloc: python: 43,993; cpp: 6,138; java: 486; sh: 378; cs: 207; javascript: 150; ansic: 82; makefile: 45; xml: 18; objc: 10
file content (240 lines) | stat: -rw-r--r-- 6,831 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
From 6859beaedc2949575e55afa70749000395843f95 Mon Sep 17 00:00:00 2001
From: Ben Jackson <puremourning@gmail.com>
Date: Fri, 13 Jun 2025 22:45:11 +0100
Subject: [PATCH] Fix latest flake8 errors

---
 ycmd/tests/clang/__init__.py           | 2 --
 ycmd/tests/clangd/__init__.py          | 2 --
 ycmd/tests/cs/__init__.py              | 7 -------
 ycmd/tests/go/__init__.py              | 3 ---
 ycmd/tests/java/__init__.py            | 3 ---
 ycmd/tests/javascript/__init__.py      | 4 ----
 ycmd/tests/javascriptreact/__init__.py | 3 ---
 ycmd/tests/python/__init__.py          | 2 --
 ycmd/tests/rust/__init__.py            | 3 ---
 ycmd/tests/tern/__init__.py            | 3 ---
 ycmd/tests/typescript/__init__.py      | 3 ---
 11 files changed, 35 deletions(-)

diff --git a/ycmd/tests/clang/__init__.py b/ycmd/tests/clang/__init__.py
index 07c2d74c..89c5270c 100644
--- a/ycmd/tests/clang/__init__.py
+++ b/ycmd/tests/clang/__init__.py
@@ -38,8 +38,6 @@ def setUpModule():
 
 
 def SharedYcmd( test ):
-  global shared_app
-
   @functools.wraps( test )
   def Wrapper( test_case_instance, *args, **kwargs ):
     ClearCompletionsCache()
diff --git a/ycmd/tests/clangd/__init__.py b/ycmd/tests/clangd/__init__.py
index 47ec76d6..98de3db5 100644
--- a/ycmd/tests/clangd/__init__.py
+++ b/ycmd/tests/clangd/__init__.py
@@ -45,8 +45,6 @@ def tearDownModule():
 
 
 def SharedYcmd( test ):
-  global shared_app
-
   @functools.wraps( test )
   def Wrapper( test_case_instance, *args, **kwargs ):
     ClearCompletionsCache()
diff --git a/ycmd/tests/cs/__init__.py b/ycmd/tests/cs/__init__.py
index 251421e5..80e04c23 100644
--- a/ycmd/tests/cs/__init__.py
+++ b/ycmd/tests/cs/__init__.py
@@ -45,14 +45,11 @@ def setUpModule():
 
 
 def tearDownModule():
-  global shared_app, shared_filepaths
   for filepath in shared_filepaths.get( shared_app, [] ):
     StopCompleterServer( shared_app, 'cs', filepath )
 
 
 def SharedYcmd( test ):
-  global shared_app
-
   @functools.wraps( test )
   def Wrapper( test_case_instance, *args, **kwargs ):
     ClearCompletionsCache()
@@ -69,7 +66,6 @@ def IsolatedYcmd( custom_options = {} ):
         try:
           test( test_case_instance, app, *args, **kwargs )
         finally:
-          global shared_filepaths
           for filepath in shared_filepaths.get( app, [] ):
             StopCompleterServer( app, 'cs', filepath )
     return Wrapper
@@ -101,9 +97,6 @@ def GetDiagnostics( app, filepath ):
 
 @contextmanager
 def WrapOmniSharpServer( app, filepath ):
-  global shared_filepaths
-  global shared_log_indexes
-
   if filepath not in shared_filepaths.setdefault( app, [] ):
     GetDiagnostics( app, filepath )
     shared_filepaths[ app ].append( filepath )
diff --git a/ycmd/tests/go/__init__.py b/ycmd/tests/go/__init__.py
index 039b8ac9..1e15a15c 100644
--- a/ycmd/tests/go/__init__.py
+++ b/ycmd/tests/go/__init__.py
@@ -36,7 +36,6 @@ def setUpModule():
 
 
 def tearDownModule():
-  global shared_app
   StopCompleterServer( shared_app, 'go' )
 
 
@@ -50,8 +49,6 @@ def StartGoCompleterServerInDirectory( app, directory ):
 
 
 def SharedYcmd( test ):
-  global shared_app
-
   @functools.wraps( test )
   def Wrapper( test_case_instance, *args, **kwargs ):
     ClearCompletionsCache()
diff --git a/ycmd/tests/java/__init__.py b/ycmd/tests/java/__init__.py
index 09b9bff3..931693e3 100644
--- a/ycmd/tests/java/__init__.py
+++ b/ycmd/tests/java/__init__.py
@@ -47,7 +47,6 @@ def setUpModule():
 
 
 def tearDownModule():
-  global shared_app
   StopCompleterServer( shared_app, 'java' )
 
 
@@ -89,8 +88,6 @@ def isolated_app( custom_options = {} ):
 
 
 def SharedYcmd( test ):
-  global shared_app
-
   @functools.wraps( test )
   def Wrapper( test_case_instance, *args, **kwargs ):
     ClearCompletionsCache()
diff --git a/ycmd/tests/javascript/__init__.py b/ycmd/tests/javascript/__init__.py
index 8b0e7795..9c57c29e 100644
--- a/ycmd/tests/javascript/__init__.py
+++ b/ycmd/tests/javascript/__init__.py
@@ -44,14 +44,10 @@ def setUpModule():
 
 
 def tearDownModule():
-  global shared_app
-
   StopCompleterServer( shared_app, 'javascript' )
 
 
 def SharedYcmd( test ):
-  global shared_app
-
   @functools.wraps( test )
   def Wrapper( test_case_instance, *args, **kwargs ):
     ClearCompletionsCache()
diff --git a/ycmd/tests/javascriptreact/__init__.py b/ycmd/tests/javascriptreact/__init__.py
index e06fc6d6..4358db7f 100644
--- a/ycmd/tests/javascriptreact/__init__.py
+++ b/ycmd/tests/javascriptreact/__init__.py
@@ -37,7 +37,6 @@ def setUpModule():
 
 
 def tearDownModule():
-  global shared_app
   StopCompleterServer( shared_app, 'javascriptreact' )
 
 
@@ -47,8 +46,6 @@ def PathToTestFile( *args ):
 
 
 def SharedYcmd( test ):
-  global shared_app
-
   @functools.wraps( test )
   def Wrapper( test_case_instance, *args, **kwargs ):
     ClearCompletionsCache()
diff --git a/ycmd/tests/python/__init__.py b/ycmd/tests/python/__init__.py
index 0a452cc4..2e740482 100644
--- a/ycmd/tests/python/__init__.py
+++ b/ycmd/tests/python/__init__.py
@@ -37,8 +37,6 @@ def setUpModule():
 
 
 def SharedYcmd( test ):
-  global shared_app
-
   @functools.wraps( test )
   def Wrapper( test_case_instance, *args, **kwargs ):
     ClearCompletionsCache()
diff --git a/ycmd/tests/rust/__init__.py b/ycmd/tests/rust/__init__.py
index 70e9a629..ba2c9fc1 100644
--- a/ycmd/tests/rust/__init__.py
+++ b/ycmd/tests/rust/__init__.py
@@ -41,7 +41,6 @@ def setUpModule():
 
 
 def tearDownModule():
-  global shared_app
   StopCompleterServer( shared_app, 'rust' )
 
 
@@ -86,8 +85,6 @@ def PollForMessages( app, request_data, timeout = 60 ):
 
 
 def SharedYcmd( test ):
-  global shared_app
-
   @functools.wraps( test )
   def Wrapper( test_case_instance, *args, **kwargs ):
     ClearCompletionsCache()
diff --git a/ycmd/tests/tern/__init__.py b/ycmd/tests/tern/__init__.py
index a609f0d6..9ec01363 100644
--- a/ycmd/tests/tern/__init__.py
+++ b/ycmd/tests/tern/__init__.py
@@ -36,7 +36,6 @@ def setUpModule():
 
 
 def tearDownModule():
-  global shared_app
   StopCompleterServer( shared_app, 'tern' )
 
 
@@ -50,8 +49,6 @@ def StartJavaScriptCompleterServerInDirectory( app, directory ):
 
 
 def SharedYcmd( test ):
-  global shared_app
-
   @functools.wraps( test )
   def Wrapper( test_case_instance, *args, **kwargs ):
     ClearCompletionsCache()
diff --git a/ycmd/tests/typescript/__init__.py b/ycmd/tests/typescript/__init__.py
index 8daa71d2..d9487735 100644
--- a/ycmd/tests/typescript/__init__.py
+++ b/ycmd/tests/typescript/__init__.py
@@ -40,13 +40,10 @@ def setUpModule():
 
 
 def tearDownModule():
-  global shared_app
   StopCompleterServer( shared_app, 'typescript' )
 
 
 def SharedYcmd( test ):
-  global shared_app
-
   @functools.wraps( test )
   def Wrapper( test_case_instance, *args, **kwargs ):
     ClearCompletionsCache()
-- 
2.51.0