dependabot-python 0.392.0 → 0.393.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: 70504f97ff35fbf437e2895455b6371d858c38921b3f4839a11aaddc31d04911
4
- data.tar.gz: 131699694996cabca8daec6c5a96f5a4dba34ec11601a22d7a8f54e6a855852f
3
+ metadata.gz: 242cdbd71bb6b0424ba7c88daf21d1839db3eb9d3f0beb2ad9e070f3d624cf77
4
+ data.tar.gz: 40a2faa1353d5fd82480211fee5ac28840996cf483fdf3c884fb558702396f08
5
5
  SHA512:
6
- metadata.gz: 56501fd6454a91206147b03fa795570e6a494e5d5c9733c8945656b174893352cd4adaa3bd2b4ee6c87565c3cc59dc861f62500d4c86fdfa3ea82c50afadda3f
7
- data.tar.gz: 8e1983671535f8886b5f7b920893a747d80b16535b74159c07da2ae82c1226dd66276fea515f28503217565955827ab03d51d5ac78dee42dce46d6bcd0cbe869
6
+ metadata.gz: 9a75d27db29ca5df37ea4e4962da3cbbfa0c05627044fd340d9b0b6f657108d44ff78bc40c206b2d0ac3a6d8387f3f0f30cd7dfeacafee122fd92b3e2d981954
7
+ data.tar.gz: 7651c73fdab13d9f091cada4a7d7531842e90042825ef0052c67882e90958870a26fd3936ac213bcd69362d9ac3b9d64d422a34ea4f9646344468851c6969b7c
@@ -1,5 +1,5 @@
1
1
  pip==26.1.2
2
- pip-tools==7.6.0
2
+ pip-tools==7.6.1
3
3
  flake8==7.3.0
4
4
  hashin==1.0.5
5
5
  pipenv==2024.4.1
@@ -68,10 +68,19 @@ module Dependabot
68
68
  SharedHelpers.in_a_temporary_directory do
69
69
  write_temporary_dependency_files
70
70
 
71
- requirements = SharedHelpers.run_helper_subprocess(
72
- command: "pyenv exec python3 #{NativeHelpers.python_helper_path}",
73
- function: "parse_setup",
74
- args: [Dir.pwd]
71
+ requirements = T.cast(
72
+ SharedHelpers.run_helper_subprocess(
73
+ command: "pyenv exec python3 #{NativeHelpers.python_helper_path}",
74
+ function: "parse_setup",
75
+ args: [Dir.pwd]
76
+ ),
77
+ T.nilable(
78
+ T.any(
79
+ T::Hash[String, T.untyped],
80
+ String,
81
+ T::Array[T::Hash[String, T.untyped]]
82
+ )
83
+ )
75
84
  )
76
85
 
77
86
  check_requirements(requirements)
@@ -90,10 +99,19 @@ module Dependabot
90
99
  SharedHelpers.in_a_temporary_directory do
91
100
  write_sanitized_setup_file
92
101
 
93
- requirements = SharedHelpers.run_helper_subprocess(
94
- command: "pyenv exec python3 #{NativeHelpers.python_helper_path}",
95
- function: "parse_setup",
96
- args: [Dir.pwd]
102
+ requirements = T.cast(
103
+ SharedHelpers.run_helper_subprocess(
104
+ command: "pyenv exec python3 #{NativeHelpers.python_helper_path}",
105
+ function: "parse_setup",
106
+ args: [Dir.pwd]
107
+ ),
108
+ T.nilable(
109
+ T.any(
110
+ T::Hash[String, T.untyped],
111
+ String,
112
+ T::Array[T::Hash[String, T.untyped]]
113
+ )
114
+ )
97
115
  )
98
116
 
99
117
  check_requirements(requirements)
@@ -345,10 +345,19 @@ module Dependabot
345
345
  def pipfile_hash_for(pipfile_content)
346
346
  SharedHelpers.in_a_temporary_directory do |dir|
347
347
  File.write(File.join(dir, "Pipfile"), pipfile_content)
348
- SharedHelpers.run_helper_subprocess(
349
- command: "pyenv exec python3 #{NativeHelpers.python_helper_path}",
350
- function: "get_pipfile_hash",
351
- args: [T.cast(dir, Pathname).to_s]
348
+ T.cast(
349
+ SharedHelpers.run_helper_subprocess(
350
+ command: "pyenv exec python3 #{NativeHelpers.python_helper_path}",
351
+ function: "get_pipfile_hash",
352
+ args: [T.cast(dir, Pathname).to_s]
353
+ ),
354
+ T.nilable(
355
+ T.any(
356
+ T::Hash[String, T.untyped],
357
+ String,
358
+ T::Array[T::Hash[String, T.untyped]]
359
+ )
360
+ )
352
361
  )
353
362
  end
354
363
  end
@@ -18,6 +18,16 @@ require "dependabot/package/release_cooldown_options"
18
18
 
19
19
  module Dependabot
20
20
  module Python
21
+ PoetryPyprojectHashResult = T.type_alias do
22
+ T.nilable(
23
+ T.any(
24
+ T::Hash[String, T.untyped],
25
+ String,
26
+ T::Array[T::Hash[String, T.untyped]]
27
+ )
28
+ )
29
+ end
30
+
21
31
  class FileUpdater
22
32
  class PoetryFileUpdater
23
33
  require_relative "pyproject_preparer"
@@ -367,17 +377,18 @@ module Dependabot
367
377
  .add_auth_env_vars(credentials)
368
378
  end
369
379
 
370
- sig { params(pyproject_content: String).returns(T.nilable(T.any(T::Hash[String, T.untyped], String, T::Array[T::Hash[String, T.untyped]]))) }
380
+ sig { params(pyproject_content: String).returns(PoetryPyprojectHashResult) }
371
381
  def pyproject_hash_for(pyproject_content)
372
382
  SharedHelpers.in_a_temporary_directory do |dir|
373
383
  SharedHelpers.with_git_configured(credentials: credentials) do
374
384
  write_temporary_dependency_files(pyproject_content)
375
385
 
376
- SharedHelpers.run_helper_subprocess(
386
+ result = SharedHelpers.run_helper_subprocess(
377
387
  command: "pyenv exec python3 #{NativeHelpers.python_helper_path}",
378
388
  function: "get_pyproject_hash",
379
389
  args: [T.cast(dir, Pathname).to_s]
380
390
  )
391
+ T.cast(result, PoetryPyprojectHashResult)
381
392
  end
382
393
  end
383
394
  end
@@ -129,7 +129,7 @@ module Dependabot
129
129
 
130
130
  sig { returns(T.nilable(Gem::Version)) }
131
131
  def latest_version_for_git_dependency
132
- latest_git_version_details&.fetch(:version)
132
+ latest_git_version_details&.version
133
133
  end
134
134
 
135
135
  sig { returns(T.nilable(Gem::Version)) }
@@ -152,7 +152,7 @@ module Dependabot
152
152
  def updated_git_source
153
153
  # Update the git tag if a new version is available
154
154
  if git_commit_checker.pinned_ref_looks_like_version? && latest_git_version_details
155
- new_tag = T.must(latest_git_version_details).fetch(:tag)
155
+ new_tag = T.must(latest_git_version_details).tag
156
156
  source_details = dependency.source_details
157
157
  return source_details.transform_keys(&:to_sym).merge(ref: new_tag) if source_details
158
158
  end
@@ -161,11 +161,11 @@ module Dependabot
161
161
  dependency.source_details&.transform_keys(&:to_sym)
162
162
  end
163
163
 
164
- sig { returns(T.nilable(T::Hash[Symbol, T.untyped])) }
164
+ sig { returns(T.nilable(Dependabot::GitTagDetails)) }
165
165
  def latest_git_version_details
166
166
  @latest_git_version_details ||= T.let(
167
167
  git_commit_checker.local_tag_for_latest_version(@update_cooldown),
168
- T.nilable(T::Hash[Symbol, T.untyped])
168
+ T.nilable(Dependabot::GitTagDetails)
169
169
  )
170
170
  end
171
171
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dependabot-python
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.392.0
4
+ version: 0.393.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dependabot
@@ -15,14 +15,14 @@ dependencies:
15
15
  requirements:
16
16
  - - '='
17
17
  - !ruby/object:Gem::Version
18
- version: 0.392.0
18
+ version: 0.393.0
19
19
  type: :runtime
20
20
  prerelease: false
21
21
  version_requirements: !ruby/object:Gem::Requirement
22
22
  requirements:
23
23
  - - '='
24
24
  - !ruby/object:Gem::Version
25
- version: 0.392.0
25
+ version: 0.393.0
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: debug
28
28
  requirement: !ruby/object:Gem::Requirement
@@ -323,7 +323,7 @@ licenses:
323
323
  - MIT
324
324
  metadata:
325
325
  bug_tracker_uri: https://github.com/dependabot/dependabot-core/issues
326
- changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.392.0
326
+ changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.393.0
327
327
  rdoc_options: []
328
328
  require_paths:
329
329
  - lib