dependabot-python 0.119.3 → 0.119.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 13a087f8c158a0b967063636237a86def182c624fbab33c6e41eefca49edeac2
4
- data.tar.gz: 86f4b6da4b1a085539560cee4ee5403a6c73b56fdc071ddd44371d1efcdadb03
3
+ metadata.gz: f201c4255c524ae0ecbbfc557cdf318b8efc552d6ac6abb2e713d81e95e1cb27
4
+ data.tar.gz: 627aaaa1ad891da06db8d67f5927d72f09b635cb5f57cf1b0a45068dde6861ad
5
5
  SHA512:
6
- metadata.gz: 524ac5b9aee02ae374504a49937f3bebddc3e1762ea211b3337c34cd4c2e12bd08f2710efb177cab8b31c2be430a2fe8d6a8ffb8594a7edd0a9d42359f1d5cca
7
- data.tar.gz: 8d7a39bc4f547f464b5b988e70989e9e579c93522da178c8123576c4daa7f43b0c04d590428b3b805d61cce5d9256071b71105798a35ba1a3b3d1c8a6d73f239
6
+ metadata.gz: 6d742f3fd17de985eda66beac0c1e950fdde39d4a12bb2ad84a5fd15effb15b8fec6c7a9f3dd70941dd6367d1119bd8a74911c008cdd11f95a6d70d50a60795d
7
+ data.tar.gz: 945f396b17b6175c8139fa4dab6da997f281fe84f4618bbedc5ec3161f5138c6fd50a2b2344098ae5a10b156f21410d24be850e0a9677b2fd9e9aa7b2de8626c
@@ -3,7 +3,6 @@
3
3
  module Dependabot
4
4
  module Python
5
5
  class AuthedUrlBuilder
6
- # rubocop:disable Metrics/PerceivedComplexity
7
6
  def self.authed_url(credential:)
8
7
  token = credential.fetch("token", nil)
9
8
  url = credential.fetch("index-url")
@@ -24,7 +23,6 @@ module Dependabot
24
23
 
25
24
  url.sub("://", "://#{basic_auth_details}@")
26
25
  end
27
- # rubocop:enable Metrics/PerceivedComplexity
28
26
  end
29
27
  end
30
28
  end
@@ -350,14 +350,14 @@ module Dependabot
350
350
  def parse_path_setup_paths(req_file)
351
351
  uneditable_reqs =
352
352
  req_file.content.
353
- scan(/^['"]?(?<path>\..*?)(?=\[|#|'|"|$)/).
353
+ scan(/^['"]?(?:file:)?(?<path>\..*?)(?=\[|#|'|"|$)/).
354
354
  flatten.
355
355
  map(&:strip).
356
356
  reject { |p| p.include?("://") }
357
357
 
358
358
  editable_reqs =
359
359
  req_file.content.
360
- scan(/^(?:-e)\s+['"]?(?<path>.*?)(?=\[|#|'|"|$)/).
360
+ scan(/^(?:-e)\s+['"]?(?:file:)?(?<path>.*?)(?=\[|#|'|"|$)/).
361
361
  flatten.
362
362
  map(&:strip).
363
363
  reject { |p| p.include?("://") || p.include?("git@") }
@@ -44,6 +44,7 @@ module Dependabot
44
44
 
45
45
  private
46
46
 
47
+ # rubocop:disable Metrics/PerceivedComplexity
47
48
  def resolver_type
48
49
  reqs = dependencies.flat_map(&:requirements)
49
50
  changed_reqs = reqs.zip(dependencies.flat_map(&:previous_requirements)).
@@ -64,6 +65,7 @@ module Dependabot
64
65
 
65
66
  :requirements
66
67
  end
68
+ # rubocop:enable Metrics/PerceivedComplexity
67
69
 
68
70
  def subdependency_resolver
69
71
  return :pipfile if pipfile_lock
@@ -142,6 +142,7 @@ module Dependabot
142
142
  freeze_top_level_dependencies_except(dependencies)
143
143
  end
144
144
 
145
+ # rubocop:disable Metrics/PerceivedComplexity
145
146
  def freeze_dependencies_being_updated(pipfile_content)
146
147
  pipfile_object = TomlRB.parse(pipfile_content)
147
148
 
@@ -163,6 +164,7 @@ module Dependabot
163
164
 
164
165
  TomlRB.dump(pipfile_object)
165
166
  end
167
+ # rubocop:enable Metrics/PerceivedComplexity
166
168
 
167
169
  def subdep_type?(type)
168
170
  return false if dependency.top_level?
@@ -46,7 +46,6 @@ module Dependabot
46
46
  TomlRB.dump(pipfile_object)
47
47
  end
48
48
 
49
- # rubocop:disable Metrics/PerceivedComplexity
50
49
  def freeze_dependency(dep_name, pipfile_object, keys)
51
50
  locked_version = version_from_lockfile(
52
51
  keys[:lockfile],
@@ -66,7 +65,6 @@ module Dependabot
66
65
  pipfile_object[keys[:pipfile]][dep_name] = "==#{locked_version}"
67
66
  end
68
67
  end
69
- # rubocop:enable Metrics/PerceivedComplexity
70
68
 
71
69
  def update_python_requirement(requirement)
72
70
  pipfile_object = TomlRB.parse(pipfile_content)
@@ -36,7 +36,7 @@ module Dependabot
36
36
  end
37
37
 
38
38
  # rubocop:disable Metrics/PerceivedComplexity
39
- # rubocop:disable Metrics/CyclomaticComplexity
39
+ # rubocop:disable Metrics/AbcSize
40
40
  def freeze_top_level_dependencies_except(dependencies)
41
41
  return pyproject_content unless lockfile
42
42
 
@@ -71,8 +71,8 @@ module Dependabot
71
71
 
72
72
  TomlRB.dump(pyproject_object)
73
73
  end
74
+ # rubocop:enable Metrics/AbcSize
74
75
  # rubocop:enable Metrics/PerceivedComplexity
75
- # rubocop:enable Metrics/CyclomaticComplexity
76
76
 
77
77
  private
78
78
 
@@ -30,8 +30,8 @@ module Dependabot
30
30
  updated_dependency_declaration_string
31
31
  end
32
32
 
33
- unless old_requirement == new_requirement
34
- raise "Expected content to change!" if content == updated_content
33
+ if old_requirement != new_requirement && content == updated_content
34
+ raise "Expected content to change!"
35
35
  end
36
36
 
37
37
  updated_content
@@ -100,7 +100,7 @@ module Dependabot
100
100
  def convert_caret_req(req_string)
101
101
  version = req_string.gsub(/^\^/, "")
102
102
  parts = version.split(".")
103
- parts = parts.fill(0, parts.length...3)
103
+ parts.fill(0, parts.length...3)
104
104
  first_non_zero = parts.find { |d| d != "0" }
105
105
  first_non_zero_index =
106
106
  first_non_zero ? parts.index(first_non_zero) : parts.count - 1
@@ -166,6 +166,7 @@ module Dependabot
166
166
  end
167
167
  end
168
168
 
169
+ # rubocop:disable Metrics/PerceivedComplexity
169
170
  def version_details_from_link(link)
170
171
  doc = Nokogiri::XML(link)
171
172
  filename = doc.at_css("a")&.content
@@ -181,6 +182,7 @@ module Dependabot
181
182
  yanked: link&.include?("data-yanked")
182
183
  }
183
184
  end
185
+ # rubocop:enable Metrics/PerceivedComplexity
184
186
 
185
187
  def get_version_from_filename(filename)
186
188
  filename.
@@ -97,7 +97,6 @@ module Dependabot
97
97
  end
98
98
  end
99
99
 
100
- # rubocop:disable Metrics/PerceivedComplexity
101
100
  # rubocop:disable Metrics/AbcSize
102
101
  def handle_pip_compile_errors(error)
103
102
  if error.message.include?("Could not find a version")
@@ -114,11 +113,14 @@ module Dependabot
114
113
  check_original_requirements_resolvable
115
114
  end
116
115
 
117
- if error.message.include?('Command "python setup.py egg_info') ||
118
- error.message.include?("exit status 1: python setup.py egg_info")
116
+ if (error.message.include?('Command "python setup.py egg_info') ||
117
+ error.message.include?(
118
+ "exit status 1: python setup.py egg_info"
119
+ )) &&
120
+ check_original_requirements_resolvable
119
121
  # The latest version of the dependency we're updating is borked
120
122
  # (because it has an unevaluatable setup.py). Skip the update.
121
- return if check_original_requirements_resolvable
123
+ return
122
124
  end
123
125
 
124
126
  if error.message.include?("Could not find a version ") &&
@@ -143,7 +145,6 @@ module Dependabot
143
145
  raise
144
146
  end
145
147
 
146
- # rubocop:enable Metrics/PerceivedComplexity
147
148
  # rubocop:enable Metrics/AbcSize
148
149
 
149
150
  # Needed because pip-compile's resolver isn't perfect.
@@ -152,11 +152,14 @@ module Dependabot
152
152
  check_original_requirements_resolvable
153
153
  end
154
154
 
155
- if error.message.include?('Command "python setup.py egg_info"') ||
156
- error.message.include?("exit status 1: python setup.py egg_info")
155
+ if (error.message.include?('Command "python setup.py egg_info"') ||
156
+ error.message.include?(
157
+ "exit status 1: python setup.py egg_info"
158
+ )) &&
159
+ check_original_requirements_resolvable
157
160
  # The latest version of the dependency we're updating is borked
158
161
  # (because it has an unevaluatable setup.py). Skip the update.
159
- return if check_original_requirements_resolvable
162
+ return
160
163
  end
161
164
 
162
165
  if error.message.include?("UnsupportedPythonVersion") &&
@@ -332,6 +335,7 @@ module Dependabot
332
335
  freeze_top_level_dependencies_except([dependency])
333
336
  end
334
337
 
338
+ # rubocop:disable Metrics/PerceivedComplexity
335
339
  def set_target_dependency_req(pipfile_content, updated_requirement)
336
340
  return pipfile_content unless updated_requirement
337
341
 
@@ -352,6 +356,7 @@ module Dependabot
352
356
 
353
357
  TomlRB.dump(pipfile_object)
354
358
  end
359
+ # rubocop:enable Metrics/PerceivedComplexity
355
360
 
356
361
  def subdep_type?(type)
357
362
  return false if dependency.top_level?
@@ -258,6 +258,7 @@ module Dependabot
258
258
  freeze_top_level_dependencies_except([dependency])
259
259
  end
260
260
 
261
+ # rubocop:disable Metrics/PerceivedComplexity
261
262
  def set_target_dependency_req(pyproject_content, updated_requirement)
262
263
  return pyproject_content unless updated_requirement
263
264
 
@@ -284,6 +285,7 @@ module Dependabot
284
285
 
285
286
  TomlRB.dump(pyproject_object)
286
287
  end
288
+ # rubocop:enable Metrics/PerceivedComplexity
287
289
 
288
290
  def subdep_type
289
291
  category =
@@ -73,7 +73,6 @@ module Dependabot
73
73
  updated_requirement(req)
74
74
  end
75
75
 
76
- # rubocop:disable Metrics/PerceivedComplexity
77
76
  def updated_pyproject_requirement(req)
78
77
  return req unless latest_resolvable_version
79
78
  return req unless req.fetch(:requirement)
@@ -99,8 +98,6 @@ module Dependabot
99
98
  req.merge(requirement: :unfixable)
100
99
  end
101
100
 
102
- # rubocop:enable Metrics/PerceivedComplexity
103
-
104
101
  def update_pyproject_version(req)
105
102
  requirement_strings = req[:requirement].split(",").map(&:strip)
106
103
 
@@ -160,6 +157,7 @@ module Dependabot
160
157
  "#{req_string.strip} || #{new_option.strip}"
161
158
  end
162
159
 
160
+ # rubocop:disable Metrics/PerceivedComplexity
163
161
  def widen_requirement_range(req_string)
164
162
  requirement_strings = req_string.split(",").map(&:strip)
165
163
 
@@ -179,6 +177,7 @@ module Dependabot
179
177
  update_requirements_range(requirement_strings)
180
178
  end
181
179
  end
180
+ # rubocop:enable Metrics/PerceivedComplexity
182
181
 
183
182
  # rubocop:disable Metrics/PerceivedComplexity
184
183
  def updated_requirement(req)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dependabot-python
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.119.3
4
+ version: 0.119.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dependabot
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-09-10 00:00:00.000000000 Z
11
+ date: 2020-09-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dependabot-common
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 0.119.3
19
+ version: 0.119.4
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 0.119.3
26
+ version: 0.119.4
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: byebug
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -100,14 +100,14 @@ dependencies:
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: 0.88.0
103
+ version: 0.90.0
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: 0.88.0
110
+ version: 0.90.0
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: vcr
113
113
  requirement: !ruby/object:Gem::Requirement