dependabot-python 0.294.0 → 0.295.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dependabot/python/file_updater/pipfile_preparer.rb +18 -4
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 88e37f068b87d88c752580a508bbae2850ad20561b9d605806680aefc535976b
|
4
|
+
data.tar.gz: f6e67d072bd9bd1d244566a6788b44f78c204935554bf81c05b47af7fa2e1b32
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 48b1364b91c163df7bddc902fae51f49984e85eac04e91729025354a51d9472bcc0c04ecf5258c2fa886b2ec157970337727e7a03e5f1a7cfb6358853a5123e7
|
7
|
+
data.tar.gz: 6310f319aff5d5f9d2f3dd0556881623612ed4c6e5321b13acc0b0c988ca7581610abf21c99e5a5bd116d6f4d8fb982405a240d2d40bbde84ee8d5ede9d7a25b
|
@@ -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}",
|
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.295.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-01-
|
11
|
+
date: 2025-01-30 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.295.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.295.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.295.0
|
294
294
|
post_install_message:
|
295
295
|
rdoc_options: []
|
296
296
|
require_paths:
|