dependabot-python 0.108.1 → 0.108.2

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: 41e8294ac601f6d0ac6591e89576793206e3e320acbb6280595e5a8900ffda45
4
- data.tar.gz: 43e17cd7b3b0c1b02404ec7f89dc81357a9661b8fd84a176b67d5acb33e614a7
3
+ metadata.gz: 51d60d54ec3f354b29d3414f49081bf1fb490c12f7fa7170f925ac8dc22cce1b
4
+ data.tar.gz: 19919d89b53e0907780611e169d1f385bdf52933b2cfd647b43040b15a640d82
5
5
  SHA512:
6
- metadata.gz: ec1855f82ef6dcb2f0af6b3da57ec04c87204383591dbf9ba510dc9479919042923fd6c265d353b6df1a48580cea0f99e052ef721f08bd53f0d6f0ead45855b0
7
- data.tar.gz: 3fd230cc1164538f6e506eb9dcea7bb70956cd37e31fd0e408ba86c2a8f5d10c004c8f47e8d28dc4b5e8a0d797097741d2c0b309251028e8b8fcf919b7967034
6
+ metadata.gz: c0f02b5668db63ee597e8800781c463de18269ef2695bace65f56375cd34f78a34abf074d34d590e5eccd9883b2fd3d1b4e4dbff9d7c975f5dee8a11e729b3f4
7
+ data.tar.gz: 3ba1aa4853ec2e58e6b7d3ab4c91096be00bf6db58a9884bfed4552e9ad7aa50360a4b0ad258ca2c3c2fb913c1a8c08a3d77acf443dbe2695a2344fdd45483ea
@@ -12,7 +12,7 @@ module Dependabot
12
12
  module Python
13
13
  class FileFetcher < Dependabot::FileFetchers::Base
14
14
  CHILD_REQUIREMENT_REGEX = /^-r\s?(?<path>.*\.(?:txt|in))/.freeze
15
- CONSTRAINT_REGEX = /^-c\s?(?<path>\..*)/.freeze
15
+ CONSTRAINT_REGEX = /^-c\s?(?<path>.*\.(?:txt|in))/.freeze
16
16
 
17
17
  def self.required_files_in?(filenames)
18
18
  return true if filenames.any? { |name| name.end_with?(".txt", ".in") }
@@ -242,7 +242,13 @@ module Dependabot
242
242
  child_requirement_txt_files
243
243
 
244
244
  constraints_paths = all_requirement_files.map do |req_file|
245
- req_file.content.scan(CONSTRAINT_REGEX).flatten
245
+ current_dir = File.dirname(req_file.name)
246
+ paths = req_file.content.scan(CONSTRAINT_REGEX).flatten
247
+
248
+ paths.map do |path|
249
+ path = File.join(current_dir, path) unless current_dir == "."
250
+ path = Pathname.new(path).cleanpath.to_path
251
+ end
246
252
  end.flatten.uniq
247
253
 
248
254
  constraints_paths.map { |path| fetch_file_from_host(path) }
@@ -319,7 +325,7 @@ module Dependabot
319
325
 
320
326
  file.content.lines.all? do |line|
321
327
  next true if line.strip.empty?
322
- next true if line.start_with?("#", "-r ", "-c ", "-e ")
328
+ next true if line.start_with?("#", "-r ", "-c ", "-e ", "--")
323
329
 
324
330
  line.match?(RequirementParser::VALID_REQ_TXT_REQUIREMENT)
325
331
  end
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.108.1
4
+ version: 0.108.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dependabot
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 0.108.1
19
+ version: 0.108.2
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.108.1
26
+ version: 0.108.2
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: byebug
29
29
  requirement: !ruby/object:Gem::Requirement