dependabot-python 0.294.0 → 0.296.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0765b7fccbea712cbc16a682eb3304f385cd846c18371c6698dc6c1615cc8061
|
4
|
+
data.tar.gz: e8d794545efa9c3e936377e8e5554dc16a1d63616bb08c35a75982164d2a53e7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bcbeda1d1d9ebb3da32369ab42e65466fc863be8e3de0f24aef1aa0dd2b803b71ae04f81d23c2929296519dc1dca77d0676c1aaad721ae51b80aa7b2b91e3b6e
|
7
|
+
data.tar.gz: 696e26506d30212f32c0f2c74446d151f06321b78627debf9095856ce4c509f3123345c34530f5111a28c8beec46ea5ef8c16143f771909fdafff2b819b6cd55
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# typed:
|
1
|
+
# typed: strict
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
4
|
require "toml-rb"
|
@@ -12,10 +12,14 @@ module Dependabot
|
|
12
12
|
module Python
|
13
13
|
class FileUpdater
|
14
14
|
class PipfilePreparer
|
15
|
+
extend T::Sig
|
16
|
+
|
17
|
+
sig { params(pipfile_content: String).void }
|
15
18
|
def initialize(pipfile_content:)
|
16
19
|
@pipfile_content = pipfile_content
|
17
20
|
end
|
18
21
|
|
22
|
+
sig { params(credentials: T::Array[T::Hash[String, T.untyped]]).returns(String) }
|
19
23
|
def replace_sources(credentials)
|
20
24
|
pipfile_object = TomlRB.parse(pipfile_content)
|
21
25
|
|
@@ -26,6 +30,7 @@ module Dependabot
|
|
26
30
|
TomlRB.dump(pipfile_object)
|
27
31
|
end
|
28
32
|
|
33
|
+
sig { params(requirement: String).returns(String) }
|
29
34
|
def update_python_requirement(requirement)
|
30
35
|
pipfile_object = TomlRB.parse(pipfile_content)
|
31
36
|
|
@@ -39,6 +44,7 @@ module Dependabot
|
|
39
44
|
TomlRB.dump(pipfile_object)
|
40
45
|
end
|
41
46
|
|
47
|
+
sig { params(parsed_file: String).returns(String) }
|
42
48
|
def update_ssl_requirement(parsed_file)
|
43
49
|
pipfile_object = TomlRB.parse(pipfile_content)
|
44
50
|
parsed_object = TomlRB.parse(parsed_file)
|
@@ -56,13 +62,19 @@ module Dependabot
|
|
56
62
|
|
57
63
|
private
|
58
64
|
|
65
|
+
sig { returns(String) }
|
59
66
|
attr_reader :pipfile_content
|
60
|
-
attr_reader :lockfile
|
61
67
|
|
68
|
+
sig { returns(T::Array[T::Hash[String, T.untyped]]) }
|
62
69
|
def pipfile_sources
|
63
|
-
@pipfile_sources ||= TomlRB.parse(pipfile_content).fetch("source", [])
|
70
|
+
@pipfile_sources ||= T.let(TomlRB.parse(pipfile_content).fetch("source", []),
|
71
|
+
T.nilable(T::Array[T::Hash[String, T.untyped]]))
|
64
72
|
end
|
65
73
|
|
74
|
+
sig do
|
75
|
+
params(source: T::Hash[String, T.untyped],
|
76
|
+
credentials: T::Array[T::Hash[String, T.untyped]]).returns(T.nilable(T::Hash[String, T.untyped]))
|
77
|
+
end
|
66
78
|
def sub_auth_url(source, credentials)
|
67
79
|
if source["url"].include?("${")
|
68
80
|
base_url = source["url"].sub(/\${.*}@/, "")
|
@@ -79,8 +91,10 @@ module Dependabot
|
|
79
91
|
source
|
80
92
|
end
|
81
93
|
|
94
|
+
sig { params(credentials: T::Array[T::Hash[String, T.untyped]]).returns(T::Array[T::Hash[String, T.untyped]]) }
|
82
95
|
def config_variable_sources(credentials)
|
83
|
-
@config_variable_sources
|
96
|
+
@config_variable_sources = T.let([], T.nilable(T::Array[T::Hash[String, T.untyped]]))
|
97
|
+
@config_variable_sources =
|
84
98
|
credentials.select { |cred| cred["type"] == "python_index" }.map.with_index do |c, i|
|
85
99
|
{
|
86
100
|
"name" => "dependabot-inserted-index-#{i}",
|
@@ -73,7 +73,7 @@ module Dependabot
|
|
73
73
|
updated_content = replace_dep(dependency, updated_content, new_r, old_r)
|
74
74
|
end
|
75
75
|
|
76
|
-
raise "Content did not change!" if content == updated_content
|
76
|
+
raise DependencyFileContentNotChanged, "Content did not change!" if content == updated_content
|
77
77
|
|
78
78
|
updated_content
|
79
79
|
end
|
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.
|
4
|
+
version: 0.296.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dependabot
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-02-06 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.
|
19
|
+
version: 0.296.0
|
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.
|
26
|
+
version: 0.296.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: debug
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -290,7 +290,7 @@ licenses:
|
|
290
290
|
- MIT
|
291
291
|
metadata:
|
292
292
|
bug_tracker_uri: https://github.com/dependabot/dependabot-core/issues
|
293
|
-
changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.
|
293
|
+
changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.296.0
|
294
294
|
post_install_message:
|
295
295
|
rdoc_options: []
|
296
296
|
require_paths:
|